@verdocs/web-sdk 5.0.41 → 5.0.42

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.
Files changed (97) hide show
  1. package/dist/cjs/loader.cjs.js +1 -1
  2. package/dist/cjs/verdocs-contact-picker_2.cjs.entry.js +18 -33
  3. package/dist/cjs/verdocs-contact-picker_2.cjs.entry.js.map +1 -1
  4. package/dist/cjs/verdocs-field-attachment_13.cjs.entry.js +0 -2
  5. package/dist/cjs/verdocs-field-attachment_13.cjs.entry.js.map +1 -1
  6. package/dist/cjs/verdocs-preview_7.cjs.entry.js +0 -1
  7. package/dist/cjs/verdocs-preview_7.cjs.entry.js.map +1 -1
  8. package/dist/cjs/verdocs-sign.cjs.entry.js +114 -90
  9. package/dist/cjs/verdocs-sign.cjs.entry.js.map +1 -1
  10. package/dist/cjs/verdocs-web-sdk.cjs.js +1 -1
  11. package/dist/collection/components/embeds/verdocs-send/verdocs-send.js +0 -1
  12. package/dist/collection/components/embeds/verdocs-send/verdocs-send.js.map +1 -1
  13. package/dist/collection/components/embeds/verdocs-sign/verdocs-sign.js +121 -95
  14. package/dist/collection/components/embeds/verdocs-sign/verdocs-sign.js.map +1 -1
  15. package/dist/collection/components/envelopes/verdocs-contact-picker/verdocs-contact-picker.js +7 -8
  16. package/dist/collection/components/envelopes/verdocs-contact-picker/verdocs-contact-picker.js.map +1 -1
  17. package/dist/collection/components/fields/verdocs-field-date/verdocs-field-date.js +0 -2
  18. package/dist/collection/components/fields/verdocs-field-date/verdocs-field-date.js.map +1 -1
  19. package/dist/components/{p-36368807.js → p-4a04090c.js} +3 -3
  20. package/dist/components/{p-36368807.js.map → p-4a04090c.js.map} +1 -1
  21. package/dist/components/{p-c1d312d8.js → p-4a4bf38c.js} +2 -3
  22. package/dist/components/p-4a4bf38c.js.map +1 -0
  23. package/dist/components/{p-6bfb8eba.js → p-73a39d5a.js} +19 -34
  24. package/dist/components/p-73a39d5a.js.map +1 -0
  25. package/dist/components/{p-795b4192.js → p-91eae04c.js} +3 -3
  26. package/dist/components/{p-795b4192.js.map → p-91eae04c.js.map} +1 -1
  27. package/dist/components/{p-52c195dd.js → p-92cce3dc.js} +1 -3
  28. package/dist/components/{p-52c195dd.js.map → p-92cce3dc.js.map} +1 -1
  29. package/dist/components/{p-7481c7db.js → p-b474c324.js} +2 -2
  30. package/dist/components/{p-7481c7db.js.map → p-b474c324.js.map} +1 -1
  31. package/dist/components/verdocs-build.js +6 -6
  32. package/dist/components/verdocs-contact-picker.js +1 -1
  33. package/dist/components/verdocs-field-date.js +1 -1
  34. package/dist/components/verdocs-preview.js +1 -1
  35. package/dist/components/verdocs-send.js +1 -1
  36. package/dist/components/verdocs-sign.js +117 -92
  37. package/dist/components/verdocs-sign.js.map +1 -1
  38. package/dist/components/verdocs-template-document-page.js +1 -1
  39. package/dist/components/verdocs-template-fields.js +1 -1
  40. package/dist/esm/loader.js +1 -1
  41. package/dist/esm/verdocs-contact-picker_2.entry.js +18 -33
  42. package/dist/esm/verdocs-contact-picker_2.entry.js.map +1 -1
  43. package/dist/esm/verdocs-field-attachment_13.entry.js +0 -2
  44. package/dist/esm/verdocs-field-attachment_13.entry.js.map +1 -1
  45. package/dist/esm/verdocs-preview_7.entry.js +0 -1
  46. package/dist/esm/verdocs-preview_7.entry.js.map +1 -1
  47. package/dist/esm/verdocs-sign.entry.js +115 -91
  48. package/dist/esm/verdocs-sign.entry.js.map +1 -1
  49. package/dist/esm/verdocs-web-sdk.js +1 -1
  50. package/dist/esm-es5/loader.js +1 -1
  51. package/dist/esm-es5/loader.js.map +1 -1
  52. package/dist/esm-es5/verdocs-contact-picker_2.entry.js +1 -1
  53. package/dist/esm-es5/verdocs-contact-picker_2.entry.js.map +1 -1
  54. package/dist/esm-es5/verdocs-field-attachment_13.entry.js +1 -1
  55. package/dist/esm-es5/verdocs-field-attachment_13.entry.js.map +1 -1
  56. package/dist/esm-es5/verdocs-preview_7.entry.js +1 -1
  57. package/dist/esm-es5/verdocs-preview_7.entry.js.map +1 -1
  58. package/dist/esm-es5/verdocs-sign.entry.js +1 -1
  59. package/dist/esm-es5/verdocs-sign.entry.js.map +1 -1
  60. package/dist/esm-es5/verdocs-web-sdk.js +1 -1
  61. package/dist/esm-es5/verdocs-web-sdk.js.map +1 -1
  62. package/dist/types/components/embeds/verdocs-sign/verdocs-sign.d.ts +4 -2
  63. package/dist/verdocs-web-sdk/p-02e09803.system.entry.js +2 -0
  64. package/dist/verdocs-web-sdk/p-02e09803.system.entry.js.map +1 -0
  65. package/dist/verdocs-web-sdk/p-0c1898f6.system.js +1 -1
  66. package/dist/verdocs-web-sdk/p-0c1898f6.system.js.map +1 -1
  67. package/dist/verdocs-web-sdk/p-46263e7a.system.entry.js +2 -0
  68. package/dist/verdocs-web-sdk/p-46263e7a.system.entry.js.map +1 -0
  69. package/dist/verdocs-web-sdk/p-4d92a71b.entry.js +2 -0
  70. package/dist/verdocs-web-sdk/p-4d92a71b.entry.js.map +1 -0
  71. package/dist/verdocs-web-sdk/{p-7f982a59.system.entry.js → p-6cfb51e3.system.entry.js} +2 -2
  72. package/dist/verdocs-web-sdk/p-6cfb51e3.system.entry.js.map +1 -0
  73. package/dist/verdocs-web-sdk/{p-62bde242.system.entry.js → p-89c69404.system.entry.js} +2 -2
  74. package/dist/verdocs-web-sdk/p-89c69404.system.entry.js.map +1 -0
  75. package/dist/verdocs-web-sdk/p-d47c58de.entry.js +2 -0
  76. package/dist/verdocs-web-sdk/p-d47c58de.entry.js.map +1 -0
  77. package/dist/verdocs-web-sdk/{p-7962eb00.entry.js → p-e7ca4f15.entry.js} +2 -2
  78. package/dist/verdocs-web-sdk/p-e7ca4f15.entry.js.map +1 -0
  79. package/dist/verdocs-web-sdk/{p-dda88c7f.entry.js → p-e8268ed9.entry.js} +2 -2
  80. package/dist/verdocs-web-sdk/p-e8268ed9.entry.js.map +1 -0
  81. package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +1 -1
  82. package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js.map +1 -1
  83. package/package.json +3 -3
  84. package/dist/components/p-6bfb8eba.js.map +0 -1
  85. package/dist/components/p-c1d312d8.js.map +0 -1
  86. package/dist/verdocs-web-sdk/p-1c8788f5.entry.js +0 -2
  87. package/dist/verdocs-web-sdk/p-1c8788f5.entry.js.map +0 -1
  88. package/dist/verdocs-web-sdk/p-62bde242.system.entry.js.map +0 -1
  89. package/dist/verdocs-web-sdk/p-7962eb00.entry.js.map +0 -1
  90. package/dist/verdocs-web-sdk/p-7f982a59.system.entry.js.map +0 -1
  91. package/dist/verdocs-web-sdk/p-a4dd8302.system.entry.js +0 -2
  92. package/dist/verdocs-web-sdk/p-a4dd8302.system.entry.js.map +0 -1
  93. package/dist/verdocs-web-sdk/p-dda88c7f.entry.js.map +0 -1
  94. package/dist/verdocs-web-sdk/p-df6ab9e9.entry.js +0 -2
  95. package/dist/verdocs-web-sdk/p-df6ab9e9.entry.js.map +0 -1
  96. package/dist/verdocs-web-sdk/p-e5684a49.system.entry.js +0 -2
  97. package/dist/verdocs-web-sdk/p-e5684a49.system.entry.js.map +0 -1
@@ -67,7 +67,6 @@ export class VerdocsFieldDate {
67
67
  }, 500);
68
68
  }
