@verdocs/web-sdk 1.9.3 → 1.9.4
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/loader.cjs.js +1 -1
- package/dist/cjs/verdocs-button-panel_3.cjs.entry.js +5 -5
- package/dist/cjs/verdocs-button-panel_3.cjs.entry.js.map +1 -1
- package/dist/cjs/verdocs-dropdown_3.cjs.entry.js +5 -3
- package/dist/cjs/verdocs-dropdown_3.cjs.entry.js.map +1 -1
- package/dist/cjs/verdocs-template-create_4.cjs.entry.js +34 -11
- package/dist/cjs/verdocs-template-create_4.cjs.entry.js.map +1 -1
- package/dist/cjs/verdocs-web-sdk.cjs.js +1 -1
- package/dist/collection/components/controls/verdocs-dropdown/verdocs-dropdown.js +5 -3
- package/dist/collection/components/controls/verdocs-dropdown/verdocs-dropdown.js.map +1 -1
- package/dist/collection/components/controls/verdocs-text-input/verdocs-text-input.js +5 -5
- package/dist/collection/components/controls/verdocs-text-input/verdocs-text-input.js.map +1 -1
- package/dist/collection/components/elements/verdocs-template-create/verdocs-template-create.js +1 -1
- package/dist/collection/components/elements/verdocs-template-create/verdocs-template-create.js.map +1 -1
- package/dist/collection/components/elements/verdocs-template-fields/verdocs-template-fields.js +4 -2
- package/dist/collection/components/elements/verdocs-template-fields/verdocs-template-fields.js.map +1 -1
- package/dist/collection/components/elements/verdocs-template-properties/verdocs-template-properties.js +65 -23
- package/dist/collection/components/elements/verdocs-template-properties/verdocs-template-properties.js.map +1 -1
- package/dist/collection/components/elements/verdocs-template-properties/verdocs-template-properties.stories.js +3 -12
- package/dist/collection/components/elements/verdocs-template-properties/verdocs-template-properties.stories.js.map +1 -1
- package/dist/components/verdocs-dropdown2.js +5 -3
- package/dist/components/verdocs-dropdown2.js.map +1 -1
- package/dist/components/verdocs-template-create2.js +1 -1
- package/dist/components/verdocs-template-create2.js.map +1 -1
- package/dist/components/verdocs-template-fields2.js +4 -2
- package/dist/components/verdocs-template-fields2.js.map +1 -1
- package/dist/components/verdocs-template-properties2.js +39 -10
- package/dist/components/verdocs-template-properties2.js.map +1 -1
- package/dist/components/verdocs-text-input2.js +5 -5
- package/dist/components/verdocs-text-input2.js.map +1 -1
- package/dist/docs.json +16 -6
- package/dist/esm/loader.js +1 -1
- package/dist/esm/verdocs-button-panel_3.entry.js +5 -5
- package/dist/esm/verdocs-button-panel_3.entry.js.map +1 -1
- package/dist/esm/verdocs-dropdown_3.entry.js +5 -3
- package/dist/esm/verdocs-dropdown_3.entry.js.map +1 -1
- package/dist/esm/verdocs-template-create_4.entry.js +34 -11
- package/dist/esm/verdocs-template-create_4.entry.js.map +1 -1
- package/dist/esm/verdocs-web-sdk.js +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/loader.js.map +1 -1
- package/dist/esm-es5/verdocs-button-panel_3.entry.js +1 -1
- package/dist/esm-es5/verdocs-button-panel_3.entry.js.map +1 -1
- package/dist/esm-es5/verdocs-dropdown_3.entry.js +1 -1
- package/dist/esm-es5/verdocs-dropdown_3.entry.js.map +1 -1
- package/dist/esm-es5/verdocs-template-create_4.entry.js +1 -1
- package/dist/esm-es5/verdocs-template-create_4.entry.js.map +1 -1
- package/dist/esm-es5/verdocs-web-sdk.js +1 -1
- package/dist/esm-es5/verdocs-web-sdk.js.map +1 -1
- package/dist/types/components/controls/verdocs-dropdown/verdocs-dropdown.d.ts +2 -2
- package/dist/types/components/controls/verdocs-text-input/verdocs-text-input.d.ts +0 -1
- package/dist/types/components/elements/verdocs-template-properties/verdocs-template-properties.d.ts +14 -5
- package/dist/types/components/elements/verdocs-template-properties/verdocs-template-properties.stories.d.ts +3 -3
- package/dist/types/components.d.ts +8 -4
- package/dist/verdocs-web-sdk/p-0a68a117.entry.js +2 -0
- package/dist/verdocs-web-sdk/p-0a68a117.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/p-1c6ecae5.entry.js +2 -0
- package/dist/verdocs-web-sdk/p-1c6ecae5.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/p-1e46b31a.system.entry.js +2 -0
- package/dist/verdocs-web-sdk/p-1e46b31a.system.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/p-38ee6c83.system.entry.js +2 -0
- package/dist/verdocs-web-sdk/p-38ee6c83.system.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/{p-ca92aa8d.entry.js → p-ba2957bf.entry.js} +2 -2
- package/dist/verdocs-web-sdk/p-ba2957bf.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/{p-32caf55b.system.entry.js → p-c68c09d4.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/p-c68c09d4.system.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/p-d05bf10f.system.js +1 -1
- package/dist/verdocs-web-sdk/p-d05bf10f.system.js.map +1 -1
- package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +1 -1
- package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js.map +1 -1
- package/package.json +1 -1
- package/dist/verdocs-web-sdk/p-32caf55b.system.entry.js.map +0 -1
- package/dist/verdocs-web-sdk/p-6b7392f8.entry.js +0 -2
- package/dist/verdocs-web-sdk/p-6b7392f8.entry.js.map +0 -1
- package/dist/verdocs-web-sdk/p-ca92aa8d.entry.js.map +0 -1
- package/dist/verdocs-web-sdk/p-d35c1011.system.entry.js +0 -2
- package/dist/verdocs-web-sdk/p-d35c1011.system.entry.js.map +0 -1
- package/dist/verdocs-web-sdk/p-dceb1619.system.entry.js +0 -2
- package/dist/verdocs-web-sdk/p-dceb1619.system.entry.js.map +0 -1
- package/dist/verdocs-web-sdk/p-eb0a6461.entry.js +0 -2
- package/dist/verdocs-web-sdk/p-eb0a6461.entry.js.map +0 -1
package/dist/esm/loader.js
CHANGED
|
@@ -10,7 +10,7 @@ const patchEsm = () => {
|
|
|
10
10
|
const defineCustomElements = (win, options) => {
|
|
11
11
|
if (typeof window === 'undefined') return Promise.resolve();
|
|
12
12
|
return patchEsm().then(() => {
|
|
13
|
-
return bootstrapLazy([["verdocs-build",[[0,"verdocs-build",{"endpoint":[16],"templateId":[1,"template-id"],"step":[32],"pdfUrl":[32],"template":[32]}]]],["verdocs-sign",[[0,"verdocs-sign",{"endpoint":[16],"documentId":[1,"document-id"],"roleId":[1,"role-id"],"inviteCode":[1,"invite-code"],"recipient":[32],"signerToken":[32],"pdfUrl":[32],"recipientIndex":[32],"document":[32],"fields":[32],"hasSignature":[32],"nextButtonLabel":[32],"focusedField":[32]}]]],["verdocs-field-initial",[[0,"verdocs-field-initial",{"field":[16],"recipient":[16],"disabled":[4],"initials":[1],"editable":[4],"moveable":[4],"roleindex":[2],"tempInitials":[32],"focusField":[64]}]]],["verdocs-auth",[[0,"verdocs-auth",{"endpoint":[16],"visible":[4],"logo":[1],"debug":[4],"isAuthenticated":[32],"displayMode":[32],"username":[32],"password":[32],"loggingIn":[32],"activeSession":[32],"loginError":[32]}]]],["verdocs-field-date",[[0,"verdocs-field-date",{"field":[16],"recipient":[16],"disabled":[4],"editable":[4],"moveable":[4],"roleindex":[2],"focused":[32],"containerId":[32],"focusField":[64]}]]],["verdocs-field-textarea",[[0,"verdocs-field-textarea",{"field":[16],"recipient":[16],"disabled":[4],"editable":[4],"moveable":[4],"roleindex":[2],"focused":[32],"focusField":[64]}]]],["verdocs-field-textbox",[[0,"verdocs-field-textbox",{"field":[16],"recipient":[16],"disabled":[4],"editable":[4],"moveable":[4],"roleindex":[2],"focused":[32],"focusField":[64]}]]],["verdocs-field-timestamp",[[0,"verdocs-field-timestamp",{"field":[16],"recipient":[16],"disabled":[4],"editable":[4],"moveable":[4],"roleindex":[2],"focused":[32],"focusField":[64]}]]],["verdocs-preview",[[0,"verdocs-preview",{"endpoint":[16],"templateId":[1,"template-id"],"pdfUrl":[32],"template":[32]}]]],["verdocs-search",[[0,"verdocs-search",{"endpoint":[16]}]]],["verdocs-contact-picker",[[0,"verdocs-contact-picker",{"endpoint":[16],"templateRole":[16],"contactSuggestions":[16],"name":[32],"email":[32],"phone":[32],"message":[32],"showSuggestions":[32],"showMessage":[32],"delegator":[32]}]]],["verdocs-send",[[0,"verdocs-send",{"endpoint":[16],"templateId":[1,"template-id"],"template":[32],"pdfUrl":[32],"containerId":[32],"rolesAtLevel":[32],"showPickerForId":[32],"sessionContacts":[32],"recipientsAssigned":[32]}]]],["verdocs-field-attachment",[[0,"verdocs-field-attachment",{"field":[16],"recipient":[16],"disabled":[4],"focusField":[64]}]]],["verdocs-kba-dialog",[[0,"verdocs-kba-dialog",{"step":[2],"steps":[2],"helptitle":[1],"helptext":[1],"mode":[1],"label":[1],"placeholder":[1],"choices":[16],"open":[4],"response":[32]}]]],["verdocs-field-dropdown",[[0,"verdocs-field-dropdown",{"field":[16],"recipient":[16],"disabled":[4],"focused":[32],"focusField":[64]}]]],["verdocs-field-payment",[[0,"verdocs-field-payment",{"field":[16],"recipient":[16],"disabled":[4],"fields":[16],"pageNum":[2,"page-num"],"roleName":[1,"role-name"],"fieldId":[1,"field-id"],"recipients":[8],"selectedRoleName":[1,"selected-role-name"],"pdfPages":[16],"currentSignature":[1,"current-signature"],"currentSignatureId":[1,"current-signature-id"],"currentInitial":[1,"current-initial"],"currentInitialId":[1,"current-initial-id"],"focused":[4],"signed":[4],"preparedMessage":[32],"signatureUrl":[32]}]]],["verdocs-organization-card",[[0,"verdocs-organization-card",{"organization":[16]}]]],["verdocs-search-tabs",[[0,"verdocs-search-tabs",{"selected":[32]}]]],["verdocs-status-indicator",[[0,"verdocs-status-indicator",{"size":[1],"theme":[1],"status":[1],"document":[16],"isOpen":[32],"recipientStatusIcons":[32],"containerId":[32]}]]],["verdocs-template-card",[[0,"verdocs-template-card",{"template":[16]}]]],["verdocs-template-tags",[[0,"verdocs-template-tags",{"tags":[16]}]]],["verdocs-toggle",[[0,"verdocs-toggle",{"options":[16],"theme":[1],"selectedOption":[32]}]]],["verdocs-initial-dialog",[[0,"verdocs-initial-dialog",{"initials":[1],"open":[4],"fontLoaded":[32],"enteredInitials":[32],"mode":[32]}]]],["verdocs-ok-dialog",[[0,"verdocs-ok-dialog",{"heading":[1],"message":[1],"open":[4],"cancel":[4]}]]],["verdocs-upload-dialog",[[0,"verdocs-upload-dialog",{"open":[4],"draggingOver":[32],"decodedFiles":[32]}]]],["verdocs-checkbox",[[0,"verdocs-checkbox",{"checked":[4],"name":[1],"value":[1],"disabled":[4]}]]],["verdocs-toggle-button",[[0,"verdocs-toggle-button",{"active":[4],"icon":[1],"label":[1],"size":[1],"_active":[32]}]]],["verdocs-dropdown_3",[[0,"verdocs-dropdown",{"options":[16],"open":[4],"isOpen":[32]}],[0,"verdocs-field-checkbox",{"field":[16],"recipient":[16],"option":[2],"disabled":[4]}],[0,"verdocs-field-radio-button",{"field":[16],"recipient":[16],"option":[2],"disabled":[4]}]]],["verdocs-quick-functions_3",[[0,"verdocs-quick-functions",{"endpoint":[16]}],[0,"verdocs-search-activity",{"endpoint":[16],"type":[1],"options":[8],"emptyMessage":[32],"authFailure":[32],"title":[32],"recent":[32],"saved":[32],"starred":[32]}],[0,"verdocs-search-box",{"endpoint":[16],"placeholder":[1],"type":[1],"query":[1],"grabsFocus":[4,"grabs-focus"],"focusField":[64]}]]],["verdocs-radio-button",[[0,"verdocs-radio-button",{"checked":[4],"name":[1],"value":[1],"disabled":[4]}]]],["verdocs-button",[[0,"verdocs-button",{"label":[1],"startIcon":[1,"start-icon"],"endIcon":[1,"end-icon"],"size":[1],"type":[1],"variant":[1],"disabled":[4]}]]],["verdocs-help-icon_2",[[0,"verdocs-template-sender-dialog",{"value":[1],"open":[4],"newValue":[32]}],[0,"verdocs-help-icon",{"text":[1],"containerId":[32]}]]],["verdocs-field-signature_3",[[0,"verdocs-field-signature",{"field":[16],"name":[1],"recipient":[16],"disabled":[4],"editable":[4],"moveable":[4],"roleindex":[2],"tempSignature":[32],"focusField":[64]}],[0,"verdocs-toolbar-icon",{"text":[1],"icon":[1],"containerId":[32]}],[0,"verdocs-signature-dialog",{"name":[1],"open":[4],"fontLoaded":[32],"enteredName":[32],"mode":[32]}]]],["verdocs-document-page_3",[[0,"verdocs-view",{"endpoint":[16],"rotation":[2],"pageLayers":[16],"source":[1],"loadProgress":[32],"numPages":[32]}],[0,"verdocs-document-page",{"pageNumber":[2,"page-number"],"virtualWidth":[2,"virtual-width"],"virtualHeight":[2,"virtual-height"],"layers":[16],"containerId":[32],"renderedWidth":[32],"renderedHeight":[32],"skipFirstNotification":[32]}],[0,"verdocs-loader"]]],["verdocs-button-panel_3",[[4,"verdocs-button-panel",{"icon":[1]}],[0,"verdocs-select-input",{"value":[1],"label":[1],"options":[16],"disabled":[4],"_value":[32]}],[0,"verdocs-text-input",{"value":[1],"label":[1],"placeholder":[1],"autocomplete":[1],"type":[1],"disabled":[4],"_value":[32]}]]],["verdocs-template-create_4",[[0,"verdocs-template-fields",{"endpoint":[16],"templateId":[1,"template-id"],"pdfUrl":[32],"template":[32]}],[0,"verdocs-template-properties",{"endpoint":[16],"
|
|
13
|
+
return bootstrapLazy([["verdocs-build",[[0,"verdocs-build",{"endpoint":[16],"templateId":[1,"template-id"],"step":[32],"pdfUrl":[32],"template":[32]}]]],["verdocs-sign",[[0,"verdocs-sign",{"endpoint":[16],"documentId":[1,"document-id"],"roleId":[1,"role-id"],"inviteCode":[1,"invite-code"],"recipient":[32],"signerToken":[32],"pdfUrl":[32],"recipientIndex":[32],"document":[32],"fields":[32],"hasSignature":[32],"nextButtonLabel":[32],"focusedField":[32]}]]],["verdocs-field-initial",[[0,"verdocs-field-initial",{"field":[16],"recipient":[16],"disabled":[4],"initials":[1],"editable":[4],"moveable":[4],"roleindex":[2],"tempInitials":[32],"focusField":[64]}]]],["verdocs-auth",[[0,"verdocs-auth",{"endpoint":[16],"visible":[4],"logo":[1],"debug":[4],"isAuthenticated":[32],"displayMode":[32],"username":[32],"password":[32],"loggingIn":[32],"activeSession":[32],"loginError":[32]}]]],["verdocs-field-date",[[0,"verdocs-field-date",{"field":[16],"recipient":[16],"disabled":[4],"editable":[4],"moveable":[4],"roleindex":[2],"focused":[32],"containerId":[32],"focusField":[64]}]]],["verdocs-field-textarea",[[0,"verdocs-field-textarea",{"field":[16],"recipient":[16],"disabled":[4],"editable":[4],"moveable":[4],"roleindex":[2],"focused":[32],"focusField":[64]}]]],["verdocs-field-textbox",[[0,"verdocs-field-textbox",{"field":[16],"recipient":[16],"disabled":[4],"editable":[4],"moveable":[4],"roleindex":[2],"focused":[32],"focusField":[64]}]]],["verdocs-field-timestamp",[[0,"verdocs-field-timestamp",{"field":[16],"recipient":[16],"disabled":[4],"editable":[4],"moveable":[4],"roleindex":[2],"focused":[32],"focusField":[64]}]]],["verdocs-preview",[[0,"verdocs-preview",{"endpoint":[16],"templateId":[1,"template-id"],"pdfUrl":[32],"template":[32]}]]],["verdocs-search",[[0,"verdocs-search",{"endpoint":[16]}]]],["verdocs-contact-picker",[[0,"verdocs-contact-picker",{"endpoint":[16],"templateRole":[16],"contactSuggestions":[16],"name":[32],"email":[32],"phone":[32],"message":[32],"showSuggestions":[32],"showMessage":[32],"delegator":[32]}]]],["verdocs-send",[[0,"verdocs-send",{"endpoint":[16],"templateId":[1,"template-id"],"template":[32],"pdfUrl":[32],"containerId":[32],"rolesAtLevel":[32],"showPickerForId":[32],"sessionContacts":[32],"recipientsAssigned":[32]}]]],["verdocs-field-attachment",[[0,"verdocs-field-attachment",{"field":[16],"recipient":[16],"disabled":[4],"focusField":[64]}]]],["verdocs-kba-dialog",[[0,"verdocs-kba-dialog",{"step":[2],"steps":[2],"helptitle":[1],"helptext":[1],"mode":[1],"label":[1],"placeholder":[1],"choices":[16],"open":[4],"response":[32]}]]],["verdocs-field-dropdown",[[0,"verdocs-field-dropdown",{"field":[16],"recipient":[16],"disabled":[4],"focused":[32],"focusField":[64]}]]],["verdocs-field-payment",[[0,"verdocs-field-payment",{"field":[16],"recipient":[16],"disabled":[4],"fields":[16],"pageNum":[2,"page-num"],"roleName":[1,"role-name"],"fieldId":[1,"field-id"],"recipients":[8],"selectedRoleName":[1,"selected-role-name"],"pdfPages":[16],"currentSignature":[1,"current-signature"],"currentSignatureId":[1,"current-signature-id"],"currentInitial":[1,"current-initial"],"currentInitialId":[1,"current-initial-id"],"focused":[4],"signed":[4],"preparedMessage":[32],"signatureUrl":[32]}]]],["verdocs-organization-card",[[0,"verdocs-organization-card",{"organization":[16]}]]],["verdocs-search-tabs",[[0,"verdocs-search-tabs",{"selected":[32]}]]],["verdocs-status-indicator",[[0,"verdocs-status-indicator",{"size":[1],"theme":[1],"status":[1],"document":[16],"isOpen":[32],"recipientStatusIcons":[32],"containerId":[32]}]]],["verdocs-template-card",[[0,"verdocs-template-card",{"template":[16]}]]],["verdocs-template-tags",[[0,"verdocs-template-tags",{"tags":[16]}]]],["verdocs-toggle",[[0,"verdocs-toggle",{"options":[16],"theme":[1],"selectedOption":[32]}]]],["verdocs-initial-dialog",[[0,"verdocs-initial-dialog",{"initials":[1],"open":[4],"fontLoaded":[32],"enteredInitials":[32],"mode":[32]}]]],["verdocs-ok-dialog",[[0,"verdocs-ok-dialog",{"heading":[1],"message":[1],"open":[4],"cancel":[4]}]]],["verdocs-upload-dialog",[[0,"verdocs-upload-dialog",{"open":[4],"draggingOver":[32],"decodedFiles":[32]}]]],["verdocs-checkbox",[[0,"verdocs-checkbox",{"checked":[4],"name":[1],"value":[1],"disabled":[4]}]]],["verdocs-toggle-button",[[0,"verdocs-toggle-button",{"active":[4],"icon":[1],"label":[1],"size":[1],"_active":[32]}]]],["verdocs-dropdown_3",[[0,"verdocs-dropdown",{"options":[16],"open":[4],"isOpen":[32]}],[0,"verdocs-field-checkbox",{"field":[16],"recipient":[16],"option":[2],"disabled":[4]}],[0,"verdocs-field-radio-button",{"field":[16],"recipient":[16],"option":[2],"disabled":[4]}]]],["verdocs-quick-functions_3",[[0,"verdocs-quick-functions",{"endpoint":[16]}],[0,"verdocs-search-activity",{"endpoint":[16],"type":[1],"options":[8],"emptyMessage":[32],"authFailure":[32],"title":[32],"recent":[32],"saved":[32],"starred":[32]}],[0,"verdocs-search-box",{"endpoint":[16],"placeholder":[1],"type":[1],"query":[1],"grabsFocus":[4,"grabs-focus"],"focusField":[64]}]]],["verdocs-radio-button",[[0,"verdocs-radio-button",{"checked":[4],"name":[1],"value":[1],"disabled":[4]}]]],["verdocs-button",[[0,"verdocs-button",{"label":[1],"startIcon":[1,"start-icon"],"endIcon":[1,"end-icon"],"size":[1],"type":[1],"variant":[1],"disabled":[4]}]]],["verdocs-help-icon_2",[[0,"verdocs-template-sender-dialog",{"value":[1],"open":[4],"newValue":[32]}],[0,"verdocs-help-icon",{"text":[1],"containerId":[32]}]]],["verdocs-field-signature_3",[[0,"verdocs-field-signature",{"field":[16],"name":[1],"recipient":[16],"disabled":[4],"editable":[4],"moveable":[4],"roleindex":[2],"tempSignature":[32],"focusField":[64]}],[0,"verdocs-toolbar-icon",{"text":[1],"icon":[1],"containerId":[32]}],[0,"verdocs-signature-dialog",{"name":[1],"open":[4],"fontLoaded":[32],"enteredName":[32],"mode":[32]}]]],["verdocs-document-page_3",[[0,"verdocs-view",{"endpoint":[16],"rotation":[2],"pageLayers":[16],"source":[1],"loadProgress":[32],"numPages":[32]}],[0,"verdocs-document-page",{"pageNumber":[2,"page-number"],"virtualWidth":[2,"virtual-width"],"virtualHeight":[2,"virtual-height"],"layers":[16],"containerId":[32],"renderedWidth":[32],"renderedHeight":[32],"skipFirstNotification":[32]}],[0,"verdocs-loader"]]],["verdocs-button-panel_3",[[4,"verdocs-button-panel",{"icon":[1]}],[0,"verdocs-select-input",{"value":[1],"label":[1],"options":[16],"disabled":[4],"_value":[32]}],[0,"verdocs-text-input",{"value":[1],"label":[1],"placeholder":[1],"autocomplete":[1],"type":[1],"disabled":[4],"_value":[32]}]]],["verdocs-template-create_4",[[0,"verdocs-template-fields",{"endpoint":[16],"templateId":[1,"template-id"],"pdfUrl":[32],"template":[32]}],[0,"verdocs-template-properties",{"endpoint":[16],"templateId":[1,"template-id"],"template":[32],"name":[32],"sendReminders":[32],"firstReminderDays":[32],"reminderDays":[32]}],[0,"verdocs-template-recipients",{"endpoint":[16],"templateRole":[16],"contactSuggestions":[16],"name":[32],"email":[32],"phone":[32],"message":[32],"showSuggestions":[32],"showMessage":[32],"delegator":[32],"sender":[32],"showingSenderDialog":[32],"orderedRoles":[32]}],[0,"verdocs-template-create",{"endpoint":[16],"file":[32]}]]]], options);
|
|
14
14
|
});
|
|
15
15
|
};
|
|
16
16
|
|
|
@@ -98,14 +98,14 @@ const VerdocsTextInput = class {
|
|
|
98
98
|
this._value = '';
|
|
99
99
|
}
|
|
100
100
|
componentWillLoad() {
|
|
101
|
-
this._value = this.value;
|
|
101
|
+
// this._value = this.value;
|
|
102
102
|
}
|
|
103
103
|
componentDidLoad() { }
|
|
104
|
-
handleInput(e) {
|
|
105
|
-
|
|
106
|
-
}
|
|
104
|
+
// handleInput(e: any) {
|
|
105
|
+
// this._value = e.target.value;
|
|
106
|
+
// }
|
|
107
107
|
render() {
|
|
108
|
-
return (h(Host, { class: "input-field" }, h("label", null, this.label ? h("div", { class: "input-label" }, this.label + ':') : h("div", null), h("input", { type: this.type, value: this.
|
|
108
|
+
return (h(Host, { class: "input-field" }, h("label", null, this.label ? h("div", { class: "input-label" }, this.label + ':') : h("div", null), h("input", { type: this.type, value: this.value, class: "input-element", "data-lpignore": "true", disabled: this.disabled, placeholder: this.placeholder, autoComplete: this.autocomplete }))));
|
|
109
109
|
}
|
|
110
110
|
};
|
|
111
111
|
VerdocsTextInput.style = verdocsTextInputCss;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"verdocs-button-panel.verdocs-select-input.verdocs-text-input.entry.js","mappings":";;;AAAA,MAAM,qBAAqB,GAAG,8xDAA8xD;;MCW/yD,kBAAkB;;;IAkC7B,YAAO,GAAG,KAAK,CAAC;gBAzBO,EAAE;;EAEzB,kBAAkB;IAChB,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACxC,IAAI,IAAI,CAAC,cAAc,EAAE;MACvB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B,OAAO,EAAE,CAAC,IAAI,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,GACjC,CACI,CACH,EACP;GACH;;;;;;","names":[],"sources":["./src/components/controls/verdocs-button-panel/verdocs-button-panel.scss?tag=verdocs-button-panel","./src/components/controls/verdocs-button-panel/verdocs-button-panel.tsx","./src/components/controls/verdocs-select-input/verdocs-select-input.scss?tag=verdocs-select-input","./src/components/controls/verdocs-select-input/verdocs-select-input.tsx","./src/components/controls/verdocs-text-input/verdocs-text-input.scss?tag=verdocs-text-input","./src/components/controls/verdocs-text-input/verdocs-text-input.tsx"],"sourcesContent":["@import '../../../theme.scss';\n\nverdocs-button-panel {\n font-family: $verdocs-primary-font;\n display: inline-block;\n\n .icon {\n display: inline-block;\n cursor: pointer;\n\n svg {\n fill: $light-border-color;\n }\n\n &:hover {\n svg {\n fill: $verdocs-grey-4;\n }\n }\n }\n}\n\n.verdocs-button-panel-content {\n font-family: $verdocs-primary-font;\n box-shadow: 0 0 10px 1px #999999;\n display: none;\n background: #ffffff;\n color: $label-color;\n width: 280px;\n font-weight: bold;\n padding: 15px;\n font-size: 14px;\n position: relative;\n border-radius: 4px;\n z-index: 10000;\n\n .arrow,\n .arrow::before {\n position: absolute;\n width: 8px;\n height: 8px;\n background: inherit;\n }\n\n .arrow {\n visibility: hidden;\n top: -4px;\n }\n\n .arrow::before {\n visibility: visible;\n content: '';\n transform: rotate(45deg);\n }\n\n &[data-show] {\n display: block;\n }\n\n &[data-popper-placement^='top'] > .arrow {\n bottom: -4px;\n }\n\n &[data-popper-placement^='bottom'] > .arrow {\n top: -4px;\n }\n\n &[data-popper-placement^='left'] > .arrow {\n right: -4px;\n }\n\n &[data-popper-placement^='right'] > .arrow {\n left: -4px;\n }\n\n h6 {\n color: $verdocs-grey-0;\n font-size: 16px;\n font-weight: bold;\n margin: 0 0 8px 0;\n }\n\n form {\n margin: 0;\n padding: 0;\n display: flex;\n flex-direction: column;\n }\n\n label {\n display: block;\n font-size: 14px;\n font-weight: bold;\n margin: 0 0 3px 0;\n color: $verdocs-grey-1;\n }\n\n input {\n flex: 1;\n height: 34px;\n display: flex;\n font-size: 14px;\n margin: 0 0 10px 0;\n }\n}\n","import {createPopper, Instance} from '@popperjs/core';\nimport {Component, h, Host, Prop} from '@stencil/core';\n\n/**\n * Displays a clickable icon. When clicked, a customizable drop-down panel will be displayed.\n */\n@Component({\n tag: 'verdocs-button-panel',\n styleUrl: 'verdocs-button-panel.scss',\n shadow: false,\n})\nexport class VerdocsButtonPanel {\n iconEl: HTMLDivElement;\n panelEl: HTMLDivElement;\n hiderEl?: HTMLDivElement;\n popperInstance: Instance;\n\n /**\n * SVG icon to display\n */\n @Prop() icon: string = '';\n\n componentDidRender() {\n document.body.appendChild(this.panelEl);\n if (this.popperInstance) {\n this.popperInstance.destroy();\n }\n\n this.popperInstance = createPopper(this.iconEl, this.panelEl, {\n // placement: 'top-end',\n // modifiers: [{name: 'offset', options: {offset: [0, 10]}}],\n });\n }\n\n disconnectedCallback() {\n if (this.popperInstance) {\n this.popperInstance.destroy();\n this.popperInstance = null;\n }\n\n if (this.panelEl) {\n this.panelEl.remove();\n }\n }\n\n showing = false;\n toggle(e: any) {\n e.stopPropagation();\n\n if (this.showing) {\n this.panelEl?.removeAttribute('data-show');\n this.hiderEl?.remove();\n this.showing = false;\n } else {\n this.panelEl?.setAttribute('data-show', '');\n this.popperInstance?.update().catch(() => {});\n this.showing = true;\n\n this.hiderEl = document.createElement('div');\n this.hiderEl.style.zIndex = '100';\n this.hiderEl.style.position = 'absolute';\n this.hiderEl.style.top = '0px';\n this.hiderEl.style.left = '0px';\n this.hiderEl.style.right = '0px';\n this.hiderEl.style.bottom = '0px';\n this.hiderEl.onclick = (e: any) => this.toggle(e);\n document.body.appendChild(this.hiderEl);\n }\n }\n\n render() {\n return (\n <Host>\n <div class=\"icon\" innerHTML={this.icon} onClick={(e: any) => this.toggle(e)} ref={el => (this.iconEl = el)} />\n <div role=\"tooltip\" class=\"verdocs-button-panel-content\" data-popper-placement=\"bottom\" ref={el => (this.panelEl = el as HTMLDivElement)}>\n <div data-popper-arrow=\"true\" class=\"arrow\" />\n <slot />\n </div>\n </Host>\n );\n }\n}\n","@import '../../../theme.scss';\n\nverdocs-select-input {\n font-family: $primary-font;\n box-sizing: border-box;\n margin: 0 0 10px 0;\n display: block;\n\n .input-element {\n box-sizing: border-box;\n border: 1px solid $border-color;\n border-radius: 4px;\n background: $verdocs-grey-4;\n color: #000;\n width: 100%;\n font-size: 16px;\n height: 28px;\n padding: 4px 12px;\n\n &::placeholder {\n color: $light-disabled-color;\n opacity: 1;\n }\n\n &:focus {\n border: 1px solid $border-color-highlight;\n }\n }\n\n .input-label {\n display: block;\n color: $label-color-light;\n font-weight: 700;\n font-size: 14px;\n margin: 0 0 4px 0;\n }\n}\n","import {Component, Prop, State, Host, h, Event, EventEmitter} from '@stencil/core';\n\n/**\n * Display a text input field. This is just a standard HTML input field with minimal markup to fit the\n * visual styles of the other components. Note that events \"bubble\" from the input field to the container,\n * so you can subscribe to the same DOM events (input, blur, etc) that a normal input would emmit.\n */\n@Component({\n tag: 'verdocs-select-input',\n styleUrl: 'verdocs-select-input.scss',\n})\nexport class VerdocsSelectInput {\n /**\n * The initial value for the input field.\n */\n @Prop() value: string = '';\n\n /**\n * The label for the field.\n */\n @Prop() label: string = '';\n\n /**\n * The options to list.\n */\n @Prop() options: {label: string; value: string}[];\n\n /**\n * Should the field be disabled?\n */\n @Prop() disabled: boolean = false;\n\n @State() _value: string = '';\n\n /**\n * Event fired when the selection has changed\n */\n @Event({composed: true}) fieldChange: EventEmitter<string>;\n\n componentWillLoad() {\n this._value = this.value;\n }\n\n componentDidLoad() {}\n\n handleInput(e: any) {\n this._value = e.target.value;\n this.fieldChange?.emit(e.target.value);\n }\n\n render() {\n return (\n <Host class=\"input-field\">\n <label>\n {this.label ? <div class=\"input-label\">{this.label + ':'}</div> : <div />}\n <select class=\"input-element\" disabled={this.disabled} onInput={e => this.handleInput(e)}>\n {this.options.map(option => (\n <option value={option.value} selected={option.value === this.value}>\n {option.label}\n </option>\n ))}\n </select>\n </label>\n </Host>\n );\n }\n}\n","@import '../../../theme.scss';\n\nverdocs-text-input {\n font-family: $primary-font;\n box-sizing: border-box;\n margin: 0 0 10px 0;\n display: block;\n\n .input-element {\n box-sizing: border-box;\n border: 1px solid $border-color;\n border-radius: 4px;\n background: $verdocs-grey-4;\n color: #000;\n width: 100%;\n font-size: 16px;\n height: 28px;\n padding: 4px 12px;\n outline: none;\n\n &::placeholder {\n color: $light-disabled-color;\n opacity: 1;\n }\n\n &:focus {\n outline: 1px solid $border-color-highlight;\n }\n }\n\n .input-label {\n display: block;\n color: $label-color-light;\n font-weight: 700;\n font-size: 14px;\n margin: 0 0 4px 0;\n }\n}\n","import {Component, Prop, State, Host, h} from '@stencil/core';\n\n/**\n * Display a text input field. This is just a standard HTML input field with minimal markup to fit the\n * visual styles of the other components. Note that events \"bubble\" from the input field to the container,\n * so you can subscribe to the same DOM events (input, blur, etc) that a normal input would emmit.\n */\n@Component({\n tag: 'verdocs-text-input',\n styleUrl: 'verdocs-text-input.scss',\n})\nexport class VerdocsTextInput {\n /**\n * The initial value for the input field.\n */\n @Prop() value: string = '';\n\n /**\n * The label for the field.\n */\n @Prop() label: string = '';\n\n /**\n * The placeholder for the field.\n */\n @Prop() placeholder: string = '';\n\n /**\n * If desired, the autocomplete attribute to set.\n */\n @Prop() autocomplete: string = '';\n\n /**\n * The type of field to render. Only text-type fields are allowed here for the current styling. Additional types\n * (e.g. a date picker) will be supported by other controls in the future.\n */\n @Prop() type: 'text' | 'password' | 'email' | 'number' | 'search' | 'tel' | 'url' = 'text';\n\n /**\n * Should the field be disabled?\n */\n @Prop() disabled: boolean = false;\n\n @State() _value: string = '';\n\n componentWillLoad() {\n this._value = this.value;\n }\n\n componentDidLoad() {}\n\n handleInput(e: any) {\n this._value = e.target.value;\n }\n\n render() {\n return (\n <Host class=\"input-field\">\n <label>\n {this.label ? <div class=\"input-label\">{this.label + ':'}</div> : <div />}\n <input\n type={this.type}\n value={this._value}\n class=\"input-element\"\n data-lpignore=\"true\"\n disabled={this.disabled}\n placeholder={this.placeholder}\n autoComplete={this.autocomplete}\n onInput={e => this.handleInput(e)}\n />\n </label>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
1
|
+
{"file":"verdocs-button-panel.verdocs-select-input.verdocs-text-input.entry.js","mappings":";;;AAAA,MAAM,qBAAqB,GAAG,8xDAA8xD;;MCW/yD,kBAAkB;;;IAkC7B,YAAO,GAAG,KAAK,CAAC;gBAzBO,EAAE;;EAEzB,kBAAkB;IAChB,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACxC,IAAI,IAAI,CAAC,cAAc,EAAE;MACvB,IAAI,CAAC,cAAc,CAAC,OAAO,EAAE,CAAC;KAC/B;IAED,IAAI,CAAC,cAAc,GAAG,YAAY,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,OAAO,EAAE;;;KAG7D,CAAC,CAAC;GACJ;EAED,oBAAoB;IAClB,IAAI,IAAI,CAAC,cAAc,EAAE;MACvB,IAAI,CAAC,cAAc,CAAC,OAAO,EAAE,CAAC;MAC9B,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC;KAC5B;IAED,IAAI,IAAI,CAAC,OAAO,EAAE;MAChB,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,CAAC;KACvB;GACF;EAGD,MAAM,CAAC,CAAM;;IACX,CAAC,CAAC,eAAe,EAAE,CAAC;IAEpB,IAAI,IAAI,CAAC,OAAO,EAAE;MAChB,MAAA,IAAI,CAAC,OAAO,0CAAE,eAAe,CAAC,WAAW,CAAC,CAAC;MAC3C,MAAA,IAAI,CAAC,OAAO,0CAAE,MAAM,EAAE,CAAC;MACvB,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;KACtB;SAAM;MACL,MAAA,IAAI,CAAC,OAAO,0CAAE,YAAY,CAAC,WAAW,EAAE,EA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ACvB,iBACG,IAAI,CAAC,KAAK,GAAG,WAAK,KAAK,EAAC,aAAa,IAAE,IAAI,CAAC,KAAK,GAAG,GAAG,CAAO,GAAG,cAAO,EACzE,aACE,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,KAAK,EAAE,IAAI,CAAC,KAAK,EACjB,KAAK,EAAC,eAAe,mBACP,MAAM,EACpB,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,WAAW,EAAE,IAAI,CAAC,WAAW,EAC7B,YAAY,EAAE,IAAI,CAAC,YAAY,GAE/B,CACI,CACH,EACP;GACH;;;;;;","names":[],"sources":["./src/components/controls/verdocs-button-panel/verdocs-button-panel.scss?tag=verdocs-button-panel","./src/components/controls/verdocs-button-panel/verdocs-button-panel.tsx","./src/components/controls/verdocs-select-input/verdocs-select-input.scss?tag=verdocs-select-input","./src/components/controls/verdocs-select-input/verdocs-select-input.tsx","./src/components/controls/verdocs-text-input/verdocs-text-input.scss?tag=verdocs-text-input","./src/components/controls/verdocs-text-input/verdocs-text-input.tsx"],"sourcesContent":["@import '../../../theme.scss';\n\nverdocs-button-panel {\n font-family: $verdocs-primary-font;\n display: inline-block;\n\n .icon {\n display: inline-block;\n cursor: pointer;\n\n svg {\n fill: $light-border-color;\n }\n\n &:hover {\n svg {\n fill: $verdocs-grey-4;\n }\n }\n }\n}\n\n.verdocs-button-panel-content {\n font-family: $verdocs-primary-font;\n box-shadow: 0 0 10px 1px #999999;\n display: none;\n background: #ffffff;\n color: $label-color;\n width: 280px;\n font-weight: bold;\n padding: 15px;\n font-size: 14px;\n position: relative;\n border-radius: 4px;\n z-index: 10000;\n\n .arrow,\n .arrow::before {\n position: absolute;\n width: 8px;\n height: 8px;\n background: inherit;\n }\n\n .arrow {\n visibility: hidden;\n top: -4px;\n }\n\n .arrow::before {\n visibility: visible;\n content: '';\n transform: rotate(45deg);\n }\n\n &[data-show] {\n display: block;\n }\n\n &[data-popper-placement^='top'] > .arrow {\n bottom: -4px;\n }\n\n &[data-popper-placement^='bottom'] > .arrow {\n top: -4px;\n }\n\n &[data-popper-placement^='left'] > .arrow {\n right: -4px;\n }\n\n &[data-popper-placement^='right'] > .arrow {\n left: -4px;\n }\n\n h6 {\n color: $verdocs-grey-0;\n font-size: 16px;\n font-weight: bold;\n margin: 0 0 8px 0;\n }\n\n form {\n margin: 0;\n padding: 0;\n display: flex;\n flex-direction: column;\n }\n\n label {\n display: block;\n font-size: 14px;\n font-weight: bold;\n margin: 0 0 3px 0;\n color: $verdocs-grey-1;\n }\n\n input {\n flex: 1;\n height: 34px;\n display: flex;\n font-size: 14px;\n margin: 0 0 10px 0;\n }\n}\n","import {createPopper, Instance} from '@popperjs/core';\nimport {Component, h, Host, Prop} from '@stencil/core';\n\n/**\n * Displays a clickable icon. When clicked, a customizable drop-down panel will be displayed.\n */\n@Component({\n tag: 'verdocs-button-panel',\n styleUrl: 'verdocs-button-panel.scss',\n shadow: false,\n})\nexport class VerdocsButtonPanel {\n iconEl: HTMLDivElement;\n panelEl: HTMLDivElement;\n hiderEl?: HTMLDivElement;\n popperInstance: Instance;\n\n /**\n * SVG icon to display\n */\n @Prop() icon: string = '';\n\n componentDidRender() {\n document.body.appendChild(this.panelEl);\n if (this.popperInstance) {\n this.popperInstance.destroy();\n }\n\n this.popperInstance = createPopper(this.iconEl, this.panelEl, {\n // placement: 'top-end',\n // modifiers: [{name: 'offset', options: {offset: [0, 10]}}],\n });\n }\n\n disconnectedCallback() {\n if (this.popperInstance) {\n this.popperInstance.destroy();\n this.popperInstance = null;\n }\n\n if (this.panelEl) {\n this.panelEl.remove();\n }\n }\n\n showing = false;\n toggle(e: any) {\n e.stopPropagation();\n\n if (this.showing) {\n this.panelEl?.removeAttribute('data-show');\n this.hiderEl?.remove();\n this.showing = false;\n } else {\n this.panelEl?.setAttribute('data-show', '');\n this.popperInstance?.update().catch(() => {});\n this.showing = true;\n\n this.hiderEl = document.createElement('div');\n this.hiderEl.style.zIndex = '100';\n this.hiderEl.style.position = 'absolute';\n this.hiderEl.style.top = '0px';\n this.hiderEl.style.left = '0px';\n this.hiderEl.style.right = '0px';\n this.hiderEl.style.bottom = '0px';\n this.hiderEl.onclick = (e: any) => this.toggle(e);\n document.body.appendChild(this.hiderEl);\n }\n }\n\n render() {\n return (\n <Host>\n <div class=\"icon\" innerHTML={this.icon} onClick={(e: any) => this.toggle(e)} ref={el => (this.iconEl = el)} />\n <div role=\"tooltip\" class=\"verdocs-button-panel-content\" data-popper-placement=\"bottom\" ref={el => (this.panelEl = el as HTMLDivElement)}>\n <div data-popper-arrow=\"true\" class=\"arrow\" />\n <slot />\n </div>\n </Host>\n );\n }\n}\n","@import '../../../theme.scss';\n\nverdocs-select-input {\n font-family: $primary-font;\n box-sizing: border-box;\n margin: 0 0 10px 0;\n display: block;\n\n .input-element {\n box-sizing: border-box;\n border: 1px solid $border-color;\n border-radius: 4px;\n background: $verdocs-grey-4;\n color: #000;\n width: 100%;\n font-size: 16px;\n height: 28px;\n padding: 4px 12px;\n\n &::placeholder {\n color: $light-disabled-color;\n opacity: 1;\n }\n\n &:focus {\n border: 1px solid $border-color-highlight;\n }\n }\n\n .input-label {\n display: block;\n color: $label-color-light;\n font-weight: 700;\n font-size: 14px;\n margin: 0 0 4px 0;\n }\n}\n","import {Component, Prop, State, Host, h, Event, EventEmitter} from '@stencil/core';\n\n/**\n * Display a text input field. This is just a standard HTML input field with minimal markup to fit the\n * visual styles of the other components. Note that events \"bubble\" from the input field to the container,\n * so you can subscribe to the same DOM events (input, blur, etc) that a normal input would emmit.\n */\n@Component({\n tag: 'verdocs-select-input',\n styleUrl: 'verdocs-select-input.scss',\n})\nexport class VerdocsSelectInput {\n /**\n * The initial value for the input field.\n */\n @Prop() value: string = '';\n\n /**\n * The label for the field.\n */\n @Prop() label: string = '';\n\n /**\n * The options to list.\n */\n @Prop() options: {label: string; value: string}[];\n\n /**\n * Should the field be disabled?\n */\n @Prop() disabled: boolean = false;\n\n @State() _value: string = '';\n\n /**\n * Event fired when the selection has changed\n */\n @Event({composed: true}) fieldChange: EventEmitter<string>;\n\n componentWillLoad() {\n this._value = this.value;\n }\n\n componentDidLoad() {}\n\n handleInput(e: any) {\n this._value = e.target.value;\n this.fieldChange?.emit(e.target.value);\n }\n\n render() {\n return (\n <Host class=\"input-field\">\n <label>\n {this.label ? <div class=\"input-label\">{this.label + ':'}</div> : <div />}\n <select class=\"input-element\" disabled={this.disabled} onInput={e => this.handleInput(e)}>\n {this.options.map(option => (\n <option value={option.value} selected={option.value === this.value}>\n {option.label}\n </option>\n ))}\n </select>\n </label>\n </Host>\n );\n }\n}\n","@import '../../../theme.scss';\n\nverdocs-text-input {\n font-family: $primary-font;\n box-sizing: border-box;\n margin: 0 0 10px 0;\n display: block;\n\n .input-element {\n box-sizing: border-box;\n border: 1px solid $border-color;\n border-radius: 4px;\n background: $verdocs-grey-4;\n color: #000;\n width: 100%;\n font-size: 16px;\n height: 28px;\n padding: 4px 12px;\n outline: none;\n\n &::placeholder {\n color: $light-disabled-color;\n opacity: 1;\n }\n\n &:focus {\n outline: 1px solid $border-color-highlight;\n }\n }\n\n .input-label {\n display: block;\n color: $label-color-light;\n font-weight: 700;\n font-size: 14px;\n margin: 0 0 4px 0;\n }\n}\n","import {Component, Prop, State, Host, h} from '@stencil/core';\n\n/**\n * Display a text input field. This is just a standard HTML input field with minimal markup to fit the\n * visual styles of the other components. Note that events \"bubble\" from the input field to the container,\n * so you can subscribe to the same DOM events (input, blur, etc) that a normal input would emmit.\n */\n@Component({\n tag: 'verdocs-text-input',\n styleUrl: 'verdocs-text-input.scss',\n})\nexport class VerdocsTextInput {\n /**\n * The initial value for the input field.\n */\n @Prop() value: string = '';\n\n /**\n * The label for the field.\n */\n @Prop() label: string = '';\n\n /**\n * The placeholder for the field.\n */\n @Prop() placeholder: string = '';\n\n /**\n * If desired, the autocomplete attribute to set.\n */\n @Prop() autocomplete: string = '';\n\n /**\n * The type of field to render. Only text-type fields are allowed here for the current styling. Additional types\n * (e.g. a date picker) will be supported by other controls in the future.\n */\n @Prop() type: 'text' | 'password' | 'email' | 'number' | 'search' | 'tel' | 'url' = 'text';\n\n /**\n * Should the field be disabled?\n */\n @Prop() disabled: boolean = false;\n\n @State() _value: string = '';\n\n componentWillLoad() {\n // this._value = this.value;\n }\n\n componentDidLoad() {}\n\n // handleInput(e: any) {\n // this._value = e.target.value;\n // }\n\n render() {\n return (\n <Host class=\"input-field\">\n <label>\n {this.label ? <div class=\"input-label\">{this.label + ':'}</div> : <div />}\n <input\n type={this.type}\n value={this.value}\n class=\"input-element\"\n data-lpignore=\"true\"\n disabled={this.disabled}\n placeholder={this.placeholder}\n autoComplete={this.autocomplete}\n // onInput={e => this.handleInput(e)}\n />\n </label>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -21,7 +21,8 @@ const VerdocsDropdown = class {
|
|
|
21
21
|
componentDidLoad() {
|
|
22
22
|
this.popper = createPopper(this.dropdownButton, this.dropdownMenu, { placement: 'bottom-start', modifiers: [{ name: 'offset', options: { offset: [0, 6] } }] });
|
|
23
23
|
}
|
|
24
|
-
handleSelectOption(option) {
|
|
24
|
+
handleSelectOption(e, option) {
|
|
25
|
+
e.stopPropagation();
|
|
25
26
|
this.isOpen = false;
|
|
26
27
|
this.optionSelected.emit(option);
|
|
27
28
|
this.hide();
|
|
@@ -47,7 +48,8 @@ const VerdocsDropdown = class {
|
|
|
47
48
|
}
|
|
48
49
|
this.hide();
|
|
49
50
|
}
|
|
50
|
-
toggleDropdown() {
|
|
51
|
+
toggleDropdown(e) {
|
|
52
|
+
e.stopPropagation();
|
|
51
53
|
if (this.isOpen) {
|
|
52
54
|
this.hide();
|
|
53
55
|
}
|
|
@@ -67,7 +69,7 @@ const VerdocsDropdown = class {
|
|
|
67
69
|
}
|
|
68
70
|
render() {
|
|
69
71
|
var _a;
|
|
70
|
-
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:
|
|
72
|
+
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: e => this.toggleDropdown(e), 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: e => this.handleSelectOption(e, option), class: "option", disabled: option.disabled }, option.label))))));
|
|
71
73
|
}
|
|
72
74
|
};
|
|
73
75
|
VerdocsDropdown.style = verdocsDropdownCss;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"verdocs-dropdown.verdocs-field-checkbox.verdocs-field-radio-button.entry.js","mappings":";;;;;;;AAAA,MAAM,kBAAkB,GAAG,2lCAA2lC;;MCoBzmC,eAAe;;;;mBAQO,EAAE;;;;EAkBnC,iBAAiB;IACf,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC;GAC3B;EAED,gBAAgB;IACd,IAAI,CAAC,MAAM,GAAG,YAAY,CAAC,IAAI,CAAC,cAAc,EAAE,IAAI,CAAC,YAAY,EAAE,EAAC,SAAS,EAAE,cAAc,EAAE,SAAS,EAAE,CAAC,EAAC,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,EAAC,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,CAAC,CAAC;GAC3J;EAED,kBAAkB,CAAC,MAAmB;IACpC,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;IACpB,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACjC,IAAI,CAAC,IAAI,EAAE,CAAC;GACb;;;EAID,YAAY;;IACV,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC;IACnB,IAAI,CAAC,Y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QAAQ,EAAE,QAAQ,CAAC,KAAK,EACxB,KAAK,EAAE,QAAQ,CAAC,KAAK,EACrB,IAAI,EAAE,QAAQ,CAAC,IAAI,EACnB,EAAE,EAAE,GAAG,QAAQ,CAAC,IAAI,IAAI,QAAQ,CAAC,KAAK,EAAE,EACxC,OAAO,EAAE,QAAQ,CAAC,OAAO,EACzB,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,CAAC,QAAQ,EAC3B,QAAQ,EAAE,CAAC,IAAI,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,GACnC,EACF,aAAO,OAAO,EAAE,GAAG,QAAQ,CAAC,IAAI,IAAI,QAAQ,CAAC,KAAK,EAAE,GAAI,CACnD,EACP;GACH;;;;;;","names":[],"sources":["./src/components/controls/verdocs-dropdown/verdocs-dropdown.scss?tag=verdocs-dropdown","./src/components/controls/verdocs-dropdown/verdocs-dropdown.tsx","./src/components/elements/verdocs-field-checkbox-group/verdocs-field-checkbox.scss?tag=verdocs-field-checkbox","./src/components/elements/verdocs-field-checkbox-group/verdocs-field-checkbox.tsx","./src/components/elements/verdocs-field-radio-button-group/verdocs-field-radio-button.scss?tag=verdocs-field-radio-button","./src/components/elements/verdocs-field-radio-button-group/verdocs-field-radio-button.tsx"],"sourcesContent":["@import '../../../theme.scss';\n\nverdocs-dropdown {\n font-family: $primary-font;\n display: block;\n\n .arrow {\n width: 32px;\n height: 26px;\n background: #fff;\n cursor: pointer;\n border-radius: 4px;\n align-items: center;\n display: inline-flex;\n border: 1px solid $light-border-color;\n justify-content: center;\n }\n\n .arrow svg {\n fill: $primary-color;\n transition: 0.3s;\n }\n\n .items {\n width: 200px;\n display: none;\n z-index: 10000;\n border-radius: 5px;\n background: $medium-bg;\n border: 1px solid $item-border-color;\n }\n\n .items[data-show] {\n display: block;\n }\n\n .option {\n width: 100%;\n color: #fff;\n border: none;\n display: block;\n text-align: left;\n background: none;\n padding: 10px 20px;\n }\n\n .option:hover {\n cursor: pointer;\n background: $primary-color;\n }\n\n .option[disabled] {\n color: $light-disabled-color;\n }\n\n .option[disabled]:hover {\n color: $light-disabled-color;\n cursor: inherit;\n background: transparent;\n }\n\n &.open {\n .items {\n display: block;\n }\n\n .arrow {\n background: $secondary-color;\n border: 1px solid $border-color;\n }\n\n .arrow svg {\n transform: scaleY(-1);\n fill: #fff;\n }\n }\n}\n","import {Host} from '@stencil/core';\nimport {createPopper, Instance} from '@popperjs/core';\nimport {Component, Prop, State, h, Event, EventEmitter} from '@stencil/core';\nimport SortDown from './down-arrow.svg';\n\nexport interface IMenuOption {\n label: string;\n id?: any;\n faIcon?: any;\n disabled?: boolean;\n}\n\n/**\n * Display a drop-down menu button. A menu of the specified options will be displayed when the button is pressed. The menu will be hidden\n * when the button is pressed again, or an option is selected.\n */\n@Component({\n tag: 'verdocs-dropdown',\n styleUrl: 'verdocs-dropdown.scss',\n})\nexport class VerdocsDropdown {\n private dropdownButton?: HTMLButtonElement;\n private dropdownMenu?: HTMLDivElement;\n private popper?: Instance;\n\n /**\n * The menu options to display.\n */\n @Prop() options: IMenuOption[] = [];\n\n /**\n * If set, the component will be open by default. This is primarily intended to be used for testing.\n */\n @Prop() open: boolean;\n\n /**\n * If set, the component will be open by default.\n */\n @State() isOpen: boolean;\n\n /**\n * Event fired when a menu option is clicked.\n * Web Component events need to be \"composed\" to cross the Shadow DOM and be received by parent frameworks.\n */\n @Event({composed: true}) optionSelected: EventEmitter<IMenuOption>;\n\n componentWillLoad() {\n this.isOpen = !!this.open;\n }\n\n componentDidLoad() {\n this.popper = createPopper(this.dropdownButton, this.dropdownMenu, {placement: 'bottom-start', modifiers: [{name: 'offset', options: {offset: [0, 6]}}]});\n }\n\n handleSelectOption(option: IMenuOption) {\n this.isOpen = false;\n this.optionSelected.emit(option);\n this.hide();\n }\n\n // See https://popper.js.org/docs/v2/tutorial/\n // What we're doing here is clearing event listeners when they aren't needed, to increase performance in lists\n showDropdown() {\n this.isOpen = true;\n this.dropdownMenu.setAttribute('data-show', '');\n this.dropdownMenu.removeAttribute('aria-hidden');\n\n this.popper?.setOptions(options => ({\n ...options,\n modifiers: [...options.modifiers, {name: 'eventListeners', enabled: true}],\n }));\n\n this.popper?.update();\n }\n\n handleHideDropdown(e: any) {\n if (e?.target?.localName === 'button' && e?.target?.className === 'arrow') {\n // This event is fired when a menu element is clicked because the button \"loses focus\" then too\n return;\n }\n\n this.hide();\n }\n\n toggleDropdown() {\n if (this.isOpen) {\n this.hide();\n } else {\n this.showDropdown();\n }\n }\n\n hide() {\n this.isOpen = false;\n this.dropdownMenu.removeAttribute('data-show');\n this.dropdownMenu.setAttribute('aria-hidden', 'true');\n this.popper?.setOptions(options => ({\n ...options,\n modifiers: [...options.modifiers, {name: 'eventListeners', enabled: false}],\n }));\n }\n\n render() {\n return (\n <Host class={{storybook: !!window?.['STORYBOOK_ENV'], open: !!this.isOpen}}>\n <button\n class=\"arrow\"\n innerHTML={SortDown}\n aria-label=\"Open Menu\"\n onClick={() => this.toggleDropdown()}\n onBlur={e => this.handleHideDropdown(e)}\n ref={el => (this.dropdownButton = el as HTMLButtonElement)}\n />\n\n <div class=\"items\" aria-hidden={!this.open} ref={el => (this.dropdownMenu = el as HTMLDivElement)}>\n {this.options?.map(option => (\n <button onClick={() => this.handleSelectOption(option)} class=\"option\" disabled={option.disabled}>\n {option.label}\n </button>\n ))}\n </div>\n </Host>\n );\n }\n}\n","@import '../../../theme.scss';\n\n// See https://www.kallmanation.com/styling-a-checkbox-with-only-css\nverdocs-field-checkbox {\n font-family: $verdocs-primary-font;\n font-size: 11px;\n position: relative;\n background-color: transparent;\n transform-origin: bottom left;\n\n &.disabled {\n opacity: 0.5;\n }\n\n label > input[type='checkbox'] {\n display: none;\n }\n\n label > input[type='checkbox'] + *::before {\n content: '';\n position: absolute;\n display: block;\n top: 1px;\n left: 1px;\n width: 10px;\n height: 10px;\n border-radius: 2px;\n background: $verdocs-grey-3;\n border: 1px solid rgba(0, 0, 0, 0.7);\n }\n\n label > input[type='checkbox']:checked + * {\n color: $verdocs-green;\n }\n\n label > input[type='checkbox']:checked + *::before {\n content: '✓';\n color: white;\n text-align: center;\n background: $verdocs-green;\n border-color: $verdocs-green;\n }\n\n &.required {\n label > input[type='checkbox'] + *::before {\n border: 1px solid $verdocs-red-1;\n }\n }\n\n &.hide {\n display: none;\n }\n\n &.focused {\n animation: verdocs-field-pulse 0.75s 2;\n }\n}\n","import {ITemplateField} from '@verdocs/js-sdk/Templates/Types';\nimport {IDocumentField, IRecipient} from '@verdocs/js-sdk/Documents/Types';\nimport {Component, h, Host, Prop, Event, EventEmitter} from '@stencil/core';\nimport {getFieldSettings} from '../../../utils/utils';\n\n/**\n * Displays a signature field. Various field types are supported, including traditional Signature and Initials types as well as\n * input types like text and checkbox.\n */\n@Component({\n tag: 'verdocs-field-checkbox',\n styleUrl: 'verdocs-field-checkbox.scss',\n shadow: false,\n})\nexport class VerdocsFieldCheckbox {\n /**\n * The document or template field to display.\n */\n @Prop() field: IDocumentField | ITemplateField | null = null;\n\n /**\n * The recipient completing the form, if known.\n */\n @Prop() recipient?: IRecipient;\n\n /**\n * The index of the settings option this particular checkbox is for\n */\n @Prop() option: number = 0;\n\n /**\n * If set, overrides the field's settings object. Primarily used to support \"preview\" modes where all fields are disabled.\n */\n @Prop() disabled?: boolean = false;\n\n /**\n * Event fired when the input field value changes. Note that this will only be fired on blur, tab-out, ENTER key press, etc.\n * It is generally the best event to subscribe to than `input` for most cases EXCEPT autocomplete fields that need to see every\n * keypress.\n */\n @Event({composed: true}) fieldChange: EventEmitter<{option: number; value: boolean}>;\n\n handleChange(e: any) {\n this.fieldChange.emit({option: this.option, value: e.target.checked});\n }\n\n render() {\n const settings = getFieldSettings(this.field);\n const option = settings.options?.[this.option] ?? {checked: false};\n\n const disabled = this.disabled ?? settings.disabled ?? false;\n return (\n <Host class={{required: settings.required, disabled}}>\n <label>\n <input type=\"checkbox\" tabIndex={settings.order} checked={option.checked} disabled={disabled} required={settings.required} onChange={e => this.handleChange(e)} />\n <span />\n </label>\n </Host>\n );\n }\n}\n","@import '../../../theme.scss';\n\n// See https://www.sliderrevolution.com/resources/styling-radio-buttons/\nverdocs-field-radio-button {\n font-family: $verdocs-primary-font;\n width: 14px;\n height: 14px;\n display: block;\n font-size: 11px;\n position: relative;\n background-color: transparent;\n transform-origin: bottom left;\n border-radius: 100%;\n\n &.disabled {\n opacity: 0.5;\n }\n\n input[type='radio'] {\n position: absolute;\n opacity: 0;\n\n + label {\n &:before {\n content: '';\n background: $verdocs-grey-3;\n border-radius: 100%;\n border: 1px solid rgba(0, 0, 0, 0.6);\n display: inline-block;\n width: 10px;\n height: 10px;\n position: absolute;\n left: 1px;\n top: 1px;\n cursor: pointer;\n text-align: center;\n transition: all 250ms ease;\n }\n }\n\n &:checked {\n + label {\n &:before {\n background-color: $verdocs-green;\n box-shadow: inset 0 0 0 2px $verdocs-grey-3;\n }\n }\n }\n\n &:focus {\n + label {\n &:before {\n outline: none;\n border-color: $verdocs-green;\n }\n }\n }\n\n &:disabled {\n + label {\n &:before {\n box-shadow: inset 0 0 0 4px $verdocs-grey-3;\n border-color: darken($verdocs-grey-3, 25%);\n background: darken($verdocs-grey-3, 25%);\n }\n }\n }\n\n + label {\n &:empty {\n &:before {\n margin-right: 0;\n }\n }\n }\n }\n\n &.required {\n input[type='radio'] {\n + label {\n &:before {\n border: 1px solid $verdocs-red-1;\n }\n }\n }\n }\n\n &.hide {\n display: none;\n }\n\n &.focused {\n animation: verdocs-field-pulse 0.75s 2;\n }\n}\n","import {ITemplateField} from '@verdocs/js-sdk/Templates/Types';\nimport {IDocumentField, IRecipient} from '@verdocs/js-sdk/Documents/Types';\nimport {Component, h, Host, Prop, Event, EventEmitter} from '@stencil/core';\nimport {getFieldSettings} from '../../../utils/utils';\n\n/**\n * Displays a radio button.\n */\n@Component({\n tag: 'verdocs-field-radio-button',\n styleUrl: 'verdocs-field-radio-button.scss',\n shadow: false,\n})\nexport class VerdocsFieldRadioButton {\n /**\n * The document or template field to display.\n */\n @Prop() field: IDocumentField | ITemplateField | null = null;\n\n /**\n * The recipient completing the form, if known.\n */\n @Prop() recipient?: IRecipient;\n\n /**\n * The index of the settings option this particular checkbox is for\n */\n @Prop() option: number = 0;\n\n /**\n * If set, overrides the field's settings object. Primarily used to support \"preview\" modes where all fields are disabled.\n */\n @Prop() disabled?: boolean = false;\n\n /**\n * Event fired when the input field value changes. Note that this will only be fired on blur, tab-out, ENTER key press, etc.\n * It is generally the best event to subscribe to than `input` for most cases EXCEPT autocomplete fields that need to see every\n * keypress.\n */\n @Event({composed: true}) fieldChange: EventEmitter<{option: number; value: boolean}>;\n\n handleChange(e: any) {\n console.log('changed', e);\n this.fieldChange.emit({option: this.option, value: e.target.checked});\n }\n\n render() {\n const settings = getFieldSettings(this.field);\n const disabled = this.disabled ?? settings.disabled ?? false;\n return (\n <Host class={{required: settings.required, disabled}}>\n <input\n type=\"radio\"\n tabIndex={settings.order}\n value={settings.value}\n name={settings.name}\n id={`${settings.name}=${settings.value}`}\n checked={settings.checked}\n disabled={disabled}\n required={settings.required}\n onChange={e => this.handleChange(e)}\n />\n <label htmlFor={`${settings.name}=${settings.value}`} />\n </Host>\n );\n }\n}\n"],"version":3}
|
|
1
|
+
{"file":"verdocs-dropdown.verdocs-field-checkbox.verdocs-field-radio-button.entry.js","mappings":";;;;;;;AAAA,MAAM,kBAAkB,GAAG,2lCAA2lC;;MCoBzmC,eAAe;;;;mBAQO,EAAE;;;;EAkBnC,iBAAiB;IACf,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC;GAC3B;EAED,gBAAgB;IACd,IAAI,CAAC,MAAM,GAAG,YAAY,CAAC,IAAI,CAAC,cAAc,EAAE,IAAI,CAAC,YAAY,EAAE,EAAC,SAAS,EAAE,cAAc,EAAE,SAAS,EAAE,CAAC,EAAC,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,EAAC,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,EA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,EAAE,IAAI,CAAC,MAAM,EAAE,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC,OAAO,EAAC,CAAC,CAAC;GACvE;EAED,MAAM;;IACJ,MAAM,QAAQ,GAAG,gBAAgB,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAC9C,MAAM,QAAQ,GAAG,MAAA,MAAA,IAAI,CAAC,QAAQ,mCAAI,QAAQ,CAAC,QAAQ,mCAAI,KAAK,CAAC;IAC7D,QACE,EAAC,IAAI,IAAC,KAAK,EAAE,EAAC,QAAQ,EAAE,QAAQ,CAAC,QAAQ,EAAE,QAAQ,EAAC,IAClD,aACE,IAAI,EAAC,OAAO,EACZ,QAAQ,EAAE,QAAQ,CAAC,KAAK,EACxB,KAAK,EAAE,QAAQ,CAAC,KAAK,EACrB,IAAI,EAAE,QAAQ,CAAC,IAAI,EACnB,EAAE,EAAE,GAAG,QAAQ,CAAC,IAAI,IAAI,QAAQ,CAAC,KAAK,EAAE,EACxC,OAAO,EAAE,QAAQ,CAAC,OAAO,EACzB,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,CAAC,QAAQ,EAC3B,QAAQ,EAAE,CAAC,IAAI,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,GACnC,EACF,aAAO,OAAO,EAAE,GAAG,QAAQ,CAAC,IAAI,IAAI,QAAQ,CAAC,KAAK,EAAE,GAAI,CACnD,EACP;GACH;;;;;;","names":[],"sources":["./src/components/controls/verdocs-dropdown/verdocs-dropdown.scss?tag=verdocs-dropdown","./src/components/controls/verdocs-dropdown/verdocs-dropdown.tsx","./src/components/elements/verdocs-field-checkbox-group/verdocs-field-checkbox.scss?tag=verdocs-field-checkbox","./src/components/elements/verdocs-field-checkbox-group/verdocs-field-checkbox.tsx","./src/components/elements/verdocs-field-radio-button-group/verdocs-field-radio-button.scss?tag=verdocs-field-radio-button","./src/components/elements/verdocs-field-radio-button-group/verdocs-field-radio-button.tsx"],"sourcesContent":["@import '../../../theme.scss';\n\nverdocs-dropdown {\n font-family: $primary-font;\n display: block;\n\n .arrow {\n width: 32px;\n height: 26px;\n background: #fff;\n cursor: pointer;\n border-radius: 4px;\n align-items: center;\n display: inline-flex;\n border: 1px solid $light-border-color;\n justify-content: center;\n }\n\n .arrow svg {\n fill: $primary-color;\n transition: 0.3s;\n }\n\n .items {\n width: 200px;\n display: none;\n z-index: 10000;\n border-radius: 5px;\n background: $medium-bg;\n border: 1px solid $item-border-color;\n }\n\n .items[data-show] {\n display: block;\n }\n\n .option {\n width: 100%;\n color: #fff;\n border: none;\n display: block;\n text-align: left;\n background: none;\n padding: 10px 20px;\n }\n\n .option:hover {\n cursor: pointer;\n background: $primary-color;\n }\n\n .option[disabled] {\n color: $light-disabled-color;\n }\n\n .option[disabled]:hover {\n color: $light-disabled-color;\n cursor: inherit;\n background: transparent;\n }\n\n &.open {\n .items {\n display: block;\n }\n\n .arrow {\n background: $secondary-color;\n border: 1px solid $border-color;\n }\n\n .arrow svg {\n transform: scaleY(-1);\n fill: #fff;\n }\n }\n}\n","import {Host} from '@stencil/core';\nimport {createPopper, Instance} from '@popperjs/core';\nimport {Component, Prop, State, h, Event, EventEmitter} from '@stencil/core';\nimport SortDown from './down-arrow.svg';\n\nexport interface IMenuOption {\n label: string;\n id?: any;\n faIcon?: any;\n disabled?: boolean;\n}\n\n/**\n * Display a drop-down menu button. A menu of the specified options will be displayed when the button is pressed. The menu will be hidden\n * when the button is pressed again, or an option is selected.\n */\n@Component({\n tag: 'verdocs-dropdown',\n styleUrl: 'verdocs-dropdown.scss',\n})\nexport class VerdocsDropdown {\n private dropdownButton?: HTMLButtonElement;\n private dropdownMenu?: HTMLDivElement;\n private popper?: Instance;\n\n /**\n * The menu options to display.\n */\n @Prop() options: IMenuOption[] = [];\n\n /**\n * If set, the component will be open by default. This is primarily intended to be used for testing.\n */\n @Prop() open: boolean;\n\n /**\n * If set, the component will be open by default.\n */\n @State() isOpen: boolean;\n\n /**\n * Event fired when a menu option is clicked.\n * Web Component events need to be \"composed\" to cross the Shadow DOM and be received by parent frameworks.\n */\n @Event({composed: true}) optionSelected: EventEmitter<IMenuOption>;\n\n componentWillLoad() {\n this.isOpen = !!this.open;\n }\n\n componentDidLoad() {\n this.popper = createPopper(this.dropdownButton, this.dropdownMenu, {placement: 'bottom-start', modifiers: [{name: 'offset', options: {offset: [0, 6]}}]});\n }\n\n handleSelectOption(e: any, option: IMenuOption) {\n e.stopPropagation();\n this.isOpen = false;\n this.optionSelected.emit(option);\n this.hide();\n }\n\n // See https://popper.js.org/docs/v2/tutorial/\n // What we're doing here is clearing event listeners when they aren't needed, to increase performance in lists\n showDropdown() {\n this.isOpen = true;\n this.dropdownMenu.setAttribute('data-show', '');\n this.dropdownMenu.removeAttribute('aria-hidden');\n\n this.popper?.setOptions(options => ({\n ...options,\n modifiers: [...options.modifiers, {name: 'eventListeners', enabled: true}],\n }));\n\n this.popper?.update();\n }\n\n handleHideDropdown(e: any) {\n if (e?.target?.localName === 'button' && e?.target?.className === 'arrow') {\n // This event is fired when a menu element is clicked because the button \"loses focus\" then too\n return;\n }\n\n this.hide();\n }\n\n toggleDropdown(e: any) {\n e.stopPropagation();\n\n if (this.isOpen) {\n this.hide();\n } else {\n this.showDropdown();\n }\n }\n\n hide() {\n this.isOpen = false;\n this.dropdownMenu.removeAttribute('data-show');\n this.dropdownMenu.setAttribute('aria-hidden', 'true');\n this.popper?.setOptions(options => ({\n ...options,\n modifiers: [...options.modifiers, {name: 'eventListeners', enabled: false}],\n }));\n }\n\n render() {\n return (\n <Host class={{storybook: !!window?.['STORYBOOK_ENV'], open: !!this.isOpen}}>\n <button\n class=\"arrow\"\n innerHTML={SortDown}\n aria-label=\"Open Menu\"\n onClick={e => this.toggleDropdown(e)}\n onBlur={e => this.handleHideDropdown(e)}\n ref={el => (this.dropdownButton = el as HTMLButtonElement)}\n />\n\n <div class=\"items\" aria-hidden={!this.open} ref={el => (this.dropdownMenu = el as HTMLDivElement)}>\n {this.options?.map(option => (\n <button onClick={e => this.handleSelectOption(e, option)} class=\"option\" disabled={option.disabled}>\n {option.label}\n </button>\n ))}\n </div>\n </Host>\n );\n }\n}\n","@import '../../../theme.scss';\n\n// See https://www.kallmanation.com/styling-a-checkbox-with-only-css\nverdocs-field-checkbox {\n font-family: $verdocs-primary-font;\n font-size: 11px;\n position: relative;\n background-color: transparent;\n transform-origin: bottom left;\n\n &.disabled {\n opacity: 0.5;\n }\n\n label > input[type='checkbox'] {\n display: none;\n }\n\n label > input[type='checkbox'] + *::before {\n content: '';\n position: absolute;\n display: block;\n top: 1px;\n left: 1px;\n width: 10px;\n height: 10px;\n border-radius: 2px;\n background: $verdocs-grey-3;\n border: 1px solid rgba(0, 0, 0, 0.7);\n }\n\n label > input[type='checkbox']:checked + * {\n color: $verdocs-green;\n }\n\n label > input[type='checkbox']:checked + *::before {\n content: '✓';\n color: white;\n text-align: center;\n background: $verdocs-green;\n border-color: $verdocs-green;\n }\n\n &.required {\n label > input[type='checkbox'] + *::before {\n border: 1px solid $verdocs-red-1;\n }\n }\n\n &.hide {\n display: none;\n }\n\n &.focused {\n animation: verdocs-field-pulse 0.75s 2;\n }\n}\n","import {ITemplateField} from '@verdocs/js-sdk/Templates/Types';\nimport {IDocumentField, IRecipient} from '@verdocs/js-sdk/Documents/Types';\nimport {Component, h, Host, Prop, Event, EventEmitter} from '@stencil/core';\nimport {getFieldSettings} from '../../../utils/utils';\n\n/**\n * Displays a signature field. Various field types are supported, including traditional Signature and Initials types as well as\n * input types like text and checkbox.\n */\n@Component({\n tag: 'verdocs-field-checkbox',\n styleUrl: 'verdocs-field-checkbox.scss',\n shadow: false,\n})\nexport class VerdocsFieldCheckbox {\n /**\n * The document or template field to display.\n */\n @Prop() field: IDocumentField | ITemplateField | null = null;\n\n /**\n * The recipient completing the form, if known.\n */\n @Prop() recipient?: IRecipient;\n\n /**\n * The index of the settings option this particular checkbox is for\n */\n @Prop() option: number = 0;\n\n /**\n * If set, overrides the field's settings object. Primarily used to support \"preview\" modes where all fields are disabled.\n */\n @Prop() disabled?: boolean = false;\n\n /**\n * Event fired when the input field value changes. Note that this will only be fired on blur, tab-out, ENTER key press, etc.\n * It is generally the best event to subscribe to than `input` for most cases EXCEPT autocomplete fields that need to see every\n * keypress.\n */\n @Event({composed: true}) fieldChange: EventEmitter<{option: number; value: boolean}>;\n\n handleChange(e: any) {\n this.fieldChange.emit({option: this.option, value: e.target.checked});\n }\n\n render() {\n const settings = getFieldSettings(this.field);\n const option = settings.options?.[this.option] ?? {checked: false};\n\n const disabled = this.disabled ?? settings.disabled ?? false;\n return (\n <Host class={{required: settings.required, disabled}}>\n <label>\n <input type=\"checkbox\" tabIndex={settings.order} checked={option.checked} disabled={disabled} required={settings.required} onChange={e => this.handleChange(e)} />\n <span />\n </label>\n </Host>\n );\n }\n}\n","@import '../../../theme.scss';\n\n// See https://www.sliderrevolution.com/resources/styling-radio-buttons/\nverdocs-field-radio-button {\n font-family: $verdocs-primary-font;\n width: 14px;\n height: 14px;\n display: block;\n font-size: 11px;\n position: relative;\n background-color: transparent;\n transform-origin: bottom left;\n border-radius: 100%;\n\n &.disabled {\n opacity: 0.5;\n }\n\n input[type='radio'] {\n position: absolute;\n opacity: 0;\n\n + label {\n &:before {\n content: '';\n background: $verdocs-grey-3;\n border-radius: 100%;\n border: 1px solid rgba(0, 0, 0, 0.6);\n display: inline-block;\n width: 10px;\n height: 10px;\n position: absolute;\n left: 1px;\n top: 1px;\n cursor: pointer;\n text-align: center;\n transition: all 250ms ease;\n }\n }\n\n &:checked {\n + label {\n &:before {\n background-color: $verdocs-green;\n box-shadow: inset 0 0 0 2px $verdocs-grey-3;\n }\n }\n }\n\n &:focus {\n + label {\n &:before {\n outline: none;\n border-color: $verdocs-green;\n }\n }\n }\n\n &:disabled {\n + label {\n &:before {\n box-shadow: inset 0 0 0 4px $verdocs-grey-3;\n border-color: darken($verdocs-grey-3, 25%);\n background: darken($verdocs-grey-3, 25%);\n }\n }\n }\n\n + label {\n &:empty {\n &:before {\n margin-right: 0;\n }\n }\n }\n }\n\n &.required {\n input[type='radio'] {\n + label {\n &:before {\n border: 1px solid $verdocs-red-1;\n }\n }\n }\n }\n\n &.hide {\n display: none;\n }\n\n &.focused {\n animation: verdocs-field-pulse 0.75s 2;\n }\n}\n","import {ITemplateField} from '@verdocs/js-sdk/Templates/Types';\nimport {IDocumentField, IRecipient} from '@verdocs/js-sdk/Documents/Types';\nimport {Component, h, Host, Prop, Event, EventEmitter} from '@stencil/core';\nimport {getFieldSettings} from '../../../utils/utils';\n\n/**\n * Displays a radio button.\n */\n@Component({\n tag: 'verdocs-field-radio-button',\n styleUrl: 'verdocs-field-radio-button.scss',\n shadow: false,\n})\nexport class VerdocsFieldRadioButton {\n /**\n * The document or template field to display.\n */\n @Prop() field: IDocumentField | ITemplateField | null = null;\n\n /**\n * The recipient completing the form, if known.\n */\n @Prop() recipient?: IRecipient;\n\n /**\n * The index of the settings option this particular checkbox is for\n */\n @Prop() option: number = 0;\n\n /**\n * If set, overrides the field's settings object. Primarily used to support \"preview\" modes where all fields are disabled.\n */\n @Prop() disabled?: boolean = false;\n\n /**\n * Event fired when the input field value changes. Note that this will only be fired on blur, tab-out, ENTER key press, etc.\n * It is generally the best event to subscribe to than `input` for most cases EXCEPT autocomplete fields that need to see every\n * keypress.\n */\n @Event({composed: true}) fieldChange: EventEmitter<{option: number; value: boolean}>;\n\n handleChange(e: any) {\n console.log('changed', e);\n this.fieldChange.emit({option: this.option, value: e.target.checked});\n }\n\n render() {\n const settings = getFieldSettings(this.field);\n const disabled = this.disabled ?? settings.disabled ?? false;\n return (\n <Host class={{required: settings.required, disabled}}>\n <input\n type=\"radio\"\n tabIndex={settings.order}\n value={settings.value}\n name={settings.name}\n id={`${settings.name}=${settings.value}`}\n checked={settings.checked}\n disabled={disabled}\n required={settings.required}\n onChange={e => this.handleChange(e)}\n />\n <label htmlFor={`${settings.name}=${settings.value}`} />\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -84,7 +84,7 @@ const VerdocsTemplateCreate = class {
|
|
|
84
84
|
console.log('created template', template);
|
|
85
85
|
const template_document = await createTemplateDocument(this.endpoint, template.id, this.file);
|
|
86
86
|
console.log('created document', template_document);
|
|
87
|
-
for await (let pageNumber of Array.from(Array(
|
|
87
|
+
for await (let pageNumber of Array.from(Array(template_document.page_numbers).keys(), n => n + 1)) {
|
|
88
88
|
console.log('Updating page', pageNumber);
|
|
89
89
|
const page = await createPage(this.endpoint, template.id, { sequence: pageNumber, page_number: pageNumber, document_id: template_document.id });
|
|
90
90
|
console.log('Created page', page);
|
|
@@ -151,8 +151,9 @@ const VerdocsTemplateFields = class {
|
|
|
151
151
|
this.template = null;
|
|
152
152
|
}
|
|
153
153
|
async componentWillLoad() {
|
|
154
|
-
var _a;
|
|
154
|
+
var _a, _b, _c, _d;
|
|
155
155
|
try {
|
|
156
|
+
this.endpoint.loadSession();
|
|
156
157
|
console.log(`[PREVIEW] Loading template ${this.templateId}`);
|
|
157
158
|
state.templateId = this.templateId;
|
|
158
159
|
const template = await getTemplate(this.endpoint, this.templateId);
|
|
@@ -176,7 +177,7 @@ const VerdocsTemplateFields = class {
|
|
|
176
177
|
}
|
|
177
178
|
catch (e) {
|
|
178
179
|
console.log('[PREVIEW] Error with preview session', e);
|
|
179
|
-
|
|
180
|
+
(_b = this.sdkError) === null || _b === void 0 ? void 0 : _b.emit(new SDKError(e.message, (_c = e.response) === null || _c === void 0 ? void 0 : _c.status, (_d = e.response) === null || _d === void 0 ? void 0 : _d.data));
|
|
180
181
|
}
|
|
181
182
|
}
|
|
182
183
|
componentDidRender() {
|
|
@@ -263,16 +264,31 @@ const VerdocsTemplateProperties = class {
|
|
|
263
264
|
registerInstance(this, hostRef);
|
|
264
265
|
this.cancel = createEvent(this, "cancel", 7);
|
|
265
266
|
this.settingsUpdated = createEvent(this, "settingsUpdated", 7);
|
|
267
|
+
this.sdkError = createEvent(this, "sdkError", 7);
|
|
266
268
|
this.endpoint = VerdocsEndpoint.getDefault();
|
|
267
|
-
this.
|
|
269
|
+
this.templateId = '';
|
|
270
|
+
this.template = null;
|
|
271
|
+
this.name = '';
|
|
268
272
|
this.sendReminders = false;
|
|
273
|
+
this.firstReminderDays = '1';
|
|
274
|
+
this.reminderDays = '1';
|
|
269
275
|
}
|
|
270
|
-
componentWillLoad() {
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
+
async componentWillLoad() {
|
|
277
|
+
var _a, _b, _c;
|
|
278
|
+
try {
|
|
279
|
+
this.endpoint.loadSession();
|
|
280
|
+
console.log(`[PROPERTIES] Loading template ${this.templateId}`);
|
|
281
|
+
state.templateId = this.templateId;
|
|
282
|
+
const template = await getTemplate(this.endpoint, this.templateId);
|
|
283
|
+
console.log('[PROPERTIES] Got template', template);
|
|
284
|
+
this.template = template;
|
|
285
|
+
this.name = template.name;
|
|
286
|
+
this.sendReminders = template.reminder_id !== null;
|
|
287
|
+
}
|
|
288
|
+
catch (e) {
|
|
289
|
+
console.log('[PROPERTIES] Error loading template', e);
|
|
290
|
+
(_a = this.sdkError) === null || _a === void 0 ? void 0 : _a.emit(new SDKError(e.message, (_b = e.response) === null || _b === void 0 ? void 0 : _b.status, (_c = e.response) === null || _c === void 0 ? void 0 : _c.data));
|
|
291
|
+
}
|
|
276
292
|
}
|
|
277
293
|
handleMessageChange(e) {
|
|
278
294
|
console.log(e);
|
|
@@ -292,7 +308,14 @@ const VerdocsTemplateProperties = class {
|
|
|
292
308
|
// });
|
|
293
309
|
}
|
|
294
310
|
render() {
|
|
295
|
-
|
|
311
|
+
console.log('vals', { firstReminderDays: this.firstReminderDays, reminderDays: this.reminderDays, name: this.name });
|
|
312
|
+
return (h("form", { onSubmit: e => e.preventDefault(), onClick: e => e.stopPropagation(), autocomplete: "off" }, h("h5", null, "Template Name"), h("fieldset", null, h("verdocs-text-input", { value: this.name, autocomplete: "off", onInput: (e) => {
|
|
313
|
+
this.name = e.target.value;
|
|
314
|
+
} })), h("h5", null, "Reminders"), h("fieldset", null, h("div", { class: "input-row" }, h("label", null, "Send Automatic Reminders"), h("verdocs-checkbox", { name: "automatic-reminders", checked: this.sendReminders, value: "on", onSelected: e => (this.sendReminders = e.detail.value === 'on') })), h("div", { class: "input-row" }, h("label", null, "Days Before First Reminder"), h("verdocs-text-input", { value: this.firstReminderDays, onInput: (e) => {
|
|
315
|
+
this.firstReminderDays = e.target.value;
|
|
316
|
+
} })), h("div", { class: "input-row" }, h("label", null, "Days Between Reminders"), h("verdocs-text-input", { value: this.reminderDays, onInput: (e) => {
|
|
317
|
+
this.firstReminderDays = e.target.value;
|
|
318
|
+
} }))), h("h5", null, "Template Visibility"), h("fieldset", null, h("div", { class: "radio-row" }, h("verdocs-radio-button", { name: "visibility", checked: true, value: "private" }), h("label", { htmlFor: "verdocs-radio-button-visibility-private" }, h("div", { class: "title" }, "Private"), h("div", { class: "description" }, "Only you can share and use this template"))), h("div", { class: "radio-row" }, h("verdocs-radio-button", { name: "visibility", checked: true, value: "shared" }), h("label", { htmlFor: "verdocs-radio-button-visibility-shared" }, h("div", { class: "title" }, "Shared to your organization"), h("div", { class: "description" }, "Give access to your organization to share and use this template"))), h("div", { class: "radio-row" }, h("verdocs-radio-button", { name: "visibility", checked: true, value: "shared_public" }), h("label", { htmlFor: "verdocs-radio-button-visibility-shared_public" }, h("div", { class: "title" }, "Shared to your organization and Public"), h("div", { class: "description" }, "Give access to your organization to share this template, and anyone on the Web can find and use this template"))), h("div", { class: "radio-row" }, h("verdocs-radio-button", { name: "visibility", checked: true, value: "public" }), h("label", { htmlFor: "verdocs-radio-button-visibility-public" }, h("div", { class: "title" }, "Public"), h("div", { class: "description" }, "Anyone on the Web can find and use this template")))), h("div", { class: "buttons" }, h("div", { class: "flex-fill" }), h("verdocs-button", { variant: "outline", label: "Cancel", size: "small", onPress: e => this.handleCancel(e) }), h("verdocs-button", { label: "OK", size: "small", onPress: e => this.handleSubmit(e) }))));
|
|
296
319
|
}
|
|
297
320
|
};
|
|
298
321
|
VerdocsTemplateProperties.style = verdocsTemplatePropertiesCss;
|