69
69
  componentDidLoad() {
70
- console.log('Activating date picker', this.containerId, document.getElementById(this.containerId));
71
70
  this.picker = new AirDatepicker(`#${this.containerId}`, {
72
71
  locale: localeEn,
73
72
  isMobile: true,
@@ -95,7 +94,6 @@ export class VerdocsFieldDate {
95
94
  // NOTE: We don't use a "date" field here because browsers vary widely in their formatting of it.
96
95
  render() {
97
96
  const { source, sourceid, fieldname, editable = false, done = false, disabled = false, focused, xscale = 1, yscale = 1 } = this;
98
- console.log('Rendering date picker', source, sourceid, fieldname);
99
97
  const { index, field } = Store.getField(source, sourceid, fieldname, this.field);
100
98
  const { required = false, placeholder = 'Date...', value = '', label = '' } = field || {};
101
99
  const backgroundColor = getRGBA(index);
@@ -1 +1 @@
1
- {"version":3,"file":"verdocs-field-date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;oBACzH,yCACE,UAAU,EAAE,QAAQ,EACpB,SAAS,EAAE,SAAS,EACpB,OAAO,EAAE,GAAG,EAAE,CAAC,CAAC,IAAI,CAAC,iBAAiB,GAAG,KAAK,CAAC,EAC/C,QAAQ,EAAE,GAAG,EAAE;;4BACb,MAAA,IAAI,CAAC,OAAO,0CAAE,IAAI,CAAC,EAAC,SAAS,EAAE,SAAS,EAAC,CAAC,CAAC;4BAC3C,OAAO,IAAI,CAAC,iBAAiB,EAAE,CAAC;wBAClC,CAAC,EACD,iBAAiB,EAAE,CAAC,CAAC,EAAE;;4BACrB,MAAA,IAAI,CAAC,eAAe,0CAAE,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC;4BACrC,OAAO,IAAI,CAAC,iBAAiB,EAAE,CAAC;wBAClC,CAAC,EACD,QAAQ,EAAE,8CAA8C,GACxD,CACa,CAClB,CACQ,CACZ,CACI,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import {format} from 'date-fns';\nimport {getRGBA} from '@verdocs/js-sdk';\nimport AirDatepicker from 'air-datepicker';\nimport localeEn from 'air-datepicker/locale/en';\nimport type {ITemplateField} from '@verdocs/js-sdk';\nimport {Component, Element, Event, EventEmitter, h, Host, Method, Prop, Fragment, State} from '@stencil/core';\nimport {SettingsIcon} from '../../../utils/Icons';\nimport {FORMAT_DATE} from '../../../utils/Types';\nimport {Store} from '../../../utils/Datastore';\n\n/**\n * Displays a date field. When tapped or clicked, the input element will display a date picker component.\n */\n@Component({\n tag: 'verdocs-field-date',\n styleUrl: 'verdocs-field-date.scss',\n shadow: false,\n})\nexport class VerdocsFieldDate {\n @Element()\n private hostEl: HTMLInputElement;\n\n /**\n * Fields may be attached to templates or envelopes, but only template fields may be edited.\n */\n @Prop({reflect: true}) source: 'template' | 'envelope' = 'template';\n\n /**\n * The source template or envelope ID the field is found in.\n */\n @Prop({reflect: true}) sourceid: string = '';\n\n /**\n * The name of the field to display.\n */\n @Prop({reflect: true}) fieldname: string = '';\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({reflect: true}) disabled?: boolean = false;\n\n /**\n * If set, a settings icon will be displayed on hover. The settings shown allow the field's recipient and other settings to be\n * changed, so it should typically only be enabled in the Builder.\n */\n @Prop({reflect: true}) editable?: boolean = false;\n\n /**\n * If set, the field may be dragged to a new location. This should only be enabled in the Builder, or for self-placed fields.\n */\n @Prop({reflect: true}) moveable?: boolean = false;\n\n /**\n * If set, the field is considered \"done\" and is drawn in a display-final-value state.\n */\n @Prop({reflect: true}) done?: boolean = false;\n\n /**\n * If set, the field will be be scaled horizontally by this factor.\n */\n @Prop({reflect: true}) xscale?: number = 1;\n\n /**\n * If set, the field will be be scaled vertically by this factor.\n */\n @Prop({reflect: true}) yscale?: number = 1;\n\n /**\n * The page the field is on\n */\n @Prop({reflect: true}) pagenumber?: number = 1;\n\n /**\n * If set, the field will be be scaled vertically by this factor.\n */\n @Prop() field?: ITemplateField;\n\n /**\n * Event fired on every character entered into / deleted from the field.\n */\n @Event({composed: true}) settingsPress: EventEmitter;\n\n /**\n * Event fired when the field's settings are changed.\n */\n @Event({composed: true}) settingsChanged: EventEmitter<{fieldName: string; field: ITemplateField}>;\n\n /**\n * Event fired when the field is deleted.\n */\n @Event({composed: true}) deleted: EventEmitter<{fieldName: string}>;\n\n @State() containerId = `verdocs-date-picker-${Math.random().toString(36).substring(2, 11)}`;\n\n @State() showingProperties?: boolean = false;\n\n @Method()\n async focusField() {\n // Our input field is fake, so we fake the flash too\n this.focused = true;\n this.picker?.show();\n setTimeout(() => {\n this.focused = false;\n }, 500);\n }\n\n picker: AirDatepicker<HTMLElement> | null = null;\n\n componentDidLoad() {\n console.log('Activating date picker', this.containerId, document.getElementById(this.containerId));\n this.picker = new AirDatepicker<HTMLElement>(`#${this.containerId}`, {\n locale: localeEn,\n isMobile: true,\n autoClose: true,\n onShow: () => (this.focused = true),\n onHide: () => (this.focused = false),\n onSelect: ({date, formattedDate}) => {\n const event = new CustomEvent('fieldChange', {detail: {date, formattedDate}});\n this.hostEl.dispatchEvent(event);\n },\n });\n }\n\n @Method()\n async showSettingsPanel() {\n const settingsPanel = document.getElementById(`verdocs-settings-panel-${this.fieldname}`) as any;\n if (settingsPanel && settingsPanel.showPanel) {\n settingsPanel.showPanel();\n }\n }\n\n @Method()\n async hideSettingsPanel() {\n const settingsPanel = document.getElementById(`verdocs-settings-panel-${this.fieldname}`) as any;\n if (settingsPanel && settingsPanel.hidePanel) {\n settingsPanel.hidePanel();\n }\n }\n\n @State() focused?: boolean = false;\n\n // NOTE: We don't use a \"date\" field here because browsers vary widely in their formatting of it.\n render() {\n const {source, sourceid, fieldname, editable = false, done = false, disabled = false, focused, xscale = 1, yscale = 1} = this;\n console.log('Rendering date picker', source, sourceid, fieldname);\n\n const {index, field} = Store.getField(source, sourceid, fieldname, this.field);\n const {required = false, placeholder = 'Date...', value = '', label = ''} = field || {};\n const backgroundColor = getRGBA(index);\n\n const formattedValue = value ? format(new Date(value), FORMAT_DATE) : '';\n\n if (this.done) {\n return <Host class={{done}}>{formattedValue}</Host>;\n }\n\n return (\n <Host class={{required, disabled, done, focused}} style={{backgroundColor}}>\n {label && <label>{label}</label>}\n\n <input\n name={fieldname}\n class=\"input-el\"\n type=\"text\"\n value={formattedValue}\n id={this.containerId}\n disabled={disabled}\n placeholder={placeholder}\n onFocus={() => (this.focused = true)}\n onBlur={() => (this.focused = false)}\n />\n\n {editable && (\n <Fragment>\n <div\n id={`verdocs-settings-panel-trigger-${fieldname}`}\n style={{transform: `scale(${Math.floor((1 / xscale) * 1000) / 1000}, ${Math.floor((1 / yscale) * 1000) / 1000})`}}\n class=\"settings-icon\"\n innerHTML={SettingsIcon}\n onClick={(e: any) => {\n e.stopPropagation();\n this.showingProperties = !this.showingProperties;\n }}\n />\n\n {this.showingProperties && (\n <verdocs-portal anchor={`verdocs-settings-panel-trigger-${field.name}`} onClickAway={() => (this.showingProperties = false)}>\n <verdocs-template-field-properties\n templateId={sourceid}\n fieldName={fieldname}\n onClose={() => (this.showingProperties = false)}\n onDelete={() => {\n this.deleted?.emit({fieldName: fieldname});\n return this.hideSettingsPanel();\n }}\n onSettingsChanged={e => {\n this.settingsChanged?.emit(e.detail);\n return this.hideSettingsPanel();\n }}\n helpText={'Date fields allow the user to select a date.'}\n />\n </verdocs-portal>\n )}\n </Fragment>\n )}\n </Host>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"verdocs-field-date.js","sourceRoot":"","sources":["../../../../src/components/fields/verdocs-field-date/verdocs-field-date.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,MAAM,EAAC,MAAM,UAAU,CAAC;AAChC,OAAO,EAAC,OAAO,EAAC,MAAM,iBAAiB,CAAC;AACxC,OAAO,aAAa,MAAM,gBAAgB,CAAC;AAC3C,OAAO,QAAQ,MAAM,0BAA0B,CAAC;AAEhD,OAAO,EAAC,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAC,MAAM,eAAe,CAAC;AAC9G,OAAO,EAAC,YAAY,EAAC,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAC,WAAW,EAAC,MAAM,sBAAsB,CAAC;AACjD,OAAO,EAAC,KAAK,EAAC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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import {format} from 'date-fns';\nimport {getRGBA} from '@verdocs/js-sdk';\nimport AirDatepicker from 'air-datepicker';\nimport localeEn from 'air-datepicker/locale/en';\nimport type {ITemplateField} from '@verdocs/js-sdk';\nimport {Component, Element, Event, EventEmitter, h, Host, Method, Prop, Fragment, State} from '@stencil/core';\nimport {SettingsIcon} from '../../../utils/Icons';\nimport {FORMAT_DATE} from '../../../utils/Types';\nimport {Store} from '../../../utils/Datastore';\n\n/**\n * Displays a date field. When tapped or clicked, the input element will display a date picker component.\n */\n@Component({\n tag: 'verdocs-field-date',\n styleUrl: 'verdocs-field-date.scss',\n shadow: false,\n})\nexport class VerdocsFieldDate {\n @Element()\n private hostEl: HTMLInputElement;\n\n /**\n * Fields may be attached to templates or envelopes, but only template fields may be edited.\n */\n @Prop({reflect: true}) source: 'template' | 'envelope' = 'template';\n\n /**\n * The source template or envelope ID the field is found in.\n */\n @Prop({reflect: true}) sourceid: string = '';\n\n /**\n * The name of the field to display.\n */\n @Prop({reflect: true}) fieldname: string = '';\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({reflect: true}) disabled?: boolean = false;\n\n /**\n * If set, a settings icon will be displayed on hover. The settings shown allow the field's recipient and other settings to be\n * changed, so it should typically only be enabled in the Builder.\n */\n @Prop({reflect: true}) editable?: boolean = false;\n\n /**\n * If set, the field may be dragged to a new location. This should only be enabled in the Builder, or for self-placed fields.\n */\n @Prop({reflect: true}) moveable?: boolean = false;\n\n /**\n * If set, the field is considered \"done\" and is drawn in a display-final-value state.\n */\n @Prop({reflect: true}) done?: boolean = false;\n\n /**\n * If set, the field will be be scaled horizontally by this factor.\n */\n @Prop({reflect: true}) xscale?: number = 1;\n\n /**\n * If set, the field will be be scaled vertically by this factor.\n */\n @Prop({reflect: true}) yscale?: number = 1;\n\n /**\n * The page the field is on\n */\n @Prop({reflect: true}) pagenumber?: number = 1;\n\n /**\n * If set, the field will be be scaled vertically by this factor.\n */\n @Prop() field?: ITemplateField;\n\n /**\n * Event fired on every character entered into / deleted from the field.\n */\n @Event({composed: true}) settingsPress: EventEmitter;\n\n /**\n * Event fired when the field's settings are changed.\n */\n @Event({composed: true}) settingsChanged: EventEmitter<{fieldName: string; field: ITemplateField}>;\n\n /**\n * Event fired when the field is deleted.\n */\n @Event({composed: true}) deleted: EventEmitter<{fieldName: string}>;\n\n @State() containerId = `verdocs-date-picker-${Math.random().toString(36).substring(2, 11)}`;\n\n @State() showingProperties?: boolean = false;\n\n @Method()\n async focusField() {\n // Our input field is fake, so we fake the flash too\n this.focused = true;\n this.picker?.show();\n setTimeout(() => {\n this.focused = false;\n }, 500);\n }\n\n picker: AirDatepicker<HTMLElement> | null = null;\n\n componentDidLoad() {\n this.picker = new AirDatepicker<HTMLElement>(`#${this.containerId}`, {\n locale: localeEn,\n isMobile: true,\n autoClose: true,\n onShow: () => (this.focused = true),\n onHide: () => (this.focused = false),\n onSelect: ({date, formattedDate}) => {\n const event = new CustomEvent('fieldChange', {detail: {date, formattedDate}});\n this.hostEl.dispatchEvent(event);\n },\n });\n }\n\n @Method()\n async showSettingsPanel() {\n const settingsPanel = document.getElementById(`verdocs-settings-panel-${this.fieldname}`) as any;\n if (settingsPanel && settingsPanel.showPanel) {\n settingsPanel.showPanel();\n }\n }\n\n @Method()\n async hideSettingsPanel() {\n const settingsPanel = document.getElementById(`verdocs-settings-panel-${this.fieldname}`) as any;\n if (settingsPanel && settingsPanel.hidePanel) {\n settingsPanel.hidePanel();\n }\n }\n\n @State() focused?: boolean = false;\n\n // NOTE: We don't use a \"date\" field here because browsers vary widely in their formatting of it.\n render() {\n const {source, sourceid, fieldname, editable = false, done = false, disabled = false, focused, xscale = 1, yscale = 1} = this;\n\n const {index, field} = Store.getField(source, sourceid, fieldname, this.field);\n const {required = false, placeholder = 'Date...', value = '', label = ''} = field || {};\n const backgroundColor = getRGBA(index);\n\n const formattedValue = value ? format(new Date(value), FORMAT_DATE) : '';\n\n if (this.done) {\n return <Host class={{done}}>{formattedValue}</Host>;\n }\n\n return (\n <Host class={{required, disabled, done, focused}} style={{backgroundColor}}>\n {label && <label>{label}</label>}\n\n <input\n name={fieldname}\n class=\"input-el\"\n type=\"text\"\n value={formattedValue}\n id={this.containerId}\n disabled={disabled}\n placeholder={placeholder}\n onFocus={() => (this.focused = true)}\n onBlur={() => (this.focused = false)}\n />\n\n {editable && (\n <Fragment>\n <div\n id={`verdocs-settings-panel-trigger-${fieldname}`}\n style={{transform: `scale(${Math.floor((1 / xscale) * 1000) / 1000}, ${Math.floor((1 / yscale) * 1000) / 1000})`}}\n class=\"settings-icon\"\n innerHTML={SettingsIcon}\n onClick={(e: any) => {\n e.stopPropagation();\n this.showingProperties = !this.showingProperties;\n }}\n />\n\n {this.showingProperties && (\n <verdocs-portal anchor={`verdocs-settings-panel-trigger-${field.name}`} onClickAway={() => (this.showingProperties = false)}>\n <verdocs-template-field-properties\n templateId={sourceid}\n fieldName={fieldname}\n onClose={() => (this.showingProperties = false)}\n onDelete={() => {\n this.deleted?.emit({fieldName: fieldname});\n return this.hideSettingsPanel();\n }}\n onSettingsChanged={e => {\n this.settingsChanged?.emit(e.detail);\n return this.hideSettingsPanel();\n }}\n helpText={'Date fields allow the user to select a date.'}\n />\n </verdocs-portal>\n )}\n </Fragment>\n )}\n </Host>\n );\n }\n}\n"]}
@@ -7,7 +7,7 @@ import { d as defineCustomElement$n } from './p-96774726.js';
7
7
  import { d as defineCustomElement$m } from './p-39480096.js';
8
8
  import { d as defineCustomElement$l } from './p-eb4bd2d6.js';
9
9
  import { d as defineCustomElement$k } from './p-e85acbfb.js';
10
- import { d as defineCustomElement$j } from './p-52c195dd.js';
10
+ import { d as defineCustomElement$j } from './p-92cce3dc.js';
11
11
  import { d as defineCustomElement$i } from './p-1a83e46c.js';
12
12
  import { d as defineCustomElement$h } from './p-f66d6a07.js';
13
13
  import { d as defineCustomElement$g } from './p-9a24561a.js';
@@ -22,7 +22,7 @@ import { d as defineCustomElement$8 } from './p-081465e0.js';
22
22
  import { d as defineCustomElement$7 } from './p-ca16a8ac.js';
23
23
  import { d as defineCustomElement$6 } from './p-8af753b4.js';
24
24
  import { d as defineCustomElement$5 } from './p-51c8b927.js';
25
- import { d as defineCustomElement$4 } from './p-7481c7db.js';
25
+ import { d as defineCustomElement$4 } from './p-b474c324.js';
26
26
  import { d as defineCustomElement$3 } from './p-4dbb9783.js';
27
27
  import { d as defineCustomElement$2 } from './p-08ddf0b4.js';
28
28
  import { d as defineCustomElement$1 } from './p-f776eeae.js';
@@ -257,4 +257,4 @@ function defineCustomElement() {
257
257
 
258
258
  export { VerdocsPreview as V, defineCustomElement as d };
259
259
 
260
- //# sourceMappingURL=p-36368807.js.map
260
+ //# sourceMappingURL=p-4a04090c.js.map
@@ -1 +1 @@
1
- {"file":"p-36368807.js","mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,MAAM,iBAAiB,GAAG,mvBAAmvB,CAAC;AAC9wB,6BAAe,iBAAiB;;MCqBnB,cAAc;IAL3B;;;;QAMU,uBAAkB,GAAG,IAAI,CAAC;;;;QAK1B,aAAQ,GAAoB,eAAe,CAAC,UAAU,EAAE,CAAC;;;;QAKzD,eAAU,GAAkB,IAAI,CAAC;QAQhC,YAAO,GAAG,IAAI,CAAC;QACf,aAAQ,GAAqB,IAAI,CAAC;KAsG5C;IApGC,oBAAoB;QAClB,IAAI,CAAC,kBAAkB,EAAE,CAAC;KAC3B;IAED,MAAM,gBAAgB;QACpB,IAAI,CAAC,kBAAkB,EAAE,CAAC;QAC1B,KAAK,CAAC,SA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;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/embeds/verdocs-preview/verdocs-preview.scss?tag=verdocs-preview","src/components/embeds/verdocs-preview/verdocs-preview.tsx"],"sourcesContent":["@import '../../../theme.scss';\n\nverdocs-preview {\n font-family: $verdocs-primary-font;\n display: flex;\n padding: 15px;\n row-gap: 15px;\n min-height: 200px;\n position: relative;\n align-items: center;\n box-sizing: border-box;\n flex-direction: column;\n\n div,\n canvas {\n box-sizing: border-box;\n }\n}\n","import {getTemplate, integerSequence, ITemplate, VerdocsEndpoint} from '@verdocs/js-sdk';\nimport {Event, EventEmitter, Host, Component, Prop, h, State, Fragment, Watch} from '@stencil/core';\nimport {SDKError} from '../../../utils/errors';\nimport {Store} from '../../../utils/Datastore';\n\n/**\n * Display a template preview experience. This will display the template's attached\n * documents with signing fields overlaid on each page. Fields will be color-coded\n * by recipient, and will be read-only (cannot be filled, moved, or altered).\n *\n * ```ts\n * <verdocs-preview\n * templateId={templateId}\n * onSdkError={({ detail }) => { console.log('SDK error', detail) }\n * />\n * ```\n */\n@Component({\n tag: 'verdocs-preview',\n styleUrl: 'verdocs-preview.scss',\n shadow: false,\n})\nexport class VerdocsPreview {\n private templateListenerId = null;\n\n /**\n * The endpoint to use to communicate with Verdocs. If not set, the default endpoint will be used.\n */\n @Prop() endpoint: VerdocsEndpoint = VerdocsEndpoint.getDefault();\n\n /**\n * The ID of the template to create the document from.\n */\n @Prop() templateId: string | null = null;\n\n /**\n * Event fired if an error occurs. The event details will contain information about the error. Most errors will\n * terminate the process, and the calling application should correct the condition and re-render the component.\n */\n @Event({composed: true}) sdkError: EventEmitter<SDKError>;\n\n @State() loading = true;\n @State() template: ITemplate | null = null;\n\n disconnectedCallback() {\n this.unlistenToTemplate();\n }\n\n async listenToTemplate() {\n this.unlistenToTemplate();\n Store.subscribe(\n 'templates',\n this.templateId,\n () => getTemplate(this.endpoint, this.templateId),\n false,\n (template: ITemplate) => {\n this.template = template;\n this.loading = false;\n },\n );\n }\n\n unlistenToTemplate() {\n if (this.templateListenerId) {\n Store.store.delListener(this.templateListenerId);\n this.templateListenerId = null;\n }\n }\n\n @Watch('templateId')\n onTemplateIdChanged(newTemplateId: string) {\n console.log('[PREVIEW] Template ID changed', newTemplateId);\n this.listenToTemplate();\n }\n\n async componentWillLoad() {\n try {\n this.endpoint.loadSession();\n if (!this.endpoint.session) {\n console.log('[PREVIEW] Unable to start builder session, must be authenticated');\n return;\n }\n\n if (!this.templateId) {\n console.log(`[PREVIEW] Missing required template ID ${this.templateId}`);\n return;\n }\n\n this.listenToTemplate();\n } catch (e) {\n console.log('[PREVIEW] Error with preview session', e);\n this.sdkError?.emit(new SDKError(e.message, e.response?.status, e.response?.data));\n }\n }\n\n handlePageRendered(_e: any) {\n // const pageInfo = e.detail as IDocumentPageInfo;\n // const fields = (this.template?.fields || []).filter(field => field.page === pageInfo.pageNumber);\n // console.log('[PREVIEW] Page rendered', pageInfo, fields);\n // fields.forEach(field => renderDocumentField(field, pageInfo, {disabled: true, editable: false, draggable: false}));\n }\n\n render() {\n if (this.loading) {\n return (\n <Host>\n <verdocs-loader />\n </Host>\n );\n }\n\n return (\n <Host>\n {(this.template?.documents || []).map(document => {\n const pageNumbers = integerSequence(1, document.pages);\n return (\n <Fragment>\n {pageNumbers.map(pageNumber => {\n const pageSize = document.page_sizes?.[pageNumber] || {width: 612, height: 792};\n\n return (\n <verdocs-template-document-page\n templateId={document.template_id}\n documentId={document.id}\n pageNumber={pageNumber}\n disabled={true}\n editable={false}\n done={false}\n virtualWidth={pageSize.width}\n virtualHeight={pageSize.height}\n onPageRendered={e => this.handlePageRendered(e)}\n layers={[\n {name: 'page', type: 'canvas'},\n {name: 'controls', type: 'div'},\n ]}\n />\n );\n })}\n </Fragment>\n );\n })}\n </Host>\n );\n }\n}\n"],"version":3}
1
+ {"file":"p-4a04090c.js","mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,MAAM,iBAAiB,GAAG,mvBAAmvB,CAAC;A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kBAAkB,CAAC,CAAC,CAAC,EAC/C,MAAM,EAAE;wBACN,EAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAC;wBAC9B,EAAC,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,KAAK,EAAC;qBAChC,GACD,EACF;aACH,CAAC,CACO,EACX;SACH,CAAC,CACG,EACP;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/embeds/verdocs-preview/verdocs-preview.scss?tag=verdocs-preview","src/components/embeds/verdocs-preview/verdocs-preview.tsx"],"sourcesContent":["@import '../../../theme.scss';\n\nverdocs-preview {\n font-family: $verdocs-primary-font;\n display: flex;\n padding: 15px;\n row-gap: 15px;\n min-height: 200px;\n position: relative;\n align-items: center;\n box-sizing: border-box;\n flex-direction: column;\n\n div,\n canvas {\n box-sizing: border-box;\n }\n}\n","import {getTemplate, integerSequence, ITemplate, VerdocsEndpoint} from '@verdocs/js-sdk';\nimport {Event, EventEmitter, Host, Component, Prop, h, State, Fragment, Watch} from '@stencil/core';\nimport {SDKError} from '../../../utils/errors';\nimport {Store} from '../../../utils/Datastore';\n\n/**\n * Display a template preview experience. This will display the template's attached\n * documents with signing fields overlaid on each page. Fields will be color-coded\n * by recipient, and will be read-only (cannot be filled, moved, or altered).\n *\n * ```ts\n * <verdocs-preview\n * templateId={templateId}\n * onSdkError={({ detail }) => { console.log('SDK error', detail) }\n * />\n * ```\n */\n@Component({\n tag: 'verdocs-preview',\n styleUrl: 'verdocs-preview.scss',\n shadow: false,\n})\nexport class VerdocsPreview {\n private templateListenerId = null;\n\n /**\n * The endpoint to use to communicate with Verdocs. If not set, the default endpoint will be used.\n */\n @Prop() endpoint: VerdocsEndpoint = VerdocsEndpoint.getDefault();\n\n /**\n * The ID of the template to create the document from.\n */\n @Prop() templateId: string | null = null;\n\n /**\n * Event fired if an error occurs. The event details will contain information about the error. Most errors will\n * terminate the process, and the calling application should correct the condition and re-render the component.\n */\n @Event({composed: true}) sdkError: EventEmitter<SDKError>;\n\n @State() loading = true;\n @State() template: ITemplate | null = null;\n\n disconnectedCallback() {\n this.unlistenToTemplate();\n }\n\n async listenToTemplate() {\n this.unlistenToTemplate();\n Store.subscribe(\n 'templates',\n this.templateId,\n () => getTemplate(this.endpoint, this.templateId),\n false,\n (template: ITemplate) => {\n this.template = template;\n this.loading = false;\n },\n );\n }\n\n unlistenToTemplate() {\n if (this.templateListenerId) {\n Store.store.delListener(this.templateListenerId);\n this.templateListenerId = null;\n }\n }\n\n @Watch('templateId')\n onTemplateIdChanged(newTemplateId: string) {\n console.log('[PREVIEW] Template ID changed', newTemplateId);\n this.listenToTemplate();\n }\n\n async componentWillLoad() {\n try {\n this.endpoint.loadSession();\n if (!this.endpoint.session) {\n console.log('[PREVIEW] Unable to start builder session, must be authenticated');\n return;\n }\n\n if (!this.templateId) {\n console.log(`[PREVIEW] Missing required template ID ${this.templateId}`);\n return;\n }\n\n this.listenToTemplate();\n } catch (e) {\n console.log('[PREVIEW] Error with preview session', e);\n this.sdkError?.emit(new SDKError(e.message, e.response?.status, e.response?.data));\n }\n }\n\n handlePageRendered(_e: any) {\n // const pageInfo = e.detail as IDocumentPageInfo;\n // const fields = (this.template?.fields || []).filter(field => field.page === pageInfo.pageNumber);\n // console.log('[PREVIEW] Page rendered', pageInfo, fields);\n // fields.forEach(field => renderDocumentField(field, pageInfo, {disabled: true, editable: false, draggable: false}));\n }\n\n render() {\n if (this.loading) {\n return (\n <Host>\n <verdocs-loader />\n </Host>\n );\n }\n\n return (\n <Host>\n {(this.template?.documents || []).map(document => {\n const pageNumbers = integerSequence(1, document.pages);\n return (\n <Fragment>\n {pageNumbers.map(pageNumber => {\n const pageSize = document.page_sizes?.[pageNumber] || {width: 612, height: 792};\n\n return (\n <verdocs-template-document-page\n templateId={document.template_id}\n documentId={document.id}\n pageNumber={pageNumber}\n disabled={true}\n editable={false}\n done={false}\n virtualWidth={pageSize.width}\n virtualHeight={pageSize.height}\n onPageRendered={e => this.handlePageRendered(e)}\n layers={[\n {name: 'page', type: 'canvas'},\n {name: 'controls', type: 'div'},\n ]}\n />\n );\n })}\n </Fragment>\n );\n })}\n </Host>\n );\n }\n}\n"],"version":3}
@@ -6,7 +6,7 @@ import { S as Store } from './p-33300e3a.js';
6
6
  import { d as defineCustomElement$8 } from './p-f5ccf125.js';
7
7
  import { d as defineCustomElement$7 } from './p-96774726.js';
8
8
  import { d as defineCustomElement$6 } from './p-39480096.js';
9
- import { d as defineCustomElement$5 } from './p-6bfb8eba.js';
9
+ import { d as defineCustomElement$5 } from './p-73a39d5a.js';
10
10
  import { d as defineCustomElement$4 } from './p-f7dc9e74.js';
11
11
  import { d as defineCustomElement$3 } from './p-a50f7982.js';
12
12
  import { d as defineCustomElement$2 } from './p-ca16a8ac.js';
@@ -176,7 +176,6 @@ const VerdocsSend = /*@__PURE__*/ proxyCustomElement(class VerdocsSend extends H
176
176
  }
177
177
  }
178
178
  handleSelectContact(e, role) {
179
- console.log('hsc', e.detail, role);
180
179
  e.preventDefault();
181
180
  this.rolesCompleted[role.id] = { ...role, ...e.detail };
182
181
  this.showPickerForId = '';
@@ -334,4 +333,4 @@ function defineCustomElement() {
334
333
 
335
334
  export { VerdocsSend as V, defineCustomElement as d };
336
335
 
337
- //# sourceMappingURL=p-c1d312d8.js.map
336
+ //# sourceMappingURL=p-4a4bf38c.js.map
@@ -0,0 +1 @@
1
+ {"file":"p-4a4bf38c.js","mappings":";;;;;;;;;;;;;;AAEO,MAAM,YAAY,GAAG,CAAC,QAA0B,KAAK,CAAC,CAAA,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,KAAK,KAAI,EAAE,EAAE,GAAG,CAAC,IAAI,IAAI,IAAI,CAAC,IAAI,CAAC,CAAC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verdocs-send","src/components/embeds/verdocs-send/verdocs-send.tsx"],"sourcesContent":["import {ITemplate} from '@verdocs/js-sdk';\n\nexport const getRoleNames = (template: ITemplate | null) => (template?.roles || []).map(role => role.name);\n\nexport const getRoleIndex = (template: ITemplate | null, role_name: string) =>\n Math.max(\n getRoleNames(template).findIndex(name => name === role_name),\n 0,\n );\n","@import '../../../theme.scss';\n\nverdocs-send {\n padding: 10px;\n position: relative;\n background: #ffffff;\n flex-direction: column;\n font-family: $verdocs-primary-font;\n\n &.sendable {\n display: flex;\n }\n\n .recipients {\n position: relative;\n }\n\n // To avoid the need to compute things like heights, this layer is simply displayed \"on top\" of all the level rows. Its\n // background obscures the horizontal lines.\n .left-line {\n top: 32px;\n left: 20px;\n z-index: 1;\n width: 12px;\n bottom: 30px;\n position: absolute;\n background: #ffffff;\n border-left: 3px dotted #9b9b9b;\n }\n\n .level {\n display: flex;\n column-gap: 10px;\n margin-left: 50px;\n position: relative;\n flex-direction: row;\n padding: 8px 0 4px 0;\n border-bottom: 1px solid #97979744;\n\n .level-icon {\n top: 14px;\n z-index: 2;\n left: -40px;\n width: 24px;\n height: 24px;\n position: absolute;\n background: #ffffff;\n\n svg {\n fill: #00000089;\n }\n }\n\n .recipient {\n height: 30px;\n display: flex;\n flex: 0 0 30px;\n color: #000000;\n cursor: pointer;\n font-size: 14px;\n align-items: center;\n border-radius: 30px;\n flex-direction: row;\n background: #dddddd;\n white-space: nowrap;\n border: 2px solid #dddddd;\n padding: 2px 10px 2px 14px;\n\n .icon {\n width: 22px;\n height: 22px;\n flex: 0 0 22px;\n margin: 0 0 0 10px;\n\n svg {\n width: 22px;\n height: 22px;\n fill: #333333;\n outline: none;\n }\n }\n }\n\n .complete {\n flex: 1;\n height: 30px;\n display: flex;\n color: #000000;\n font-size: 14px;\n align-items: center;\n flex-direction: row;\n padding: 3px 10px 3px 2px;\n }\n }\n\n .buttons {\n display: flex;\n margin-top: 10px;\n column-gap: 15px;\n flex-direction: row;\n }\n\n verdocs-contact-picker {\n left: 0;\n top: 41px;\n z-index: 10;\n position: absolute;\n border: 1px solid #dddddd;\n box-shadow: 0 0 6px 3px rgb(0 0 0 / 10%);\n }\n}\n","import {Component, Prop, State, h, Event, EventEmitter, Host, Method, Watch} from '@stencil/core';\nimport {createEnvelope, formatFullName, getTemplate, getOrganizationContacts, getRGBA, isValidEmail, VerdocsEndpoint} from '@verdocs/js-sdk';\nimport type {ICreateEnvelopeFromTemplateRequest, ICreateEnvelopeRecipient, IEnvelope, IRecipient, ITemplate} from '@verdocs/js-sdk';\nimport {IContactSearchEvent} from '../../envelopes/verdocs-contact-picker/verdocs-contact-picker';\nimport {getRoleIndex, getRoleNames} from '../../../utils/Templates';\nimport {VerdocsToast} from '../../../utils/Toast';\nimport {SDKError} from '../../../utils/errors';\nimport {Store} from '../../../utils/Datastore';\n\nconst editIcon =\n '<svg focusable=\"false\" aria-hidden=\"true\" viewBox=\"0 0 24 24\" tabindex=\"-1\"><path d=\"M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.9959.9959 0 0 0-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z\"></path></svg>';\n\nconst startIcon =\n '<svg focusable=\"false\" aria-hidden=\"true\" viewBox=\"0 0 24 24\" tabindex=\"-1\"><path d=\"M2 12C2 6.48 6.48 2 12 2s10 4.48 10 10-4.48 10-10 10S2 17.52 2 12zm10 6c3.31 0 6-2.69 6-6s-2.69-6-6-6-6 2.69-6 6 2.69 6 6 6z\"></path></svg>';\n\nconst stepIcon =\n '<svg focusable=\"false\" aria-hidden=\"true\" viewBox=\"0 0 24 24\" tabindex=\"-1\"><path d=\"M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z\"></path></svg>';\n\nconst doneIcon =\n '<svg focusable=\"false\" aria-hidden=\"true\" viewBox=\"0 0 24 24\" tabindex=\"-1\"><path d=\"m18 7-1.41-1.41-6.34 6.34 1.41 1.41L18 7zm4.24-1.41L11.66 16.17 7.48 12l-1.41 1.41L11.66 19l12-12-1.42-1.41zM.41 13.41 6 19l1.41-1.41L1.83 12 .41 13.41z\"></path></svg>';\n\n/**\n * Display a form to send a template to one or more recipients in an envelope for signing.\n * Host applications should ensure the template is \"sendable\" before displaying this component.\n * To be sendable, a template must have at least one document attached, at least one participant\n * defined, and at least one field assigned to every \"signer\" participant. This component will\n * hide itself if the template is not sendable.\n *\n * ```ts\n * <verdocs-send\n * templateId={templateId}\n * onBeforeSend={({ detail })) => { console.log('Sending... Show a spinner...', detail) }\n * onSend={({ detail }) => { console.log('Sent! Hide the spinner...', detail) }\n * onExit={(e) => { console.log('Send cancelled.', detail) }\n * onSdkError={({ detail }) => { console.log('SDK error', detail) }\n * />\n * ```\n */\n@Component({\n tag: 'verdocs-send',\n styleUrl: 'verdocs-send.scss',\n shadow: false,\n})\nexport class VerdocsSend {\n private templateListenerId = null;\n\n /**\n * The endpoint to use to communicate with Verdocs. If not set, the default endpoint will be used.\n */\n @Prop() endpoint: VerdocsEndpoint = VerdocsEndpoint.getDefault();\n\n /**\n * The ID of the template to create the document from.\n */\n @Prop({reflect: true}) templateId: string | null = null;\n\n /**\n * The environment the control is being called from, e.g. 'web'. This has an impact on how certain\n * operations such as email communications are handled to ensure users receive the correct URLs for\n * their invitations. Setting this to unknown values may produce unexpected/incorrect behaviors.\n * If environment is not known, do this set this property.\n */\n @Prop() environment: string = '';\n\n /**\n * The user is sending an envelope the form and clicked send.\n */\n @Event({composed: true}) beforeSend: EventEmitter<{recipients: ICreateEnvelopeRecipient[]; name: string; template_id: string; template: ITemplate}>;\n\n /**\n * The user completed the form and clicked send.\n */\n @Event({composed: true}) send: EventEmitter<{recipients: ICreateEnvelopeRecipient[]; name: string; template_id: string; envelope_id: string; envelope: IEnvelope}>;\n\n /**\n * Event fired when the step is cancelled. This is called exit to avoid conflicts with the JS-reserved \"cancel\" event name.\n */\n @Event({composed: true}) exit: EventEmitter;\n\n /**\n * Event fired if an error occurs. The event details will contain information about the error. Most errors will\n * terminate the process, and the calling application should correct the condition and re-render the component.\n */\n @Event({composed: true}) sdkError: EventEmitter<SDKError>;\n\n /**\n * Event fired when the user enters text in a search field. The parent application may use this to update\n * the `contactSuggestions` property.\n */\n @Event({composed: true}) searchContacts: EventEmitter<IContactSearchEvent>;\n\n @State() containerId = `verdocs-send-${Math.random().toString(36).substring(2, 11)}`;\n @State() showPickerForId = '';\n @State() sessionContacts = [];\n @State() sending = false;\n @State() rolesCompleted: Record<string, Partial<IRecipient>> = {};\n\n @State() loading = true;\n @State() template: ITemplate | null = null;\n\n disconnectedCallback() {\n this.unlistenToTemplate();\n }\n\n async listenToTemplate() {\n console.log('[SEND] Loading template', this.templateId);\n this.unlistenToTemplate();\n Store.subscribe(\n 'templates',\n this.templateId,\n () => getTemplate(this.endpoint, this.templateId),\n true,\n (template: ITemplate) => {\n console.log('[SEND] Got new template', template);\n this.template = template;\n this.loading = false;\n this.rolesCompleted = {};\n this.recomputeRolesCompleted();\n },\n );\n }\n\n unlistenToTemplate() {\n if (this.templateListenerId) {\n Store.store.delListener(this.templateListenerId);\n this.templateListenerId = null;\n }\n }\n\n @Method() async reset() {\n this.rolesCompleted = {};\n }\n\n @Watch('templateId')\n onTemplateIdChanged(newTemplateId: string) {\n console.log('[SEND] Template ID changed', newTemplateId);\n this.listenToTemplate();\n }\n\n async componentWillLoad() {\n try {\n this.endpoint.onSessionChanged((_endpoint, _session, profile) => {\n if (!profile) {\n return;\n }\n\n const me = {\n id: profile.id,\n first_name: profile.first_name,\n last_name: profile.last_name,\n email: profile.email,\n phone: profile.phone,\n };\n\n if (profile) {\n this.sessionContacts = [me];\n\n getOrganizationContacts(this.endpoint)\n .then(contacts => {\n console.log('[SEND] Got contacts', contacts);\n this.sessionContacts = [...contacts, me];\n })\n .catch(e => {\n console.log('[SEND] Error getting contacts', e);\n });\n }\n });\n\n this.endpoint.loadSession();\n\n if (!this.endpoint.session) {\n console.log('[SEND] Unable to start Send operation, must be authenticated');\n return;\n }\n\n if (!this.templateId) {\n console.log(`[SEND] Missing required template ID ${this.templateId}`);\n return;\n }\n\n this.listenToTemplate();\n } catch (e) {\n console.log('[SEND] Error with send session', e);\n this.sdkError?.emit(new SDKError(e.message, e.response?.status, e.response?.data));\n }\n }\n\n recomputeRolesCompleted() {\n this.rolesCompleted = {};\n\n const rolesAtLevel: Record<number, Partial<IRecipient>[]> = {};\n (this.template?.roles || []).forEach(role => {\n const level = role.sequence - 1;\n rolesAtLevel[level] ||= [];\n const id = `r-${level}-${rolesAtLevel[level].length}`;\n rolesAtLevel[level].push({...role, id, role_name: role.name, first_name: role.first_name, last_name: role.last_name});\n\n // if (role.first_name && (isValidEmail(role.email) || isValidPhone(role.phone))) {\n if (role.first_name && isValidEmail(role.email)) {\n this.rolesCompleted[id] = {...role, id, role_name: role.name, first_name: role.first_name, last_name: role.last_name};\n }\n });\n }\n\n getSequenceNumbers() {\n // This is cleaner with a Set but we found a regression in some target environments where\n // this breaks down. Reverting to an older technique while we diagnose it.\n const sequences: Record<number, boolean> = {};\n (this.template?.roles || []).forEach(role => {\n sequences[role.sequence] = true;\n });\n return Object.keys(sequences)\n .map(s => +s)\n .sort((a, b) => a - b);\n }\n\n getRolesAtLevel(level: number) {\n const rolesAtLevel = (this.template?.roles || [])\n .filter(role => role.sequence === level)\n .map((role, index) => ({\n ...role,\n id: `r-${level}-${index}`,\n role_name: role.name,\n first_name: role.first_name,\n last_name: role.last_name,\n }));\n return rolesAtLevel as Partial<IRecipient>[];\n }\n\n getLevelIcon(level: 'start' | 'end' | 'sequence') {\n if (level === 'start') {\n return <div class=\"level-icon\" innerHTML={startIcon} />;\n } else if (level === 'end') {\n return <div class=\"level-icon\" innerHTML={doneIcon} />;\n } else {\n return <div class=\"level-icon\" innerHTML={stepIcon} />;\n }\n }\n\n handleSelectContact(e: any, role: Partial<IRecipient>) {\n e.preventDefault();\n this.rolesCompleted[role.id] = {...role, ...e.detail};\n this.showPickerForId = '';\n }\n\n handleClickRole(e: any, role: Partial<IRecipient>) {\n e.stopPropagation();\n this.showPickerForId = role.id;\n }\n\n handleSend(e: any) {\n if (this.sending) {\n console.log('[SEND] Skipping duplicate send', e);\n return;\n }\n\n console.log('[SEND] Sending', e);\n e.preventDefault();\n e.stopPropagation();\n\n this.sending = true;\n\n const details: ICreateEnvelopeFromTemplateRequest = {\n template_id: this.templateId,\n name: this.template?.name || 'New Envelope',\n environment: this.environment,\n initial_reminder: 0,\n followup_reminders: 0,\n recipients: Object.values(this.rolesCompleted) as ICreateEnvelopeRecipient[],\n // TODO: Pre-filled fields support\n fields: [],\n };\n\n const beforeSendResult = this.beforeSend.emit({...details, name: details.name!, template: this.template});\n if (beforeSendResult.defaultPrevented) {\n console.log('[SEND] Send cancelled by parent', details);\n this.sending = false;\n return;\n }\n\n console.log('[SEND] Creating envelope', details);\n createEnvelope(this.endpoint, details)\n .then(r => {\n console.log('[SEND] Send envelope', r);\n this.reset().catch((e: any) => console.log('Unknown Error', e));\n this.sending = false;\n this.send?.emit({...details, name: details.name!, envelope_id: r.id, envelope: r});\n })\n .catch(e => {\n console.log('[SEND] Send error', e);\n VerdocsToast(e.response?.data?.error || 'Error creating envelope, please try again later.');\n this.sending = false;\n this.sdkError?.emit(e);\n });\n }\n\n handleCancel(e: any) {\n e.stopPropagation();\n this.exit?.emit();\n }\n\n render() {\n if (this.loading) {\n return (\n <Host>\n <verdocs-loader />\n </Host>\n );\n }\n\n if (!this.endpoint.session) {\n return (\n <Host style={{display: 'flex'}}>\n <verdocs-component-error message=\"You must be authenticated to use this module.\" />\n </Host>\n );\n }\n\n const levels = this.getSequenceNumbers();\n const rolesAssigned = Object.values(this.rolesCompleted).filter(recipient => isValidEmail(recipient.email) && recipient.first_name && recipient.last_name);\n const allRolesAssigned = rolesAssigned.length >= getRoleNames(this.template).length;\n\n return (\n <Host class={{sendable: this.template?.is_sendable}}>\n <div class=\"recipients\">\n <div class=\"left-line\" />\n <div class={`level level-start`}>\n {this.getLevelIcon('start')}\n <div class=\"complete\">Send Envelope</div>\n </div>\n\n {levels.map(level => (\n <div class={`level level-${level}`}>\n {this.getLevelIcon('sequence')}\n\n {this.getRolesAtLevel(level).map(role => {\n const unknown = !role.email || !role.first_name || !role.last_name;\n const roleName = this.rolesCompleted[role.id]?.first_name ? formatFullName(this.rolesCompleted[role.id]) : unknown ? role.role_name : formatFullName(role);\n const elId = `verdocs-send-recipient-${role.role_name}`;\n const roleIndex = getRoleIndex(this.template, role.role_name);\n const rgba = getRGBA(roleIndex);\n const completed = rolesAssigned.findIndex(r => r.role_name === role.role_name) > -1;\n\n const style = {\n backgroundColor: rgba,\n border: completed ? '2px solid #55bc81' : '2px solid #dddddd',\n };\n\n return unknown ? (\n <div class=\"recipient\" data-ri={roleIndex} data-rn={role.role_name} style={style} onClick={e => this.handleClickRole(e, role)} id={elId}>\n {roleName}\n <div class=\"icon\" innerHTML={editIcon} />\n {this.showPickerForId === role.id && (\n <verdocs-portal anchor={elId} onClickAway={() => (this.showPickerForId = '')}>\n <verdocs-contact-picker\n onExit={() => (this.showPickerForId = '')}\n onNext={e => this.handleSelectContact(e, role)}\n contactSuggestions={this.sessionContacts}\n templateRole={this.rolesCompleted[role.id] ?? role}\n onSearchContacts={e => this.searchContacts?.emit(e.detail)}\n />\n </verdocs-portal>\n )}\n </div>\n ) : (\n <div class=\"recipient\" data-ri={roleIndex} data-rn={role.role_name} style={style} onClick={e => this.handleClickRole(e, role)} id={elId}>\n {/*<div class=\"recipient\" data-ri={roleIndex} data-rn={role.role_name} style={{borderColor: rgba}} onClick={e => this.handleClickRole(e, role)} id={elId}>*/}\n {roleName}\n <div class=\"icon\" innerHTML={editIcon} />\n {this.showPickerForId === role.id && (\n <verdocs-portal anchor={elId} onClickAway={() => (this.showPickerForId = '')}>\n <verdocs-contact-picker\n onExit={() => (this.showPickerForId = '')}\n onNext={e => this.handleSelectContact(e, role)}\n contactSuggestions={this.sessionContacts}\n templateRole={(this.rolesCompleted[role.id] ?? role) as IRecipient}\n onSearchContacts={e => this.searchContacts?.emit(e.detail)}\n />\n </verdocs-portal>\n )}\n </div>\n );\n })}\n </div>\n ))}\n\n <div class={`level level-done`}>\n {this.getLevelIcon('end')}\n <div class=\"complete\">Signing Complete</div>\n </div>\n </div>\n\n <div class=\"buttons\">\n <verdocs-button label=\"Cancel\" size=\"small\" variant=\"outline\" onClick={e => this.handleCancel(e)} disabled={this.sending} />\n <verdocs-button label=\"Send\" size=\"small\" disabled={!allRolesAssigned || this.sending} onClick={e => this.handleSend(e)} />\n {this.sending && <verdocs-spinner />}\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
@@ -612,26 +612,6 @@ const toFiniteNumber = (value, defaultValue) => {
612
612
  return value != null && Number.isFinite(value = +value) ? value : defaultValue;
613
613
  };
614
614
 
615
- const ALPHA = 'abcdefghijklmnopqrstuvwxyz';
616
-
617
- const DIGIT = '0123456789';
618
-
619
- const ALPHABET = {
620
- DIGIT,
621
- ALPHA,
622
- ALPHA_DIGIT: ALPHA + ALPHA.toUpperCase() + DIGIT
623
- };
624
-
625
- const generateString = (size = 16, alphabet = ALPHABET.ALPHA_DIGIT) => {
626
- let str = '';
627
- const {length} = alphabet;
628
- while (size--) {
629
- str += alphabet[Math.random() * length|0];
630
- }
631
-
632
- return str;
633
- };
634
-
635
615
  /**
636
616
  * If the thing is a FormData object, return true, otherwise return false.
637
617
  *
@@ -759,8 +739,6 @@ const utils$1 = {
759
739
  findKey,
760
740
  global: _global,
761
741
  isContextDefined,
762
- ALPHABET,
763
- generateString,
764
742
  isSpecCompliantForm,
765
743
  toJSONObject,
766
744
  isAsyncFn,
@@ -2253,8 +2231,9 @@ function combineURLs(baseURL, relativeURL) {
2253
2231
  *
2254
2232
  * @returns {string} The combined full path
2255
2233
  */
2256
- function buildFullPath(baseURL, requestedURL) {
2257
- if (baseURL && !isAbsoluteURL(requestedURL)) {
2234
+ function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls) {
2235
+ let isRelativeUrl = !isAbsoluteURL(requestedURL);
2236
+ if (baseURL && isRelativeUrl || allowAbsoluteUrls == false) {
2258
2237
  return combineURLs(baseURL, requestedURL);
2259
2238
  }
2260
2239
  return requestedURL;
@@ -3094,7 +3073,7 @@ function dispatchRequest(config) {
3094
3073
  });
3095
3074
  }
3096
3075
 
3097
- const VERSION = "1.7.9";
3076
+ const VERSION = "1.8.1";
3098
3077
 
3099
3078
  const validators$1 = {};
3100
3079
 
@@ -3279,6 +3258,13 @@ class Axios {
3279
3258
  }
3280
3259
  }
3281
3260
 
3261
+ // Set config.allowAbsoluteUrls
3262
+ if (config.allowAbsoluteUrls !== undefined) ; else if (this.defaults.allowAbsoluteUrls !== undefined) {
3263
+ config.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls;
3264
+ } else {
3265
+ config.allowAbsoluteUrls = true;
3266
+ }
3267
+
3282
3268
  validator.assertOptions(config, {
3283
3269
  baseUrl: validators.spelling('baseURL'),
3284
3270
  withXsrfToken: validators.spelling('withXSRFToken')
@@ -3374,7 +3360,7 @@ class Axios {
3374
3360
 
3375
3361
  getUri(config) {
3376
3362
  config = mergeConfig(this.defaults, config);
3377
- const fullPath = buildFullPath(config.baseURL, config.url);
3363
+ const fullPath = buildFullPath(config.baseURL, config.url, config.allowAbsoluteUrls);
3378
3364
  return buildURL(fullPath, config.params, config.paramsSerializer);
3379
3365
  }
3380
3366
  }
@@ -3831,7 +3817,6 @@ const VerdocsContactPicker = /*@__PURE__*/ proxyCustomElement(class VerdocsConta
3831
3817
  handleSubmit(e) {
3832
3818
  var _a;
3833
3819
  e.stopPropagation();
3834
- console.log('sub');
3835
3820
  this.showSuggestions = false;
3836
3821
  (_a = this.next) === null || _a === void 0 ? void 0 : _a.emit({
3837
3822
  first_name: this.first_name,
@@ -3883,29 +3868,29 @@ const VerdocsContactPicker = /*@__PURE__*/ proxyCustomElement(class VerdocsConta
3883
3868
  if (((_t = (_s = (_r = this.featureFlags) === null || _r === void 0 ? void 0 : _r.toggles) === null || _s === void 0 ? void 0 : _s.find(t => t.name === 'id-verification')) === null || _t === void 0 ? void 0 : _t.enabled) === true && !!this.activeEntitlements.id_auth) {
3884
3869
  verificationOptions.push({ label: 'ID Check', value: 'id' });
3885
3870
  }
3886
- return (h("form", { key: 'b2cda11b375e553371cc05752be032dcc64fb372', onSubmit: e => e.preventDefault(), onClick: e => e.stopPropagation(), autocomplete: "off" }, h("div", { key: '604d484cc9c77a84a2853ddeef8255f871532cf3', class: "row" }, h("label", { key: '99c7c4c15a51d09b0266ebbc9688540ea068b430', htmlFor: this.firstNameFieldId }, "Name:"), h("div", { key: 'aeb977e092aca353119db0ff1afa258f45850e35', class: "names-row" }, h("input", { key: '1564f8fb970581524148889aa8a4a8d0981398a7', id: this.firstNameFieldId, name: this.firstNameFieldId, type: "text", "data-lpignore": "true", autocomplete: "blocked", "aria-autocomplete": "none", value: this.first_name, placeholder: "First...", onFocus: () => {
3871
+ return (h("form", { key: '04692a50db278a08b263fa5343a90f832b7a39ee', onSubmit: e => e.preventDefault(), onClick: e => e.stopPropagation(), autocomplete: "off" }, h("div", { key: '49c73586ee2a3b55284c7060578ce2f76442eb7f', class: "row" }, h("label", { key: 'c14e09c5fafc682f8e84409cabb8c16080a542ef', htmlFor: this.firstNameFieldId }, "Name:"), h("div", { key: '64d1f1411604edaab598852ecccbd2e81cac5d01', class: "names-row" }, h("input", { key: 'ab738a6d5fb36378c6cae917ffc0cce34eefc251', id: this.firstNameFieldId, name: this.firstNameFieldId, type: "text", "data-lpignore": "true", autocomplete: "blocked", "aria-autocomplete": "none", value: this.first_name, placeholder: "First...", onFocus: () => {
3887
3872
  // Give the blur event a chance to hide it first if going between first/last
3888
3873
  setTimeout(() => {
3889
3874
  var _a;
3890
3875
  this.showSuggestions = ((_a = this.contactSuggestions) === null || _a === void 0 ? void 0 : _a.length) > 0;
3891
3876
  }, 100);
3892
- }, onInput: e => this.handleFirstNameChange(e) }), h("input", { key: '66d1d0456f24d49fe0be746c4f35c0b3a12ba841', id: this.lastNameFieldId, name: this.lastNameFieldId, type: "text", "data-lpignore": "true", autocomplete: "blocked", "aria-autocomplete": "none", value: this.last_name, placeholder: "Last...", onFocus: () => {
3877
+ }, onInput: e => this.handleFirstNameChange(e) }), h("input", { key: 'e78173446c9eb0d24125b1e9a614948b2c0dea34', id: this.lastNameFieldId, name: this.lastNameFieldId, type: "text", "data-lpignore": "true", autocomplete: "blocked", "aria-autocomplete": "none", value: this.last_name, placeholder: "Last...", onFocus: () => {
3893
3878
  // Give the blur event a chance to hide it first if going between first/last
3894
3879
  setTimeout(() => {
3895
3880
  var _a;
3896
3881
  this.showSuggestions = ((_a = this.contactSuggestions) === null || _a === void 0 ? void 0 : _a.length) > 0;
3897
3882
  }, 100);
3898
- }, onInput: e => this.handleLastNameChange(e) })), this.showSuggestions && (h("verdocs-portal", { key: '674571611b133f76e90d07685632b7430d0eb7c4', anchor: this.firstNameFieldId, onClickAway: () => (this.showSuggestions = false), id: "verdocs-contact-picker-suggestions" }, h("div", { key: 'c5e53ec590fc64b092d08540ac39ca482e78a79c', class: "dropdown" }, this.contactSuggestions
3883
+ }, onInput: e => this.handleLastNameChange(e) })), this.showSuggestions && (h("verdocs-portal", { key: '9947a7f8ab42d1790df06e579796d4a2e93245d1', anchor: this.firstNameFieldId, onClickAway: () => (this.showSuggestions = false), id: "verdocs-contact-picker-suggestions" }, h("div", { key: 'fbc62ab9fe1d080bd24cdcd6d06af7608957566c', class: "dropdown" }, this.contactSuggestions
3899
3884
  .filter(suggestion => !this.first_name || suggestion.first_name.toLowerCase().includes(this.first_name.toLowerCase()))
3900
3885
  .map(suggestion => {
3901
3886
  var _a;
3902
3887
  return (h("div", { key: (_a = suggestion.id) !== null && _a !== void 0 ? _a : suggestion.email, class: "suggestion", onClick: e => this.handleSelectSuggestion(e, suggestion) }, suggestion.picture ? h("img", { alt: "Avatar", class: "avatar", src: suggestion.picture }) : h("div", { class: "avatar", innerHTML: addrBookIcon }), h("div", { class: "details" }, h("div", { class: "name" }, formatFullName(suggestion)), suggestion.email && h("div", { class: "destination" }, suggestion.email), suggestion.phone && h("div", { class: "destination" }, suggestion.phone))));
3903
- }))))), h("div", { key: '61a05720167114b362f5c2c4f6ee794e9a823059', class: "row" }, h("label", { key: '9432c1386e24d7f8d09dc5415958bf88e49ed83c', htmlFor: this.emailFieldId }, "Email:"), h("input", { key: 'b5ce556ba67b26bfd09e9d6b0ea0427363355510', id: this.emailFieldId, name: this.emailFieldId, type: "text", "data-lpignore": "true", autoComplete: "blocked", "aria-autocomplete": "none", value: this.email, placeholder: "Invite/verify via email...", onFocus: () => (this.showSuggestions = false), onInput: (e) => (this.email = e.target.value) })), globalSMS && (h("div", { key: '6bf7712b43c8b7924ff792290c723a66a1a62296', class: "row" }, h("label", { key: 'e3744f9b285d7624b65ad4d94909c36cd156bb2d', htmlFor: this.phoneFieldId }, "Phone:"), h("input", { key: 'e249b2e1432384b95a75fc3fb9a889cefd43fb14', id: this.phoneFieldId, name: this.phoneFieldId, type: "text", "data-lpignore": "true", autoComplete: "blocked", "aria-autocomplete": "none", value: this.phone, placeholder: "Invite/verify via SMS...", onFocus: () => (this.showSuggestions = false), onInput: (e) => {
3888
+ }))))), h("div", { key: 'e8e70c9c0eb9aac2949ea3f1cdcad31a0109b1e6', class: "row" }, h("label", { key: '1a0446066a2337a8317e4f1a30a7b4bbaac8e9d9', htmlFor: this.emailFieldId }, "Email:"), h("input", { key: '700f23efdcdad3569e37f68beb87254768997476', id: this.emailFieldId, name: this.emailFieldId, type: "text", "data-lpignore": "true", autoComplete: "blocked", "aria-autocomplete": "none", value: this.email, placeholder: "Invite/verify via email...", onFocus: () => (this.showSuggestions = false), onInput: (e) => (this.email = e.target.value) })), globalSMS && (h("div", { key: 'e10b121fcc2c612b95a9e8ebd35fbbaba78f31ff', class: "row" }, h("label", { key: '924df4057ae82c1a42a060f6457999e9e7be3e9d', htmlFor: this.phoneFieldId }, "Phone:"), h("input", { key: 'be1707e6c04744891626dd14ce7beee679e33b95', id: this.phoneFieldId, name: this.phoneFieldId, type: "text", "data-lpignore": "true", autoComplete: "blocked", "aria-autocomplete": "none", value: this.phone, placeholder: "Invite/verify via SMS...", onFocus: () => (this.showSuggestions = false), onInput: (e) => {
3904
3889
  this.phone = convertToE164(e.target.value);
3905
- } }))), h(Fragment, { key: '202d93245182ee54519b9f58962facd0a9f524d0' }, verificationOptions.length > 0 && (h("div", { key: '0af26fd7633cb6f062e56be65adac2743814304e', class: "row" }, h("label", { key: 'ed1366652b0db48b1e2f41dc6d65348c9699887e' }, "Recipient Verification:"), h("verdocs-multiselect", { key: '107921cec4e2d8b7a7ea11c7451451a50216e08a', label: "", placeholder: "None", options: verificationOptions, selectedOptions: this.auth_methods, onSelectionChanged: (e) => {
3890
+ } }))), h(Fragment, { key: 'a27e49219aed619f6ce094ca91d7bdb8ee4bd361' }, verificationOptions.length > 0 && (h("div", { key: '3c2eb231a5e10223a0554b2661f7902a7343ff14', class: "row" }, h("label", { key: '2424d844f6c54d6898aff3746c665e8f0028393f' }, "Recipient Verification:"), h("verdocs-multiselect", { key: '15e4fdff72818343d016749c83a10602083c19db', label: "", placeholder: "None", options: verificationOptions, selectedOptions: this.auth_methods, onSelectionChanged: (e) => {
3906
3891
  console.log('selectedOptions changed', e.detail);
3907
3892
  this.auth_methods = e.detail.selectedOptions;
3908
- } }))), this.auth_methods.includes('passcode') && (h("div", { key: '2a9e0e955211846e2875661fd9408e7e58092504', class: "row pin-code" }, h("label", { key: '8295693a69e940d6f5a00f0972766bbf0e13a18f', htmlFor: this.phoneFieldId }, "Passcode:"), h("input", { key: '60e78fb22245e97efab765e3a47f112b4bb58341', id: "verdocs-passcode", name: "verdocs-passcode", type: "text", "data-lpignore": "true", autocomplete: "blocked", "aria-autocomplete": "none", value: this.passcode, placeholder: "4-8 digits recommended...", onFocus: () => (this.showSuggestions = false), onInput: (e) => (this.passcode = e.target.value) })))), h("div", { key: '47ed4c44d6f4e0f9d5d9733a47183e9c652d7a1b', class: "row message" }, h("label", { key: 'a471e42ac85935d711f4ff362c3f5c01b84bab82', htmlFor: "verdocs-contact-picker-message" }, "Message:"), h("textarea", { key: 'c3b3011e031f0552ad18bf3d14525b439f729b6f', id: "verdocs-contact-picker-message", name: "verdocs-contact-picker-message", "data-lpignore": "true", autocomplete: "blocked", placeholder: "Optional message to include in invitation...", onFocus: () => (this.showSuggestions = false), onInput: (e) => (this.message = e.target.value) }, this.message)), h("div", { key: '02e7f7d6f8fb67ce5c301fc573a91234ac8c0a1a', class: "buttons" }, h("div", { key: '217bdfe57aae7db9ed38e4e0430e3fb017c2f206', class: "flex-fill" }), h("verdocs-button", { key: '91b7541ffaf7b2ca2b18dfb0962cde71e11669f8', variant: "outline", label: "Cancel", size: "small", onClick: e => this.handleCancel(e) }), h("verdocs-button", { key: 'd55e4aad3e7647d05e7052e9ee1176855101d598', label: "OK", size: "small", disabled: !canSubmit, onClick: !canSubmit ? () => { } : e => this.handleSubmit(e) }))));
3893
+ } }))), this.auth_methods.includes('passcode') && (h("div", { key: 'cb92bbf38b29b81dd443ea63ee52f5c38ca3e462', class: "row pin-code" }, h("label", { key: 'a31d6aa08952a78774e0f7d6fc89a0c992fff0ce', htmlFor: this.phoneFieldId }, "Passcode:"), h("input", { key: '416d22a451995e318fed41b36feda632b7324231', id: "verdocs-passcode", name: "verdocs-passcode", type: "text", "data-lpignore": "true", autocomplete: "blocked", "aria-autocomplete": "none", value: this.passcode, placeholder: "4-8 digits recommended...", onFocus: () => (this.showSuggestions = false), onInput: (e) => (this.passcode = e.target.value) })))), h("div", { key: '12d5f81d3750dfbec08c01d9f9e5ef8ff4e4ab61', class: "row message" }, h("label", { key: 'c5d2265df1203c2f1cb09e4ef99ece909a11c3d1', htmlFor: "verdocs-contact-picker-message" }, "Message:"), h("textarea", { key: '875a4a055860497d1b5f270fe9e4f76fd1594d86', id: "verdocs-contact-picker-message", name: "verdocs-contact-picker-message", "data-lpignore": "true", autocomplete: "blocked", placeholder: "Optional message to include in invitation...", onFocus: () => (this.showSuggestions = false), onInput: (e) => (this.message = e.target.value) }, this.message)), h("div", { key: 'fc5dc7ca853d00fbeb22b912f7da5db32c394bdb', class: "buttons" }, h("div", { key: 'cb19eed74dcc4a093d0420352e31b50c252ca857', class: "flex-fill" }), h("verdocs-button", { key: 'b94abf0ba4e07bdb661aee267a2d23bd1e5f9555', variant: "outline", label: "Cancel", size: "small", onClick: e => this.handleCancel(e) }), h("verdocs-button", { key: '2ad4cf79ebbac22818caee6fd732cf4cbf01436b', label: "OK", size: "small", disabled: !canSubmit, onClick: !canSubmit ? () => { } : e => this.handleSubmit(e) }))));
3909
3894
  }
3910
3895
  static get style() { return VerdocsContactPickerStyle0; }
3911
3896
  }, [0, "verdocs-contact-picker", {
@@ -3967,4 +3952,4 @@ function defineCustomElement() {
3967
3952
 
3968
3953
  export { VerdocsContactPicker as V, defineCustomElement as d };
3969
3954
 
3970
- //# sourceMappingURL=p-6bfb8eba.js.map
3955
+ //# sourceMappingURL=p-73a39d5a.js.map