@verdocs/web-sdk 6.2.4 → 6.2.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (83) hide show
  1. package/dist/cjs/verdocs-checkbox.verdocs-component-error.verdocs-loader.verdocs-select-input.verdocs-template-field-properties.entry.cjs.js.map +1 -1
  2. package/dist/cjs/verdocs-checkbox_5.cjs.entry.js +1 -0
  3. package/dist/cjs/verdocs-preview.verdocs-send.verdocs-template-attachments.verdocs-template-build-tabs.verdocs-template-fields.verdocs-template-roles.verdocs-template-settings.entry.cjs.js.map +1 -1
  4. package/dist/cjs/verdocs-preview_7.cjs.entry.js +3 -2
  5. package/dist/collection/components/templates/verdocs-template-field-properties/verdocs-template-field-properties.js +1 -0
  6. package/dist/collection/components/templates/verdocs-template-field-properties/verdocs-template-field-properties.js.map +1 -1
  7. package/dist/collection/components/templates/verdocs-template-fields/verdocs-template-fields.js +3 -2
  8. package/dist/collection/components/templates/verdocs-template-fields/verdocs-template-fields.js.map +1 -1
  9. package/dist/components/{p-DK8_N2Na.js → p-80nhsQfQ.js} +14 -14
  10. package/dist/components/{p-DK8_N2Na.js.map → p-80nhsQfQ.js.map} +1 -1
  11. package/dist/components/{p-L3HpKTaM.js → p-BJqJsTbt.js} +3 -3
  12. package/dist/components/{p-L3HpKTaM.js.map → p-BJqJsTbt.js.map} +1 -1
  13. package/dist/components/{p-DSO1_d48.js → p-BPPiqx8Q.js} +3 -3
  14. package/dist/components/{p-DSO1_d48.js.map → p-BPPiqx8Q.js.map} +1 -1
  15. package/dist/components/{p-C4lOZS20.js → p-BiqAkA9R.js} +3 -3
  16. package/dist/components/{p-C4lOZS20.js.map → p-BiqAkA9R.js.map} +1 -1
  17. package/dist/components/{p-BVuTqQTL.js → p-BiuMDRxW.js} +3 -3
  18. package/dist/components/{p-BVuTqQTL.js.map → p-BiuMDRxW.js.map} +1 -1
  19. package/dist/components/{p-6s2A2xbN.js → p-CA_Xcyt7.js} +17 -16
  20. package/dist/components/p-CA_Xcyt7.js.map +1 -0
  21. package/dist/components/{p-CcIaiNEM.js → p-Ck_1uk0F.js} +3 -3
  22. package/dist/components/{p-CcIaiNEM.js.map → p-Ck_1uk0F.js.map} +1 -1
  23. package/dist/components/{p-BXFf3Lpk.js → p-CnRyZDAM.js} +3 -3
  24. package/dist/components/{p-BXFf3Lpk.js.map → p-CnRyZDAM.js.map} +1 -1
  25. package/dist/components/{p-mjn4Ftey.js → p-CzUVVFEJ.js} +13 -13
  26. package/dist/components/{p-mjn4Ftey.js.map → p-CzUVVFEJ.js.map} +1 -1
  27. package/dist/components/{p-TkHAxPB_.js → p-Da1nfhXq.js} +3 -2
  28. package/dist/components/p-Da1nfhXq.js.map +1 -0
  29. package/dist/components/{p-B4UtR_2c.js → p-IbPNQm1I.js} +3 -3
  30. package/dist/components/{p-B4UtR_2c.js.map → p-IbPNQm1I.js.map} +1 -1
  31. package/dist/components/{p-DfTz53m-.js → p-LPa2SLXL.js} +3 -3
  32. package/dist/components/{p-DfTz53m-.js.map → p-LPa2SLXL.js.map} +1 -1
  33. package/dist/components/{p-CtbvYEGE.js → p-gGtgKfmC.js} +3 -3
  34. package/dist/components/{p-CtbvYEGE.js.map → p-gGtgKfmC.js.map} +1 -1
  35. package/dist/components/{p-B0MvlQO2.js → p-jXH2SygA.js} +3 -3
  36. package/dist/components/{p-B0MvlQO2.js.map → p-jXH2SygA.js.map} +1 -1
  37. package/dist/components/verdocs-build.js +14 -14
  38. package/dist/components/verdocs-field-attachment.js +1 -1
  39. package/dist/components/verdocs-field-checkbox.js +1 -1
  40. package/dist/components/verdocs-field-date.js +1 -1
  41. package/dist/components/verdocs-field-dropdown.js +1 -1
  42. package/dist/components/verdocs-field-initial.js +1 -1
  43. package/dist/components/verdocs-field-payment.js +1 -1
  44. package/dist/components/verdocs-field-radio.js +1 -1
  45. package/dist/components/verdocs-field-signature.js +1 -1
  46. package/dist/components/verdocs-field-textarea.js +1 -1
  47. package/dist/components/verdocs-field-textbox.js +1 -1
  48. package/dist/components/verdocs-field-timestamp.js +1 -1
  49. package/dist/components/verdocs-preview.js +1 -1
  50. package/dist/components/verdocs-template-document-page.js +1 -1
  51. package/dist/components/verdocs-template-field-properties.js +1 -1
  52. package/dist/components/verdocs-template-fields.js +1 -1
  53. package/dist/esm/verdocs-checkbox.verdocs-component-error.verdocs-loader.verdocs-select-input.verdocs-template-field-properties.entry.js.map +1 -1
  54. package/dist/esm/verdocs-checkbox_5.entry.js +1 -0
  55. package/dist/esm/verdocs-preview.verdocs-send.verdocs-template-attachments.verdocs-template-build-tabs.verdocs-template-fields.verdocs-template-roles.verdocs-template-settings.entry.js.map +1 -1
  56. package/dist/esm/verdocs-preview_7.entry.js +3 -2
  57. package/dist/esm-es5/verdocs-checkbox.verdocs-component-error.verdocs-loader.verdocs-select-input.verdocs-template-field-properties.entry.js.map +1 -1
  58. package/dist/esm-es5/verdocs-checkbox_5.entry.js +1 -1
  59. package/dist/esm-es5/verdocs-checkbox_5.entry.js.map +1 -1
  60. package/dist/esm-es5/verdocs-preview.verdocs-send.verdocs-template-attachments.verdocs-template-build-tabs.verdocs-template-fields.verdocs-template-roles.verdocs-template-settings.entry.js.map +1 -1
  61. package/dist/esm-es5/verdocs-preview_7.entry.js +1 -1
  62. package/dist/esm-es5/verdocs-preview_7.entry.js.map +1 -1
  63. package/dist/verdocs-web-sdk/{p-74f5a0bd.entry.js → p-77a3e9ea.entry.js} +2 -2
  64. package/dist/verdocs-web-sdk/p-77a3e9ea.entry.js.map +1 -0
  65. package/dist/verdocs-web-sdk/{p-df9a63c8.system.entry.js → p-77a96b42.system.entry.js} +2 -2
  66. package/dist/verdocs-web-sdk/{p-df9a63c8.system.entry.js.map → p-77a96b42.system.entry.js.map} +1 -1
  67. package/dist/verdocs-web-sdk/p-BSxnvcXp.system.js +1 -1
  68. package/dist/verdocs-web-sdk/p-L9recsMg.system.js.map +1 -0
  69. package/dist/verdocs-web-sdk/{p-a4af0218.system.entry.js → p-bd7e0e8f.system.entry.js} +3 -3
  70. package/dist/verdocs-web-sdk/p-bd7e0e8f.system.entry.js.map +1 -0
  71. package/dist/verdocs-web-sdk/{p-f4d573b8.entry.js → p-da01f5fd.entry.js} +3 -3
  72. package/dist/verdocs-web-sdk/p-da01f5fd.entry.js.map +1 -0
  73. package/dist/verdocs-web-sdk/{p-Cdv-0jBY.system.js.map → p-gJaz09Zo.system.js.map} +1 -1
  74. package/dist/verdocs-web-sdk/verdocs-checkbox.verdocs-component-error.verdocs-loader.verdocs-select-input.verdocs-template-field-properties.entry.esm.js.map +1 -1
  75. package/dist/verdocs-web-sdk/verdocs-preview.verdocs-send.verdocs-template-attachments.verdocs-template-build-tabs.verdocs-template-fields.verdocs-template-roles.verdocs-template-settings.entry.esm.js.map +1 -1
  76. package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +1 -1
  77. package/package.json +2 -2
  78. package/dist/components/p-6s2A2xbN.js.map +0 -1
  79. package/dist/components/p-TkHAxPB_.js.map +0 -1
  80. package/dist/verdocs-web-sdk/p-74f5a0bd.entry.js.map +0 -1
  81. package/dist/verdocs-web-sdk/p-BYcAVzPM.system.js.map +0 -1
  82. package/dist/verdocs-web-sdk/p-a4af0218.system.entry.js.map +0 -1
  83. package/dist/verdocs-web-sdk/p-f4d573b8.entry.js.map +0 -1
@@ -1 +1 @@
1
- {"file":"p-B4UtR_2c.js","mappings":";;;;;;;;;;;;;;;AAAA,MAAM,sBAAsB,GAAG,mpGAAmpG;;MCerqG,mBAAmB,iBAAAA,kBAAA,CAAA,MAAA,mBAAA,SAAAC,CAAA,CAAA;AALhC,IAAA,WAAA,CAAA,YAAA,EAAA;;;;;;;AASE;;AAEG;AACoB,QAAA,IAAM,CAAA,MAAA,GAA4B,UAAU;AAEnE;;AAEG;AACoB,QAAA,IAAQ,CAAA,QAAA,GAAW,EAAE;AAE5C;;AAEG;AACoB,QAAA,IAAS,CAAA,SAAA,GAAW,EAAE;AAE7C;;;AAGG;AACK,QAAA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AA,IAAA,EAAA,KAAA,MAAA,GAAA,MAAA,GAAA,EAAA,CAAA,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC;AACpC,gBAAA,OAAO,IAAI,CAAC,iBAAiB,EAAE;AACjC,aAAC,EACD,QAAQ,EACN,oOAAoO,EAAA,CAEtO,CACa,CAClB,CACQ,CACZ,CACI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement"],"sources":["src/components/fields/verdocs-field-textbox/verdocs-field-textbox.scss?tag=verdocs-field-textbox","src/components/fields/verdocs-field-textbox/verdocs-field-textbox.tsx"],"sourcesContent":["@import '../../../theme.scss';\n\nverdocs-field-textbox {\n font-family: $verdocs-primary-font;\n box-sizing: border-box;\n width: 150px;\n height: 15px;\n display: block;\n font-size: 11px;\n position: relative;\n scroll-margin: 20px 0;\n letter-spacing: -0.2px;\n background-color: transparent;\n transform-origin: bottom left;\n border: 1px solid rgba(0, 0, 0, 0.2);\n\n .edge-top,\n .edge-right,\n .edge-left,\n .edge-bottom {\n position: absolute;\n z-index: 10;\n }\n\n .edge-top {\n top: -2px;\n left: 0;\n right: 0;\n height: 5px;\n }\n\n .edge-right {\n top: 0;\n bottom: 0;\n right: -2px;\n width: 5px;\n }\n\n .edge-left {\n top: 0;\n left: -2px;\n bottom: 0;\n width: 5px;\n }\n\n .edge-bottom {\n bottom: -2px;\n left: 0;\n right: 0;\n height: 5px;\n }\n\n input {\n // This is needed to bring down the cursor from the parent element, which is where interactjs applies it\n cursor: inherit;\n\n width: 100%;\n height: 100%;\n border: none;\n outline: none;\n padding: 0 3px;\n font-size: 11px;\n background: none;\n font-weight: 500;\n position: absolute;\n transform-origin: 0 0;\n box-sizing: border-box;\n color: rgba(0, 0, 0, 0.87);\n\n &.hide {\n display: none;\n }\n }\n\n &.disabled input {\n opacity: 0.5;\n }\n\n textarea {\n // This is needed to bring down the cursor from the parent element, which is where interactjs applies it\n cursor: inherit;\n\n width: 100%;\n height: 100%;\n resize: none;\n border: none;\n outline: none;\n padding: 0 3px;\n font-size: 11px;\n background: none;\n font-weight: 500;\n transform-origin: 0 0;\n box-sizing: border-box;\n color: rgba(0, 0, 0, 0.87);\n\n &.hide {\n display: none;\n }\n }\n\n &.disabled textarea {\n opacity: 0.5;\n }\n\n label {\n top: -14px;\n left: -1px;\n height: 14px;\n color: white;\n padding: 0 4px;\n font-size: 9px;\n line-height: 13px;\n position: absolute;\n background: #4a4a99;\n border-top-left-radius: 2px;\n border-top-right-radius: 2px;\n }\n\n &.required {\n border: 1px solid rgb(204, 0, 0);\n }\n\n &.focused {\n animation: verdocs-field-pulse 0.4s 1;\n }\n\n verdocs-button-panel {\n top: -3px;\n left: -2px;\n opacity: 0.5;\n z-index: 1000;\n cursor: pointer;\n position: absolute;\n transform: scale(0.6);\n\n &[data-active],\n &:hover {\n opacity: 1;\n }\n\n .icon {\n svg {\n fill: #333333;\n }\n\n &:hover {\n svg {\n fill: #000000;\n }\n }\n }\n }\n\n // @see https://community.logmein.com/t5/LastPass-Support-Discussions/placeholder-text-overrides-data-lpignore-quot-true-quot/td-p/295135\n // LastPass is ignoring the data-lpignore attribute in some cases\n [data-lastpass-icon-root] {\n display: none !important;\n }\n\n .settings-icon {\n position: absolute;\n top: -4px;\n left: -18px;\n display: inline-block;\n cursor: pointer;\n opacity: 0.3;\n\n svg {\n fill: $border-color;\n }\n\n &:hover {\n opacity: 1;\n }\n }\n}\n\n@keyframes verdocs-field-pulse {\n 0% {\n background-color: rgba(0, 0, 0, 0.35);\n }\n 50% {\n background-color: rgba(0, 0, 0, 0);\n }\n 100% {\n background-color: rgba(0, 0, 0, 0.35);\n }\n}\n","import interact from 'interactjs';\nimport {getRGBA, IEnvelopeField, ITemplate, ITemplateField, updateField, VerdocsEndpoint} from '@verdocs/js-sdk';\nimport {Component, h, Host, Element, Prop, Method, Event, EventEmitter, Fragment, State} from '@stencil/core';\nimport {SettingsIcon} from '../../../utils/Icons';\nimport {Store} from '../../../utils/Datastore';\nimport {ResizeEvent} from '@interactjs/actions/resize/plugin';\n\n/**\n * Display a simple 1-line text input field.\n */\n@Component({\n tag: 'verdocs-field-textbox',\n styleUrl: 'verdocs-field-textbox.scss',\n shadow: false,\n})\nexport class VerdocsFieldTextbox {\n @Element() el: HTMLElement;\n private inputEl: HTMLInputElement | HTMLTextAreaElement;\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 * Override the field's settings. This is intended to be used during signing when fields are being\n * mutated.\n */\n @Prop() field: IEnvelopeField | null | undefined = null;\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, overrides the field's settings object. Primarily used to support \"preview\" modes where all fields are disabled.\n */\n @Prop({reflect: true}) multiline?: 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 * 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() showingProperties?: boolean = false;\n @State() focused?: boolean = false;\n\n @Method()\n async focusField() {\n this.inputEl.focus();\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 this.showingProperties = false;\n }\n\n componentDidRender() {\n interact.dynamicDrop(true);\n\n if (this.editable) {\n interact(this.el).resizable({\n edges: {\n top: '.edge-top',\n left: '.edge-left',\n bottom: '.edge-bottom',\n right: '.edge-right',\n },\n modifiers: [\n interact.modifiers.restrictSize({\n min: {width: 30, height: 15},\n }),\n ],\n listeners: {\n start: this.handleResizeStart.bind(this),\n move: this.handleResize.bind(this),\n end: this.handleResizeEnd.bind(this),\n },\n });\n }\n }\n\n handleResizeStart(e: ResizeEvent) {\n e.preventDefault();\n e.stopPropagation();\n e.target.dataset.originalBottom = e.target.style.bottom;\n }\n\n handleResize(e: any) {\n let {width, height} = e.rect;\n\n const dX = e.deltaRect.left;\n const dY = e.deltaRect.bottom;\n const currentLeft = parseFloat(e.target.style.left);\n const currentBottom = parseFloat(e.target.style.bottom);\n\n width /= this.xscale;\n height /= this.yscale;\n\n Object.assign(e.target.style, {\n width: `${width}px`,\n height: `${height}px`,\n left: `${currentLeft + dX}px`,\n bottom: `${currentBottom - dY}px`,\n });\n }\n\n async handleResizeEnd(e: any) {\n const {sourceid, fieldname} = this;\n\n const width = Math.round(parseFloat(e.target.style.width));\n let height = Math.round(parseFloat(e.target.style.height));\n if (height < 20) {\n height = 15;\n }\n const multiline = height > 15;\n\n const newBottom = parseFloat(e.target.style.bottom);\n const originalBottom = parseFloat(e.target.dataset.originalBottom);\n const template = await Store.getTemplate(VerdocsEndpoint.getDefault(), this.sourceid);\n const oldField = template.fields.find(f => f.name === fieldname);\n const y = newBottom !== originalBottom ? newBottom / this.yscale : oldField?.y;\n\n updateField(VerdocsEndpoint.getDefault(), sourceid, fieldname, {width, height, y, multiline})\n .then(async updatedField => {\n const template = await Store.getTemplate(VerdocsEndpoint.getDefault(), this.sourceid);\n const newTemplate = JSON.parse(JSON.stringify(template)) as ITemplate;\n const fieldIndex = newTemplate.fields.findIndex(field => field.name === fieldname);\n if (fieldIndex > -1) {\n newTemplate.fields[fieldIndex] = updatedField;\n }\n Store.updateTemplate(this.sourceid, newTemplate);\n\n this.settingsChanged?.emit({fieldName: fieldname, field: updatedField});\n Object.assign(e.target.dataset, {x: 0, y: 0, h: 0});\n })\n .catch(e => console.log('Field update failed', e));\n }\n\n render() {\n const {source, sourceid, fieldname, editable = false, done = false, disabled = false, focused, xscale = 1, yscale = 1} = this;\n const {index, field} = Store.getField(source, sourceid, fieldname, this.field);\n let {required = false, placeholder = '', label = '', width = 150, readonly = false, default: value = '', multiline = false} = field || {};\n const backgroundColor = getRGBA(index);\n\n // TODO: Consolidate value/defaultValue handling between template and envelope fields.\n if ((field as any)?.value) {\n value = (field as any)?.value;\n }\n\n // TODO: This is an outdated technique from the old system. We should compute it.\n const maxlength = width / 5;\n\n if (done) {\n return <Host class={{done}}>{value}</Host>;\n }\n\n return (\n <Host class={{required, disabled, done, focused}} style={{backgroundColor}}>\n {editable && <div class=\"edge-top\" />}\n {editable && <div class=\"edge-right\" />}\n {editable && <div class=\"edge-left\" />}\n {editable && <div class=\"edge-bottom\" />}\n\n {label && <label>{label}</label>}\n\n {multiline ? (\n <textarea\n name={fieldname}\n required={required}\n placeholder={placeholder}\n disabled={readonly || disabled}\n ref={el => (this.inputEl = el)}\n onFocus={() => (this.focused = true)}\n onBlur={() => (this.focused = false)}\n >\n {value}\n </textarea>\n ) : (\n <input\n type=\"text\"\n value={value}\n name={fieldname}\n required={required}\n maxlength={maxlength}\n placeholder={placeholder}\n disabled={readonly || disabled}\n ref={el => (this.inputEl = el)}\n onFocus={() => (this.focused = true)}\n onBlur={() => (this.focused = false)}\n />\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-${fieldname}`} onClickAway={() => (this.showingProperties = false)}>\n <verdocs-template-field-properties\n templateId={sourceid}\n fieldName={fieldname}\n onClose={() => this.hideSettingsPanel()}\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={\n 'Text boxes may be used to capture simple text input. Participant-entered values will be stored for later retrieval via the \"name\" field.<br /><br />If marked required, the participant must complete the field before proceeding.'\n }\n />\n </verdocs-portal>\n )}\n </Fragment>\n )}\n </Host>\n );\n }\n}\n"],"version":3}
1
+ {"file":"p-IbPNQm1I.js","mappings":";;;;;;;;;;;;;;;AAAA,MAAM,sBAAsB,GAAG,mpGAAmpG;;MCerqG,mBAAmB,iBAAAA,kBAAA,CAAA,MAAA,mBAAA,SAAAC,CAAA,CAAA;AALhC,IAAA,WAAA,CAAA,YAAA,EAAA;;;;;;;AASE;;AAEG;AACoB,QAAA,IAAM,CAAA,MAAA,GAA4B,UAAU;AAEnE;;AAEG;AACoB,QAAA,IAAQ,CAAA,QAAA,GAAW,EAAE;AAE5C;;AAEG;AACoB,QAAA,IAAS,CAAA,SAAA,GAAW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GAAA,IAAI,CAAC,eAAe,MAAE,IAAA,IAAA,EAAA,KAAA,MAAA,GAAA,MAAA,GAAA,EAAA,CAAA,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC;AACpC,gBAAA,OAAO,IAAI,CAAC,iBAAiB,EAAE;AACjC,aAAC,EACD,QAAQ,EACN,oOAAoO,EAAA,CAEtO,CACa,CAClB,CACQ,CACZ,CACI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement"],"sources":["src/components/fields/verdocs-field-textbox/verdocs-field-textbox.scss?tag=verdocs-field-textbox","src/components/fields/verdocs-field-textbox/verdocs-field-textbox.tsx"],"sourcesContent":["@import '../../../theme.scss';\n\nverdocs-field-textbox {\n font-family: $verdocs-primary-font;\n box-sizing: border-box;\n width: 150px;\n height: 15px;\n display: block;\n font-size: 11px;\n position: relative;\n scroll-margin: 20px 0;\n letter-spacing: -0.2px;\n background-color: transparent;\n transform-origin: bottom left;\n border: 1px solid rgba(0, 0, 0, 0.2);\n\n .edge-top,\n .edge-right,\n .edge-left,\n .edge-bottom {\n position: absolute;\n z-index: 10;\n }\n\n .edge-top {\n top: -2px;\n left: 0;\n right: 0;\n height: 5px;\n }\n\n .edge-right {\n top: 0;\n bottom: 0;\n right: -2px;\n width: 5px;\n }\n\n .edge-left {\n top: 0;\n left: -2px;\n bottom: 0;\n width: 5px;\n }\n\n .edge-bottom {\n bottom: -2px;\n left: 0;\n right: 0;\n height: 5px;\n }\n\n input {\n // This is needed to bring down the cursor from the parent element, which is where interactjs applies it\n cursor: inherit;\n\n width: 100%;\n height: 100%;\n border: none;\n outline: none;\n padding: 0 3px;\n font-size: 11px;\n background: none;\n font-weight: 500;\n position: absolute;\n transform-origin: 0 0;\n box-sizing: border-box;\n color: rgba(0, 0, 0, 0.87);\n\n &.hide {\n display: none;\n }\n }\n\n &.disabled input {\n opacity: 0.5;\n }\n\n textarea {\n // This is needed to bring down the cursor from the parent element, which is where interactjs applies it\n cursor: inherit;\n\n width: 100%;\n height: 100%;\n resize: none;\n border: none;\n outline: none;\n padding: 0 3px;\n font-size: 11px;\n background: none;\n font-weight: 500;\n transform-origin: 0 0;\n box-sizing: border-box;\n color: rgba(0, 0, 0, 0.87);\n\n &.hide {\n display: none;\n }\n }\n\n &.disabled textarea {\n opacity: 0.5;\n }\n\n label {\n top: -14px;\n left: -1px;\n height: 14px;\n color: white;\n padding: 0 4px;\n font-size: 9px;\n line-height: 13px;\n position: absolute;\n background: #4a4a99;\n border-top-left-radius: 2px;\n border-top-right-radius: 2px;\n }\n\n &.required {\n border: 1px solid rgb(204, 0, 0);\n }\n\n &.focused {\n animation: verdocs-field-pulse 0.4s 1;\n }\n\n verdocs-button-panel {\n top: -3px;\n left: -2px;\n opacity: 0.5;\n z-index: 1000;\n cursor: pointer;\n position: absolute;\n transform: scale(0.6);\n\n &[data-active],\n &:hover {\n opacity: 1;\n }\n\n .icon {\n svg {\n fill: #333333;\n }\n\n &:hover {\n svg {\n fill: #000000;\n }\n }\n }\n }\n\n // @see https://community.logmein.com/t5/LastPass-Support-Discussions/placeholder-text-overrides-data-lpignore-quot-true-quot/td-p/295135\n // LastPass is ignoring the data-lpignore attribute in some cases\n [data-lastpass-icon-root] {\n display: none !important;\n }\n\n .settings-icon {\n position: absolute;\n top: -4px;\n left: -18px;\n display: inline-block;\n cursor: pointer;\n opacity: 0.3;\n\n svg {\n fill: $border-color;\n }\n\n &:hover {\n opacity: 1;\n }\n }\n}\n\n@keyframes verdocs-field-pulse {\n 0% {\n background-color: rgba(0, 0, 0, 0.35);\n }\n 50% {\n background-color: rgba(0, 0, 0, 0);\n }\n 100% {\n background-color: rgba(0, 0, 0, 0.35);\n }\n}\n","import interact from 'interactjs';\nimport {getRGBA, IEnvelopeField, ITemplate, ITemplateField, updateField, VerdocsEndpoint} from '@verdocs/js-sdk';\nimport {Component, h, Host, Element, Prop, Method, Event, EventEmitter, Fragment, State} from '@stencil/core';\nimport {SettingsIcon} from '../../../utils/Icons';\nimport {Store} from '../../../utils/Datastore';\nimport {ResizeEvent} from '@interactjs/actions/resize/plugin';\n\n/**\n * Display a simple 1-line text input field.\n */\n@Component({\n tag: 'verdocs-field-textbox',\n styleUrl: 'verdocs-field-textbox.scss',\n shadow: false,\n})\nexport class VerdocsFieldTextbox {\n @Element() el: HTMLElement;\n private inputEl: HTMLInputElement | HTMLTextAreaElement;\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 * Override the field's settings. This is intended to be used during signing when fields are being\n * mutated.\n */\n @Prop() field: IEnvelopeField | null | undefined = null;\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, overrides the field's settings object. Primarily used to support \"preview\" modes where all fields are disabled.\n */\n @Prop({reflect: true}) multiline?: 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 * 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() showingProperties?: boolean = false;\n @State() focused?: boolean = false;\n\n @Method()\n async focusField() {\n this.inputEl.focus();\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 this.showingProperties = false;\n }\n\n componentDidRender() {\n interact.dynamicDrop(true);\n\n if (this.editable) {\n interact(this.el).resizable({\n edges: {\n top: '.edge-top',\n left: '.edge-left',\n bottom: '.edge-bottom',\n right: '.edge-right',\n },\n modifiers: [\n interact.modifiers.restrictSize({\n min: {width: 30, height: 15},\n }),\n ],\n listeners: {\n start: this.handleResizeStart.bind(this),\n move: this.handleResize.bind(this),\n end: this.handleResizeEnd.bind(this),\n },\n });\n }\n }\n\n handleResizeStart(e: ResizeEvent) {\n e.preventDefault();\n e.stopPropagation();\n e.target.dataset.originalBottom = e.target.style.bottom;\n }\n\n handleResize(e: any) {\n let {width, height} = e.rect;\n\n const dX = e.deltaRect.left;\n const dY = e.deltaRect.bottom;\n const currentLeft = parseFloat(e.target.style.left);\n const currentBottom = parseFloat(e.target.style.bottom);\n\n width /= this.xscale;\n height /= this.yscale;\n\n Object.assign(e.target.style, {\n width: `${width}px`,\n height: `${height}px`,\n left: `${currentLeft + dX}px`,\n bottom: `${currentBottom - dY}px`,\n });\n }\n\n async handleResizeEnd(e: any) {\n const {sourceid, fieldname} = this;\n\n const width = Math.round(parseFloat(e.target.style.width));\n let height = Math.round(parseFloat(e.target.style.height));\n if (height < 20) {\n height = 15;\n }\n const multiline = height > 15;\n\n const newBottom = parseFloat(e.target.style.bottom);\n const originalBottom = parseFloat(e.target.dataset.originalBottom);\n const template = await Store.getTemplate(VerdocsEndpoint.getDefault(), this.sourceid);\n const oldField = template.fields.find(f => f.name === fieldname);\n const y = newBottom !== originalBottom ? newBottom / this.yscale : oldField?.y;\n\n updateField(VerdocsEndpoint.getDefault(), sourceid, fieldname, {width, height, y, multiline})\n .then(async updatedField => {\n const template = await Store.getTemplate(VerdocsEndpoint.getDefault(), this.sourceid);\n const newTemplate = JSON.parse(JSON.stringify(template)) as ITemplate;\n const fieldIndex = newTemplate.fields.findIndex(field => field.name === fieldname);\n if (fieldIndex > -1) {\n newTemplate.fields[fieldIndex] = updatedField;\n }\n Store.updateTemplate(this.sourceid, newTemplate);\n\n this.settingsChanged?.emit({fieldName: fieldname, field: updatedField});\n Object.assign(e.target.dataset, {x: 0, y: 0, h: 0});\n })\n .catch(e => console.log('Field update failed', e));\n }\n\n render() {\n const {source, sourceid, fieldname, editable = false, done = false, disabled = false, focused, xscale = 1, yscale = 1} = this;\n const {index, field} = Store.getField(source, sourceid, fieldname, this.field);\n let {required = false, placeholder = '', label = '', width = 150, readonly = false, default: value = '', multiline = false} = field || {};\n const backgroundColor = getRGBA(index);\n\n // TODO: Consolidate value/defaultValue handling between template and envelope fields.\n if ((field as any)?.value) {\n value = (field as any)?.value;\n }\n\n // TODO: This is an outdated technique from the old system. We should compute it.\n const maxlength = width / 5;\n\n if (done) {\n return <Host class={{done}}>{value}</Host>;\n }\n\n return (\n <Host class={{required, disabled, done, focused}} style={{backgroundColor}}>\n {editable && <div class=\"edge-top\" />}\n {editable && <div class=\"edge-right\" />}\n {editable && <div class=\"edge-left\" />}\n {editable && <div class=\"edge-bottom\" />}\n\n {label && <label>{label}</label>}\n\n {multiline ? (\n <textarea\n name={fieldname}\n required={required}\n placeholder={placeholder}\n disabled={readonly || disabled}\n ref={el => (this.inputEl = el)}\n onFocus={() => (this.focused = true)}\n onBlur={() => (this.focused = false)}\n >\n {value}\n </textarea>\n ) : (\n <input\n type=\"text\"\n value={value}\n name={fieldname}\n required={required}\n maxlength={maxlength}\n placeholder={placeholder}\n disabled={readonly || disabled}\n ref={el => (this.inputEl = el)}\n onFocus={() => (this.focused = true)}\n onBlur={() => (this.focused = false)}\n />\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-${fieldname}`} onClickAway={() => (this.showingProperties = false)}>\n <verdocs-template-field-properties\n templateId={sourceid}\n fieldName={fieldname}\n onClose={() => this.hideSettingsPanel()}\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={\n 'Text boxes may be used to capture simple text input. Participant-entered values will be stored for later retrieval via the \"name\" field.<br /><br />If marked required, the participant must complete the field before proceeding.'\n }\n />\n </verdocs-portal>\n )}\n </Fragment>\n )}\n </Host>\n );\n }\n}\n"],"version":3}
@@ -12,7 +12,7 @@ import { d as defineCustomElement$6 } from './p-DGJlf5J_.js';
12
12
  import { d as defineCustomElement$5 } from './p-D_QT5uZk.js';
13
13
  import { d as defineCustomElement$4 } from './p-C3iwT41e.js';
14
14
  import { d as defineCustomElement$3 } from './p-kvTSiSQ0.js';
15
- import { d as defineCustomElement$2 } from './p-TkHAxPB_.js';
15
+ import { d as defineCustomElement$2 } from './p-Da1nfhXq.js';
16
16
  import { d as defineCustomElement$1 } from './p-BvDqCFDj.js';
17
17
 
18
18
  const verdocsFieldDateCss = "@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-field-date{font-family:\"Inter\", -apple-system, \"Segoe UI\", \"Roboto\", \"Helvetica Neue\", sans-serif;width:74px;height:20px;display:block;font-size:11px;position:relative;scroll-margin:20px 0;letter-spacing:0.3px;background-color:transparent;-webkit-transform-origin:bottom left;transform-origin:bottom left}verdocs-field-date.focused{-webkit-animation:verdocs-field-pulse 0.4s 1;animation:verdocs-field-pulse 0.4s 1}verdocs-field-date label{top:-14px;left:0;height:14px;color:white;padding:0 4px;font-size:9px;line-height:13px;position:absolute;background:#4a4a99;border-top-left-radius:2px;border-top-right-radius:2px}verdocs-field-date input{position:absolute;font-size:12px;cursor:inherit;-webkit-box-sizing:border-box;box-sizing:border-box;color:rgba(0, 0, 0, 0.87);font-weight:500;-webkit-transform-origin:0 0;transform-origin:0 0;height:100%;width:100%;background:none;border:1px solid #cccccc;-webkit-appearance:none;-moz-appearance:none;appearance:none}verdocs-field-date input.hide{display:none}verdocs-field-date.disabled input{opacity:0.5}verdocs-field-date.required input{border:1px solid #cc0000}verdocs-field-date verdocs-button-panel{top:-3px;left:-2px;opacity:0.5;z-index:1000;cursor:pointer;position:absolute;-webkit-transform:scale(0.6);transform:scale(0.6)}verdocs-field-date verdocs-button-panel[data-active],verdocs-field-date verdocs-button-panel:hover{opacity:1}verdocs-field-date verdocs-button-panel .icon svg{fill:#333333}verdocs-field-date verdocs-button-panel .icon:hover svg{fill:#000000}verdocs-field-date .settings-icon{position:absolute;top:-3px;left:-18px;display:inline-block;cursor:pointer;opacity:0.3}verdocs-field-date .settings-icon svg{fill:#707ae5}verdocs-field-date .settings-icon:hover{opacity:1}.air-datepicker-cell.-year-.-other-decade-,.air-datepicker-cell.-day-.-other-month-{color:var(--adp-color-other-month)}.air-datepicker-cell.-year-.-other-decade-:hover,.air-datepicker-cell.-day-.-other-month-:hover{color:var(--adp-color-other-month-hover)}.-disabled-.-focus-.air-datepicker-cell.-year-.-other-decade-,.-disabled-.-focus-.air-datepicker-cell.-day-.-other-month-{color:var(--adp-color-other-month)}.-selected-.air-datepicker-cell.-year-.-other-decade-,.-selected-.air-datepicker-cell.-day-.-other-month-{color:#fff;background:var(--adp-background-color-selected-other-month)}.-selected-.-focus-.air-datepicker-cell.-year-.-other-decade-,.-selected-.-focus-.air-datepicker-cell.-day-.-other-month-{background:var(--adp-background-color-selected-other-month-focused)}.-in-range-.air-datepicker-cell.-year-.-other-decade-,.-in-range-.air-datepicker-cell.-day-.-other-month-{background-color:var(--adp-background-color-in-range);color:var(--adp-color)}.-in-range-.-focus-.air-datepicker-cell.-year-.-other-decade-,.-in-range-.-focus-.air-datepicker-cell.-day-.-other-month-{background-color:var(--adp-background-color-in-range-focused)}.air-datepicker-cell.-year-.-other-decade-:empty,.air-datepicker-cell.-day-.-other-month-:empty{background:none;border:none}.air-datepicker-cell{border-radius:var(--adp-cell-border-radius);-webkit-box-sizing:border-box;box-sizing:border-box;cursor:pointer;display:-ms-flexbox;display:flex;position:relative;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;z-index:1}.air-datepicker-cell.-focus-{background:var(--adp-cell-background-color-hover)}.air-datepicker-cell.-current-{color:var(--adp-color-current-date)}.air-datepicker-cell.-current-.-focus-{color:var(--adp-color)}.air-datepicker-cell.-current-.-in-range-{color:var(--adp-color-current-date)}.air-datepicker-cell.-disabled-{cursor:default;color:var(--adp-color-disabled)}.air-datepicker-cell.-disabled-.-focus-{color:var(--adp-color-disabled)}.air-datepicker-cell.-disabled-.-in-range-{color:var(--adp-color-disabled-in-range)}.air-datepicker-cell.-disabled-.-current-.-focus-{color:var(--adp-color-disabled)}.air-datepicker-cell.-in-range-{background:var(--adp-cell-background-color-in-range);border-radius:0}.air-datepicker-cell.-in-range-:hover{background:var(--adp-cell-background-color-in-range-hover)}.air-datepicker-cell.-range-from-{border:1px solid var(--adp-cell-border-color-in-range);background-color:var(--adp-cell-background-color-in-range);border-radius:var(--adp-cell-border-radius) 0 0 var(--adp-cell-border-radius)}.air-datepicker-cell.-range-to-{border:1px solid var(--adp-cell-border-color-in-range);background-color:var(--adp-cell-background-color-in-range);border-radius:0 var(--adp-cell-border-radius) var(--adp-cell-border-radius) 0}.air-datepicker-cell.-range-to-.-range-from-{border-radius:var(--adp-cell-border-radius)}.air-datepicker-cell.-selected-{color:#fff;border:none;background:var(--adp-cell-background-color-selected)}.air-datepicker-cell.-selected-.-current-{color:#fff;background:var(--adp-cell-background-color-selected)}.air-datepicker-cell.-selected-.-focus-{background:var(--adp-cell-background-color-selected-hover)}.air-datepicker-body{-webkit-transition:all var(--adp-transition-duration) var(--adp-transition-ease);transition:all var(--adp-transition-duration) var(--adp-transition-ease)}.air-datepicker-body.-hidden-{display:none}.air-datepicker-body--day-names{display:grid;grid-template-columns:repeat(7, var(--adp-day-cell-width));margin:8px 0 3px}.air-datepicker-body--day-name{color:var(--adp-day-name-color);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;-ms-flex:1;flex:1;text-align:center;text-transform:uppercase;font-size:0.8em}.air-datepicker-body--day-name.-clickable-{cursor:pointer}.air-datepicker-body--day-name.-clickable-:hover{color:var(--adp-day-name-color-hover)}.air-datepicker-body--cells{display:grid}.air-datepicker-body--cells.-days-{grid-template-columns:repeat(7, var(--adp-day-cell-width));grid-auto-rows:var(--adp-day-cell-height)}.air-datepicker-body--cells.-months-{grid-template-columns:repeat(3, 1fr);grid-auto-rows:var(--adp-month-cell-height)}.air-datepicker-body--cells.-years-{grid-template-columns:repeat(4, 1fr);grid-auto-rows:var(--adp-year-cell-height)}.air-datepicker-nav{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;border-bottom:1px solid var(--adp-border-color-inner);min-height:var(--adp-nav-height);padding:var(--adp-padding);-webkit-box-sizing:content-box;box-sizing:content-box}.-only-timepicker- .air-datepicker-nav{display:none}.air-datepicker-nav--title,.air-datepicker-nav--action{display:-ms-flexbox;display:flex;cursor:pointer;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}.air-datepicker-nav--action{width:var(--adp-nav-action-size);border-radius:var(--adp-border-radius);-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.air-datepicker-nav--action:hover{background:var(--adp-background-color-hover)}.air-datepicker-nav--action:active{background:var(--adp-background-color-active)}.air-datepicker-nav--action.-disabled-{visibility:hidden}.air-datepicker-nav--action svg{width:32px;height:32px}.air-datepicker-nav--action path{fill:none;stroke:var(--adp-nav-arrow-color);stroke-width:2px}.air-datepicker-nav--title{border-radius:var(--adp-border-radius);padding:0 8px}.air-datepicker-nav--title i{font-style:normal;color:var(--adp-nav-color-secondary);margin-left:0.3em}.air-datepicker-nav--title:hover{background:var(--adp-background-color-hover)}.air-datepicker-nav--title:active{background:var(--adp-background-color-active)}.air-datepicker-nav--title.-disabled-{cursor:default;background:none}.air-datepicker-buttons{display:grid;grid-auto-columns:1fr;grid-auto-flow:column}.air-datepicker-button{display:-ms-inline-flexbox;display:inline-flex;color:var(--adp-btn-color);border-radius:var(--adp-btn-border-radius);cursor:pointer;height:var(--adp-btn-height);border:none;background:rgba(255, 255, 255, 0)}.air-datepicker-button:hover{color:var(--adp-btn-color-hover);background:var(--adp-btn-background-color-hover)}.air-datepicker-button:focus{color:var(--adp-btn-color-hover);background:var(--adp-btn-background-color-hover);outline:none}.air-datepicker-button:active{background:var(--adp-btn-background-color-active)}.air-datepicker-button span{outline:none;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;width:100%;height:100%}.air-datepicker-time{display:grid;grid-template-columns:-webkit-max-content 1fr;grid-template-columns:max-content 1fr;grid-column-gap:12px;-ms-flex-align:center;align-items:center;position:relative;padding:0 var(--adp-time-padding-inner)}.-only-timepicker- .air-datepicker-time{border-top:none}.air-datepicker-time--current{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex:1;flex:1;font-size:14px;text-align:center}.air-datepicker-time--current-colon{margin:0 2px 3px;line-height:1}.air-datepicker-time--current-hours,.air-datepicker-time--current-minutes{line-height:1;font-size:19px;font-family:\"Century Gothic\", CenturyGothic, AppleGothic, sans-serif;position:relative;z-index:1}.air-datepicker-time--current-hours:after,.air-datepicker-time--current-minutes:after{content:\"\";background:var(--adp-background-color-hover);border-radius:var(--adp-border-radius);position:absolute;left:-2px;top:-3px;right:-2px;bottom:-2px;z-index:-1;opacity:0}.air-datepicker-time--current-hours.-focus-:after,.air-datepicker-time--current-minutes.-focus-:after{opacity:1}.air-datepicker-time--current-ampm{text-transform:uppercase;-ms-flex-item-align:end;align-self:flex-end;color:var(--adp-time-day-period-color);margin-left:6px;font-size:11px;margin-bottom:1px}.air-datepicker-time--row{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;font-size:11px;height:17px;background:-webkit-gradient(linear, left top, right top, from(var(--adp-time-track-color)), to(var(--adp-time-track-color))) left 50%/100% var(--adp-time-track-height) no-repeat;background:linear-gradient(to right, var(--adp-time-track-color), var(--adp-time-track-color)) left 50%/100% var(--adp-time-track-height) no-repeat}.air-datepicker-time--row:first-child{margin-bottom:4px}.air-datepicker-time--row input[type=range]{background:none;cursor:pointer;-ms-flex:1;flex:1;height:100%;width:100%;padding:0;margin:0;-webkit-appearance:none}.air-datepicker-time--row input[type=range]::-webkit-slider-thumb{-webkit-appearance:none}.air-datepicker-time--row input[type=range]::-ms-tooltip{display:none}.air-datepicker-time--row input[type=range]:hover::-webkit-slider-thumb{border-color:var(--adp-time-track-color-hover)}.air-datepicker-time--row input[type=range]:hover::-moz-range-thumb{border-color:var(--adp-time-track-color-hover)}.air-datepicker-time--row input[type=range]:hover::-ms-thumb{border-color:var(--adp-time-track-color-hover)}.air-datepicker-time--row input[type=range]:focus{outline:none}.air-datepicker-time--row input[type=range]:focus::-webkit-slider-thumb{background:var(--adp-cell-background-color-selected);border-color:var(--adp-cell-background-color-selected)}.air-datepicker-time--row input[type=range]:focus::-moz-range-thumb{background:var(--adp-cell-background-color-selected);border-color:var(--adp-cell-background-color-selected)}.air-datepicker-time--row input[type=range]:focus::-ms-thumb{background:var(--adp-cell-background-color-selected);border-color:var(--adp-cell-background-color-selected)}.air-datepicker-time--row input[type=range]::-webkit-slider-thumb{-webkit-box-sizing:border-box;box-sizing:border-box;height:12px;width:12px;border-radius:3px;border:1px solid var(--adp-time-track-color);background:#fff;cursor:pointer;-webkit-transition:background var(--adp-transition-duration);transition:background var(--adp-transition-duration)}.air-datepicker-time--row input[type=range]::-moz-range-thumb{box-sizing:border-box;height:12px;width:12px;border-radius:3px;border:1px solid var(--adp-time-track-color);background:#fff;cursor:pointer;-moz-transition:background var(--adp-transition-duration);transition:background var(--adp-transition-duration)}.air-datepicker-time--row input[type=range]::-ms-thumb{box-sizing:border-box;height:12px;width:12px;border-radius:3px;border:1px solid var(--adp-time-track-color);background:#fff;cursor:pointer;-ms-transition:background var(--adp-transition-duration);transition:background var(--adp-transition-duration)}.air-datepicker-time--row input[type=range]::-webkit-slider-thumb{margin-top:calc(var(--adp-time-thumb-size) / 2 * -1)}.air-datepicker-time--row input[type=range]::-webkit-slider-runnable-track{border:none;height:var(--adp-time-track-height);cursor:pointer;color:rgba(0, 0, 0, 0);background:rgba(0, 0, 0, 0)}.air-datepicker-time--row input[type=range]::-moz-range-track{border:none;height:var(--adp-time-track-height);cursor:pointer;color:rgba(0, 0, 0, 0);background:rgba(0, 0, 0, 0)}.air-datepicker-time--row input[type=range]::-ms-track{border:none;height:var(--adp-time-track-height);cursor:pointer;color:rgba(0, 0, 0, 0);background:rgba(0, 0, 0, 0)}.air-datepicker-time--row input[type=range]::-ms-fill-lower{background:rgba(0, 0, 0, 0)}.air-datepicker-time--row input[type=range]::-ms-fill-upper{background:rgba(0, 0, 0, 0)}.air-datepicker{--adp-font-family:-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";--adp-font-size:14px;--adp-width:246px;--adp-z-index:100;--adp-padding:4px;--adp-grid-areas:\"nav\" \"body\" \"timepicker\" \"buttons\";--adp-transition-duration:0.3s;--adp-transition-ease:ease-out;--adp-transition-offset:8px;--adp-background-color:#fff;--adp-background-color-hover:#f0f0f0;--adp-background-color-active:#eaeaea;--adp-background-color-in-range:rgba(92, 196, 239, 0.1);--adp-background-color-in-range-focused:rgba(92, 196, 239, 0.2);--adp-background-color-selected-other-month-focused:#8ad5f4;--adp-background-color-selected-other-month:#a2ddf6;--adp-color:#4a4a4a;--adp-color-secondary:#9c9c9c;--adp-accent-color:#4eb5e6;--adp-color-current-date:var(--adp-accent-color);--adp-color-other-month:#dedede;--adp-color-disabled:#aeaeae;--adp-color-disabled-in-range:#939393;--adp-color-other-month-hover:#c5c5c5;--adp-border-color:#dbdbdb;--adp-border-color-inner:#efefef;--adp-border-radius:4px;--adp-border-color-inline:#d7d7d7;--adp-nav-height:32px;--adp-nav-arrow-color:var(--adp-color-secondary);--adp-nav-action-size:32px;--adp-nav-color-secondary:var(--adp-color-secondary);--adp-day-name-color:#ff9a19;--adp-day-name-color-hover:#8ad5f4;--adp-day-cell-width:1fr;--adp-day-cell-height:32px;--adp-month-cell-height:42px;--adp-year-cell-height:56px;--adp-pointer-size:10px;--adp-poiner-border-radius:2px;--adp-pointer-offset:14px;--adp-cell-border-radius:4px;--adp-cell-background-color-hover:var(--adp-background-color-hover);--adp-cell-background-color-selected:#5cc4ef;--adp-cell-background-color-selected-hover:#45bced;--adp-cell-background-color-in-range:rgba(92, 196, 239, 0.1);--adp-cell-background-color-in-range-hover:rgba(92, 196, 239, 0.2);--adp-cell-border-color-in-range:var(--adp-cell-background-color-selected);--adp-btn-height:32px;--adp-btn-color:var(--adp-accent-color);--adp-btn-color-hover:var(--adp-color);--adp-btn-border-radius:var(--adp-border-radius);--adp-btn-background-color-hover:var(--adp-background-color-hover);--adp-btn-background-color-active:var(--adp-background-color-active);--adp-time-track-height:1px;--adp-time-track-color:#dedede;--adp-time-track-color-hover:#b1b1b1;--adp-time-thumb-size:12px;--adp-time-padding-inner:10px;--adp-time-day-period-color:var(--adp-color-secondary);--adp-mobile-font-size:16px;--adp-mobile-nav-height:40px;--adp-mobile-width:320px;--adp-mobile-day-cell-height:38px;--adp-mobile-month-cell-height:48px;--adp-mobile-year-cell-height:64px}.air-datepicker-overlay{--adp-overlay-background-color:rgba(0, 0, 0, 0.3);--adp-overlay-transition-duration:0.3s;--adp-overlay-transition-ease:ease-out;--adp-overlay-z-index:99}.air-datepicker{background:var(--adp-background-color);border:1px solid var(--adp-border-color);-webkit-box-shadow:0 4px 12px rgba(0, 0, 0, 0.15);box-shadow:0 4px 12px rgba(0, 0, 0, 0.15);border-radius:var(--adp-border-radius);-webkit-box-sizing:content-box;box-sizing:content-box;display:grid;grid-template-columns:1fr;grid-template-rows:repeat(4, -webkit-max-content);grid-template-rows:repeat(4, max-content);grid-template-areas:var(--adp-grid-areas);font-family:var(--adp-font-family), sans-serif;font-size:var(--adp-font-size);color:var(--adp-color);width:var(--adp-width);position:absolute;-webkit-transition:opacity var(--adp-transition-duration) var(--adp-transition-ease), -webkit-transform var(--adp-transition-duration) var(--adp-transition-ease);transition:opacity var(--adp-transition-duration) var(--adp-transition-ease), -webkit-transform var(--adp-transition-duration) var(--adp-transition-ease);transition:opacity var(--adp-transition-duration) var(--adp-transition-ease), transform var(--adp-transition-duration) var(--adp-transition-ease);transition:opacity var(--adp-transition-duration) var(--adp-transition-ease), transform var(--adp-transition-duration) var(--adp-transition-ease), -webkit-transform var(--adp-transition-duration) var(--adp-transition-ease);z-index:var(--adp-z-index)}.air-datepicker:not(.-custom-position-){opacity:0}.air-datepicker.-from-top-{-webkit-transform:translateY(calc(var(--adp-transition-offset) * -1));transform:translateY(calc(var(--adp-transition-offset) * -1))}.air-datepicker.-from-right-{-webkit-transform:translateX(var(--adp-transition-offset));transform:translateX(var(--adp-transition-offset))}.air-datepicker.-from-bottom-{-webkit-transform:translateY(var(--adp-transition-offset));transform:translateY(var(--adp-transition-offset))}.air-datepicker.-from-left-{-webkit-transform:translateX(calc(var(--adp-transition-offset) * -1));transform:translateX(calc(var(--adp-transition-offset) * -1))}.air-datepicker.-active-:not(.-custom-position-){-webkit-transform:translate(0, 0);transform:translate(0, 0);opacity:1}.air-datepicker.-active-.-custom-position-{-webkit-transition:none;transition:none}.air-datepicker.-inline-{border-color:var(--adp-border-color-inline);-webkit-box-shadow:none;box-shadow:none;position:static;left:auto;right:auto;opacity:1;-webkit-transform:none;transform:none}.air-datepicker.-inline- .air-datepicker--pointer{display:none}.air-datepicker.-is-mobile-{--adp-font-size:var(--adp-mobile-font-size);--adp-day-cell-height:var(--adp-mobile-day-cell-height);--adp-month-cell-height:var(--adp-mobile-month-cell-height);--adp-year-cell-height:var(--adp-mobile-year-cell-height);--adp-nav-height:var(--adp-mobile-nav-height);--adp-nav-action-size:var(--adp-mobile-nav-height);position:fixed;width:var(--adp-mobile-width);border:none}.air-datepicker.-is-mobile- *{-webkit-tap-highlight-color:rgba(0, 0, 0, 0)}.air-datepicker.-is-mobile- .air-datepicker--pointer{display:none}.air-datepicker.-is-mobile-:not(.-custom-position-){-webkit-transform:translate(-50%, calc(-50% + var(--adp-transition-offset)));transform:translate(-50%, calc(-50% + var(--adp-transition-offset)))}.air-datepicker.-is-mobile-.-active-:not(.-custom-position-){-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%)}.air-datepicker.-custom-position-{-webkit-transition:none;transition:none}.air-datepicker-global-container{position:absolute;left:0;top:0}.air-datepicker--pointer{--pointer-half-size:calc(var(--adp-pointer-size) / 2);position:absolute;width:var(--adp-pointer-size);height:var(--adp-pointer-size);z-index:-1}.air-datepicker--pointer:after{content:\"\";position:absolute;background:#fff;border-top:1px solid var(--adp-border-color-inline);border-right:1px solid var(--adp-border-color-inline);border-top-right-radius:var(--adp-poiner-border-radius);width:var(--adp-pointer-size);height:var(--adp-pointer-size);-webkit-box-sizing:border-box;box-sizing:border-box}.-top-left- .air-datepicker--pointer,.-top-center- .air-datepicker--pointer,.-top-right- .air-datepicker--pointer,[data-popper-placement^=top] .air-datepicker--pointer{top:calc(100% - var(--pointer-half-size) + 1px)}.-top-left- .air-datepicker--pointer:after,.-top-center- .air-datepicker--pointer:after,.-top-right- .air-datepicker--pointer:after,[data-popper-placement^=top] .air-datepicker--pointer:after{-webkit-transform:rotate(135deg);transform:rotate(135deg)}.-right-top- .air-datepicker--pointer,.-right-center- .air-datepicker--pointer,.-right-bottom- .air-datepicker--pointer,[data-popper-placement^=right] .air-datepicker--pointer{right:calc(100% - var(--pointer-half-size) + 1px)}.-right-top- .air-datepicker--pointer:after,.-right-center- .air-datepicker--pointer:after,.-right-bottom- .air-datepicker--pointer:after,[data-popper-placement^=right] .air-datepicker--pointer:after{-webkit-transform:rotate(225deg);transform:rotate(225deg)}.-bottom-left- .air-datepicker--pointer,.-bottom-center- .air-datepicker--pointer,.-bottom-right- .air-datepicker--pointer,[data-popper-placement^=bottom] .air-datepicker--pointer{bottom:calc(100% - var(--pointer-half-size) + 1px)}.-bottom-left- .air-datepicker--pointer:after,.-bottom-center- .air-datepicker--pointer:after,.-bottom-right- .air-datepicker--pointer:after,[data-popper-placement^=bottom] .air-datepicker--pointer:after{-webkit-transform:rotate(315deg);transform:rotate(315deg)}.-left-top- .air-datepicker--pointer,.-left-center- .air-datepicker--pointer,.-left-bottom- .air-datepicker--pointer,[data-popper-placement^=left] .air-datepicker--pointer{left:calc(100% - var(--pointer-half-size) + 1px)}.-left-top- .air-datepicker--pointer:after,.-left-center- .air-datepicker--pointer:after,.-left-bottom- .air-datepicker--pointer:after,[data-popper-placement^=left] .air-datepicker--pointer:after{-webkit-transform:rotate(45deg);transform:rotate(45deg)}.-top-left- .air-datepicker--pointer,.-bottom-left- .air-datepicker--pointer{left:var(--adp-pointer-offset)}.-top-right- .air-datepicker--pointer,.-bottom-right- .air-datepicker--pointer{right:var(--adp-pointer-offset)}.-top-center- .air-datepicker--pointer,.-bottom-center- .air-datepicker--pointer{left:calc(50% - var(--adp-pointer-size) / 2)}.-left-top- .air-datepicker--pointer,.-right-top- .air-datepicker--pointer{top:var(--adp-pointer-offset)}.-left-bottom- .air-datepicker--pointer,.-right-bottom- .air-datepicker--pointer{bottom:var(--adp-pointer-offset)}.-left-center- .air-datepicker--pointer,.-right-center- .air-datepicker--pointer{top:calc(50% - var(--adp-pointer-size) / 2)}.air-datepicker--navigation{grid-area:nav}.air-datepicker--content{-webkit-box-sizing:content-box;box-sizing:content-box;padding:var(--adp-padding);grid-area:body}.-only-timepicker- .air-datepicker--content{display:none}.air-datepicker--time{grid-area:timepicker}.air-datepicker--buttons{grid-area:buttons}.air-datepicker--buttons,.air-datepicker--time{padding:var(--adp-padding);border-top:1px solid var(--adp-border-color-inner)}.air-datepicker-overlay{position:fixed;background:var(--adp-overlay-background-color);left:0;top:0;width:0;height:0;opacity:0;-webkit-transition:opacity var(--adp-overlay-transition-duration) var(--adp-overlay-transition-ease), left 0s, height 0s, width 0s;transition:opacity var(--adp-overlay-transition-duration) var(--adp-overlay-transition-ease), left 0s, height 0s, width 0s;-webkit-transition-delay:0s, var(--adp-overlay-transition-duration), var(--adp-overlay-transition-duration), var(--adp-overlay-transition-duration);transition-delay:0s, var(--adp-overlay-transition-duration), var(--adp-overlay-transition-duration), var(--adp-overlay-transition-duration);z-index:var(--adp-overlay-z-index)}.air-datepicker-overlay.-active-{opacity:1;width:100%;height:100%;-webkit-transition:opacity var(--adp-overlay-transition-duration) var(--adp-overlay-transition-ease), height 0s, width 0s;transition:opacity var(--adp-overlay-transition-duration) var(--adp-overlay-transition-ease), height 0s, width 0s}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}";
@@ -210,6 +210,6 @@ function defineCustomElement() {
210
210
  }
211
211
 
212
212
  export { VerdocsFieldDate as V, defineCustomElement as d };
213
- //# sourceMappingURL=p-DfTz53m-.js.map
213
+ //# sourceMappingURL=p-LPa2SLXL.js.map
214
214
 
215
- //# sourceMappingURL=p-DfTz53m-.js.map
215
+ //# sourceMappingURL=p-LPa2SLXL.js.map
@@ -1 +1 @@
1
- {"file":"p-DfTz53m-.js","mappings":";;;;;;;;;;;;;;;;;AAAA,MAAM,mBAAmB,GAAG,i5vBAAi5vB;;MCkBh6vB,gBAAgB,iBAAAA,kBAAA,CAAA,MAAA,gBAAA,SAAAC,CAAA,CAAA;AAL7B,IAAA,WAAA,CAAA,YAAA,EAAA;;;;;;;;AASE;;AAEG;AACoB,QAAA,IAAM,CAAA,MAAA,GAA4B,UAAU;AAEnE;;AAEG;AACoB,QAAA,IAAQ,CAAA,QAAA,GAAW,EAAE;AAE5C;;AAEG;AACoB,QAAA,IAAS,CAAA,SAAA,GAAW,EAAE;AAE7C;;AAEG;AACoB,QAAA,IAAQ,CAAA,QAAA,GAAa,KAAK;AAEjD;;;AAGG;AACoB,QAAA,IAAQ,CAAA,QAAA,GAAa,KAAK;AAEjD;;AAEG;AACoB,QAAA,IAAQ,CAAA,QAAA,GAAa,KAAK;AAEjD;;AAEG;AACoB,QAAA,IAAI,CAAA,IAAA,GAAa,KAAK;AAE7C;;AAEG;AACoB,QAAA,IAAM,CAAA,MAAA,GAAY,CAAC;AAE1C;;AAEG;AACoB,QAAA,IAAM,CAAA,MAAA,GAAY,CAAC;AAE1C;;AAEG;AACoB,QAAA,IAAU,CAAA,UAAA,GAAY,CAAC;QAsBrC,IAAA,CAAA,WAAW,GAAG,CAAA,oBAAA,EAAuB,IAAI,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC,E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AC,iBAAiB,GAAG,KAAK,CAAC,EAAA,EACzH,CACE,CAAA,mCAAA,EAAA,EAAA,UAAU,EAAE,QAAQ,EACpB,SAAS,EAAE,SAAS,EACpB,OAAO,EAAE,OAAO,IAAI,CAAC,iBAAiB,GAAG,KAAK,CAAC,EAC/C,QAAQ,EAAE,MAAK;;AACb,gBAAA,CAAA,EAAA,GAAA,IAAI,CAAC,OAAO,MAAA,IAAA,IAAA,EAAA,KAAA,MAAA,GAAA,MAAA,GAAA,EAAA,CAAE,IAAI,CAAC,EAAC,SAAS,EAAE,SAAS,EAAC,CAAC;AAC1C,gBAAA,OAAO,IAAI,CAAC,iBAAiB,EAAE;AACjC,aAAC,EACD,iBAAiB,EAAE,CAAC,IAAG;;AACrB,gBAAA,CAAA,EAAA,GAAA,IAAI,CAAC,eAAe,MAAE,IAAA,IAAA,EAAA,KAAA,MAAA,GAAA,MAAA,GAAA,EAAA,CAAA,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC;AACpC,gBAAA,OAAO,IAAI,CAAC,iBAAiB,EAAE;AACjC,aAAC,EACD,QAAQ,EAAE,8CAA8C,EAAA,CACxD,CACa,CAClB,CACQ,CACZ,CACI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement","format"],"sources":["src/components/fields/verdocs-field-date/verdocs-field-date.scss?tag=verdocs-field-date","src/components/fields/verdocs-field-date/verdocs-field-date.tsx"],"sourcesContent":["@import '../../../theme.scss';\n\nverdocs-field-date {\n font-family: $verdocs-primary-font;\n width: 74px;\n height: 20px;\n display: block;\n font-size: 11px;\n position: relative;\n scroll-margin: 20px 0;\n letter-spacing: 0.3px;\n background-color: transparent;\n transform-origin: bottom left;\n\n &.focused {\n animation: verdocs-field-pulse 0.4s 1;\n }\n\n label {\n top: -14px;\n left: 0;\n height: 14px;\n color: white;\n padding: 0 4px;\n font-size: 9px;\n line-height: 13px;\n position: absolute;\n background: #4a4a99;\n border-top-left-radius: 2px;\n border-top-right-radius: 2px;\n }\n\n input {\n position: absolute;\n\n font-size: 12px;\n\n // This is needed to bring down the cursor from the parent element, which is where interactjs applies it\n cursor: inherit;\n\n box-sizing: border-box;\n color: rgba(0, 0, 0, 0.87);\n font-weight: 500;\n transform-origin: 0 0;\n height: 100%;\n width: 100%;\n background: none;\n border: 1px solid $light-border-color;\n appearance: none;\n\n &.hide {\n display: none;\n }\n }\n\n &.disabled input {\n opacity: 0.5;\n }\n\n &.required {\n input {\n border: 1px solid $verdocs-red-1;\n }\n }\n\n verdocs-button-panel {\n top: -3px;\n left: -2px;\n opacity: 0.5;\n z-index: 1000;\n cursor: pointer;\n position: absolute;\n transform: scale(0.6);\n\n &[data-active],\n &:hover {\n opacity: 1;\n }\n\n .icon {\n svg {\n fill: #333333;\n }\n\n &:hover {\n svg {\n fill: #000000;\n }\n }\n }\n }\n\n .settings-icon {\n position: absolute;\n top: -3px;\n left: -18px;\n display: inline-block;\n cursor: pointer;\n opacity: 0.3;\n\n svg {\n fill: $border-color;\n }\n\n &:hover {\n opacity: 1;\n }\n }\n}\n\n.air-datepicker-cell.-year-.-other-decade-,\n.air-datepicker-cell.-day-.-other-month- {\n color: var(--adp-color-other-month);\n}\n.air-datepicker-cell.-year-.-other-decade-:hover,\n.air-datepicker-cell.-day-.-other-month-:hover {\n color: var(--adp-color-other-month-hover);\n}\n.-disabled-.-focus-.air-datepicker-cell.-year-.-other-decade-,\n.-disabled-.-focus-.air-datepicker-cell.-day-.-other-month- {\n color: var(--adp-color-other-month);\n}\n.-selected-.air-datepicker-cell.-year-.-other-decade-,\n.-selected-.air-datepicker-cell.-day-.-other-month- {\n color: #fff;\n background: var(--adp-background-color-selected-other-month);\n}\n.-selected-.-focus-.air-datepicker-cell.-year-.-other-decade-,\n.-selected-.-focus-.air-datepicker-cell.-day-.-other-month- {\n background: var(--adp-background-color-selected-other-month-focused);\n}\n.-in-range-.air-datepicker-cell.-year-.-other-decade-,\n.-in-range-.air-datepicker-cell.-day-.-other-month- {\n background-color: var(--adp-background-color-in-range);\n color: var(--adp-color);\n}\n.-in-range-.-focus-.air-datepicker-cell.-year-.-other-decade-,\n.-in-range-.-focus-.air-datepicker-cell.-day-.-other-month- {\n background-color: var(--adp-background-color-in-range-focused);\n}\n.air-datepicker-cell.-year-.-other-decade-:empty,\n.air-datepicker-cell.-day-.-other-month-:empty {\n background: none;\n border: none;\n}\n.air-datepicker-cell {\n border-radius: var(--adp-cell-border-radius);\n box-sizing: border-box;\n cursor: pointer;\n display: flex;\n position: relative;\n align-items: center;\n justify-content: center;\n z-index: 1;\n}\n.air-datepicker-cell.-focus- {\n background: var(--adp-cell-background-color-hover);\n}\n.air-datepicker-cell.-current- {\n color: var(--adp-color-current-date);\n}\n.air-datepicker-cell.-current-.-focus- {\n color: var(--adp-color);\n}\n.air-datepicker-cell.-current-.-in-range- {\n color: var(--adp-color-current-date);\n}\n.air-datepicker-cell.-disabled- {\n cursor: default;\n color: var(--adp-color-disabled);\n}\n.air-datepicker-cell.-disabled-.-focus- {\n color: var(--adp-color-disabled);\n}\n.air-datepicker-cell.-disabled-.-in-range- {\n color: var(--adp-color-disabled-in-range);\n}\n.air-datepicker-cell.-disabled-.-current-.-focus- {\n color: var(--adp-color-disabled);\n}\n.air-datepicker-cell.-in-range- {\n background: var(--adp-cell-background-color-in-range);\n border-radius: 0;\n}\n.air-datepicker-cell.-in-range-:hover {\n background: var(--adp-cell-background-color-in-range-hover);\n}\n.air-datepicker-cell.-range-from- {\n border: 1px solid var(--adp-cell-border-color-in-range);\n background-color: var(--adp-cell-background-color-in-range);\n border-radius: var(--adp-cell-border-radius) 0 0 var(--adp-cell-border-radius);\n}\n.air-datepicker-cell.-range-to- {\n border: 1px solid var(--adp-cell-border-color-in-range);\n background-color: var(--adp-cell-background-color-in-range);\n border-radius: 0 var(--adp-cell-border-radius) var(--adp-cell-border-radius) 0;\n}\n.air-datepicker-cell.-range-to-.-range-from- {\n border-radius: var(--adp-cell-border-radius);\n}\n.air-datepicker-cell.-selected- {\n color: #fff;\n border: none;\n background: var(--adp-cell-background-color-selected);\n}\n.air-datepicker-cell.-selected-.-current- {\n color: #fff;\n background: var(--adp-cell-background-color-selected);\n}\n.air-datepicker-cell.-selected-.-focus- {\n background: var(--adp-cell-background-color-selected-hover);\n}\n.air-datepicker-body {\n transition: all var(--adp-transition-duration) var(--adp-transition-ease);\n}\n.air-datepicker-body.-hidden- {\n display: none;\n}\n.air-datepicker-body--day-names {\n display: grid;\n grid-template-columns: repeat(7, var(--adp-day-cell-width));\n margin: 8px 0 3px;\n}\n.air-datepicker-body--day-name {\n color: var(--adp-day-name-color);\n display: flex;\n align-items: center;\n justify-content: center;\n flex: 1;\n text-align: center;\n text-transform: uppercase;\n font-size: 0.8em;\n}\n.air-datepicker-body--day-name.-clickable- {\n cursor: pointer;\n}\n.air-datepicker-body--day-name.-clickable-:hover {\n color: var(--adp-day-name-color-hover);\n}\n.air-datepicker-body--cells {\n display: grid;\n}\n.air-datepicker-body--cells.-days- {\n grid-template-columns: repeat(7, var(--adp-day-cell-width));\n grid-auto-rows: var(--adp-day-cell-height);\n}\n.air-datepicker-body--cells.-months- {\n grid-template-columns: repeat(3, 1fr);\n grid-auto-rows: var(--adp-month-cell-height);\n}\n.air-datepicker-body--cells.-years- {\n grid-template-columns: repeat(4, 1fr);\n grid-auto-rows: var(--adp-year-cell-height);\n}\n.air-datepicker-nav {\n display: flex;\n justify-content: space-between;\n border-bottom: 1px solid var(--adp-border-color-inner);\n min-height: var(--adp-nav-height);\n padding: var(--adp-padding);\n box-sizing: content-box;\n}\n.-only-timepicker- .air-datepicker-nav {\n display: none;\n}\n.air-datepicker-nav--title,\n.air-datepicker-nav--action {\n display: flex;\n cursor: pointer;\n align-items: center;\n justify-content: center;\n}\n.air-datepicker-nav--action {\n width: var(--adp-nav-action-size);\n border-radius: var(--adp-border-radius);\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n}\n.air-datepicker-nav--action:hover {\n background: var(--adp-background-color-hover);\n}\n.air-datepicker-nav--action:active {\n background: var(--adp-background-color-active);\n}\n.air-datepicker-nav--action.-disabled- {\n visibility: hidden;\n}\n.air-datepicker-nav--action svg {\n width: 32px;\n height: 32px;\n}\n.air-datepicker-nav--action path {\n fill: none;\n stroke: var(--adp-nav-arrow-color);\n stroke-width: 2px;\n}\n.air-datepicker-nav--title {\n border-radius: var(--adp-border-radius);\n padding: 0 8px;\n}\n.air-datepicker-nav--title i {\n font-style: normal;\n color: var(--adp-nav-color-secondary);\n margin-left: 0.3em;\n}\n.air-datepicker-nav--title:hover {\n background: var(--adp-background-color-hover);\n}\n.air-datepicker-nav--title:active {\n background: var(--adp-background-color-active);\n}\n.air-datepicker-nav--title.-disabled- {\n cursor: default;\n background: none;\n}\n.air-datepicker-buttons {\n display: grid;\n grid-auto-columns: 1fr;\n grid-auto-flow: column;\n}\n.air-datepicker-button {\n display: inline-flex;\n color: var(--adp-btn-color);\n border-radius: var(--adp-btn-border-radius);\n cursor: pointer;\n height: var(--adp-btn-height);\n border: none;\n background: rgba(255, 255, 255, 0);\n}\n.air-datepicker-button:hover {\n color: var(--adp-btn-color-hover);\n background: var(--adp-btn-background-color-hover);\n}\n.air-datepicker-button:focus {\n color: var(--adp-btn-color-hover);\n background: var(--adp-btn-background-color-hover);\n outline: none;\n}\n.air-datepicker-button:active {\n background: var(--adp-btn-background-color-active);\n}\n.air-datepicker-button span {\n outline: none;\n display: flex;\n align-items: center;\n justify-content: center;\n width: 100%;\n height: 100%;\n}\n.air-datepicker-time {\n display: grid;\n grid-template-columns: max-content 1fr;\n grid-column-gap: 12px;\n align-items: center;\n position: relative;\n padding: 0 var(--adp-time-padding-inner);\n}\n.-only-timepicker- .air-datepicker-time {\n border-top: none;\n}\n.air-datepicker-time--current {\n display: flex;\n align-items: center;\n flex: 1;\n font-size: 14px;\n text-align: center;\n}\n.air-datepicker-time--current-colon {\n margin: 0 2px 3px;\n line-height: 1;\n}\n.air-datepicker-time--current-hours,\n.air-datepicker-time--current-minutes {\n line-height: 1;\n font-size: 19px;\n font-family: 'Century Gothic', CenturyGothic, AppleGothic, sans-serif;\n position: relative;\n z-index: 1;\n}\n.air-datepicker-time--current-hours:after,\n.air-datepicker-time--current-minutes:after {\n content: '';\n background: var(--adp-background-color-hover);\n border-radius: var(--adp-border-radius);\n position: absolute;\n left: -2px;\n top: -3px;\n right: -2px;\n bottom: -2px;\n z-index: -1;\n opacity: 0;\n}\n.air-datepicker-time--current-hours.-focus-:after,\n.air-datepicker-time--current-minutes.-focus-:after {\n opacity: 1;\n}\n.air-datepicker-time--current-ampm {\n text-transform: uppercase;\n align-self: flex-end;\n color: var(--adp-time-day-period-color);\n margin-left: 6px;\n font-size: 11px;\n margin-bottom: 1px;\n}\n.air-datepicker-time--row {\n display: flex;\n align-items: center;\n font-size: 11px;\n height: 17px;\n background: linear-gradient(to right, var(--adp-time-track-color), var(--adp-time-track-color)) left 50%/100% var(--adp-time-track-height) no-repeat;\n}\n.air-datepicker-time--row:first-child {\n margin-bottom: 4px;\n}\n.air-datepicker-time--row input[type='range'] {\n background: none;\n cursor: pointer;\n flex: 1;\n height: 100%;\n width: 100%;\n padding: 0;\n margin: 0;\n -webkit-appearance: none;\n}\n.air-datepicker-time--row input[type='range']::-webkit-slider-thumb {\n -webkit-appearance: none;\n}\n.air-datepicker-time--row input[type='range']::-ms-tooltip {\n display: none;\n}\n.air-datepicker-time--row input[type='range']:hover::-webkit-slider-thumb {\n border-color: var(--adp-time-track-color-hover);\n}\n.air-datepicker-time--row input[type='range']:hover::-moz-range-thumb {\n border-color: var(--adp-time-track-color-hover);\n}\n.air-datepicker-time--row input[type='range']:hover::-ms-thumb {\n border-color: var(--adp-time-track-color-hover);\n}\n.air-datepicker-time--row input[type='range']:focus {\n outline: none;\n}\n.air-datepicker-time--row input[type='range']:focus::-webkit-slider-thumb {\n background: var(--adp-cell-background-color-selected);\n border-color: var(--adp-cell-background-color-selected);\n}\n.air-datepicker-time--row input[type='range']:focus::-moz-range-thumb {\n background: var(--adp-cell-background-color-selected);\n border-color: var(--adp-cell-background-color-selected);\n}\n.air-datepicker-time--row input[type='range']:focus::-ms-thumb {\n background: var(--adp-cell-background-color-selected);\n border-color: var(--adp-cell-background-color-selected);\n}\n.air-datepicker-time--row input[type='range']::-webkit-slider-thumb {\n box-sizing: border-box;\n height: 12px;\n width: 12px;\n border-radius: 3px;\n border: 1px solid var(--adp-time-track-color);\n background: #fff;\n cursor: pointer;\n -webkit-transition: background var(--adp-transition-duration);\n transition: background var(--adp-transition-duration);\n}\n.air-datepicker-time--row input[type='range']::-moz-range-thumb {\n box-sizing: border-box;\n height: 12px;\n width: 12px;\n border-radius: 3px;\n border: 1px solid var(--adp-time-track-color);\n background: #fff;\n cursor: pointer;\n -moz-transition: background var(--adp-transition-duration);\n transition: background var(--adp-transition-duration);\n}\n.air-datepicker-time--row input[type='range']::-ms-thumb {\n box-sizing: border-box;\n height: 12px;\n width: 12px;\n border-radius: 3px;\n border: 1px solid var(--adp-time-track-color);\n background: #fff;\n cursor: pointer;\n -ms-transition: background var(--adp-transition-duration);\n transition: background var(--adp-transition-duration);\n}\n.air-datepicker-time--row input[type='range']::-webkit-slider-thumb {\n margin-top: calc(var(--adp-time-thumb-size) / 2 * -1);\n}\n.air-datepicker-time--row input[type='range']::-webkit-slider-runnable-track {\n border: none;\n height: var(--adp-time-track-height);\n cursor: pointer;\n color: rgba(0, 0, 0, 0);\n background: rgba(0, 0, 0, 0);\n}\n.air-datepicker-time--row input[type='range']::-moz-range-track {\n border: none;\n height: var(--adp-time-track-height);\n cursor: pointer;\n color: rgba(0, 0, 0, 0);\n background: rgba(0, 0, 0, 0);\n}\n.air-datepicker-time--row input[type='range']::-ms-track {\n border: none;\n height: var(--adp-time-track-height);\n cursor: pointer;\n color: rgba(0, 0, 0, 0);\n background: rgba(0, 0, 0, 0);\n}\n.air-datepicker-time--row input[type='range']::-ms-fill-lower {\n background: rgba(0, 0, 0, 0);\n}\n.air-datepicker-time--row input[type='range']::-ms-fill-upper {\n background: rgba(0, 0, 0, 0);\n}\n.air-datepicker {\n --adp-font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';\n --adp-font-size: 14px;\n --adp-width: 246px;\n --adp-z-index: 100;\n --adp-padding: 4px;\n --adp-grid-areas: 'nav' 'body' 'timepicker' 'buttons';\n --adp-transition-duration: 0.3s;\n --adp-transition-ease: ease-out;\n --adp-transition-offset: 8px;\n --adp-background-color: #fff;\n --adp-background-color-hover: #f0f0f0;\n --adp-background-color-active: #eaeaea;\n --adp-background-color-in-range: rgba(92, 196, 239, 0.1);\n --adp-background-color-in-range-focused: rgba(92, 196, 239, 0.2);\n --adp-background-color-selected-other-month-focused: #8ad5f4;\n --adp-background-color-selected-other-month: #a2ddf6;\n --adp-color: #4a4a4a;\n --adp-color-secondary: #9c9c9c;\n --adp-accent-color: #4eb5e6;\n --adp-color-current-date: var(--adp-accent-color);\n --adp-color-other-month: #dedede;\n --adp-color-disabled: #aeaeae;\n --adp-color-disabled-in-range: #939393;\n --adp-color-other-month-hover: #c5c5c5;\n --adp-border-color: #dbdbdb;\n --adp-border-color-inner: #efefef;\n --adp-border-radius: 4px;\n --adp-border-color-inline: #d7d7d7;\n --adp-nav-height: 32px;\n --adp-nav-arrow-color: var(--adp-color-secondary);\n --adp-nav-action-size: 32px;\n --adp-nav-color-secondary: var(--adp-color-secondary);\n --adp-day-name-color: #ff9a19;\n --adp-day-name-color-hover: #8ad5f4;\n --adp-day-cell-width: 1fr;\n --adp-day-cell-height: 32px;\n --adp-month-cell-height: 42px;\n --adp-year-cell-height: 56px;\n --adp-pointer-size: 10px;\n --adp-poiner-border-radius: 2px;\n --adp-pointer-offset: 14px;\n --adp-cell-border-radius: 4px;\n --adp-cell-background-color-hover: var(--adp-background-color-hover);\n --adp-cell-background-color-selected: #5cc4ef;\n --adp-cell-background-color-selected-hover: #45bced;\n --adp-cell-background-color-in-range: rgba(92, 196, 239, 0.1);\n --adp-cell-background-color-in-range-hover: rgba(92, 196, 239, 0.2);\n --adp-cell-border-color-in-range: var(--adp-cell-background-color-selected);\n --adp-btn-height: 32px;\n --adp-btn-color: var(--adp-accent-color);\n --adp-btn-color-hover: var(--adp-color);\n --adp-btn-border-radius: var(--adp-border-radius);\n --adp-btn-background-color-hover: var(--adp-background-color-hover);\n --adp-btn-background-color-active: var(--adp-background-color-active);\n --adp-time-track-height: 1px;\n --adp-time-track-color: #dedede;\n --adp-time-track-color-hover: #b1b1b1;\n --adp-time-thumb-size: 12px;\n --adp-time-padding-inner: 10px;\n --adp-time-day-period-color: var(--adp-color-secondary);\n --adp-mobile-font-size: 16px;\n --adp-mobile-nav-height: 40px;\n --adp-mobile-width: 320px;\n --adp-mobile-day-cell-height: 38px;\n --adp-mobile-month-cell-height: 48px;\n --adp-mobile-year-cell-height: 64px;\n}\n.air-datepicker-overlay {\n --adp-overlay-background-color: rgba(0, 0, 0, 0.3);\n --adp-overlay-transition-duration: 0.3s;\n --adp-overlay-transition-ease: ease-out;\n --adp-overlay-z-index: 99;\n}\n.air-datepicker {\n background: var(--adp-background-color);\n border: 1px solid var(--adp-border-color);\n box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);\n border-radius: var(--adp-border-radius);\n box-sizing: content-box;\n display: grid;\n grid-template-columns: 1fr;\n grid-template-rows: repeat(4, max-content);\n grid-template-areas: var(--adp-grid-areas);\n font-family: var(--adp-font-family), sans-serif;\n font-size: var(--adp-font-size);\n color: var(--adp-color);\n width: var(--adp-width);\n position: absolute;\n transition:\n opacity var(--adp-transition-duration) var(--adp-transition-ease),\n transform var(--adp-transition-duration) var(--adp-transition-ease);\n z-index: var(--adp-z-index);\n}\n.air-datepicker:not(.-custom-position-) {\n opacity: 0;\n}\n.air-datepicker.-from-top- {\n transform: translateY(calc(var(--adp-transition-offset) * -1));\n}\n.air-datepicker.-from-right- {\n transform: translateX(var(--adp-transition-offset));\n}\n.air-datepicker.-from-bottom- {\n transform: translateY(var(--adp-transition-offset));\n}\n.air-datepicker.-from-left- {\n transform: translateX(calc(var(--adp-transition-offset) * -1));\n}\n.air-datepicker.-active-:not(.-custom-position-) {\n transform: translate(0, 0);\n opacity: 1;\n}\n.air-datepicker.-active-.-custom-position- {\n transition: none;\n}\n.air-datepicker.-inline- {\n border-color: var(--adp-border-color-inline);\n box-shadow: none;\n position: static;\n left: auto;\n right: auto;\n opacity: 1;\n transform: none;\n}\n.air-datepicker.-inline- .air-datepicker--pointer {\n display: none;\n}\n.air-datepicker.-is-mobile- {\n --adp-font-size: var(--adp-mobile-font-size);\n --adp-day-cell-height: var(--adp-mobile-day-cell-height);\n --adp-month-cell-height: var(--adp-mobile-month-cell-height);\n --adp-year-cell-height: var(--adp-mobile-year-cell-height);\n --adp-nav-height: var(--adp-mobile-nav-height);\n --adp-nav-action-size: var(--adp-mobile-nav-height);\n position: fixed;\n width: var(--adp-mobile-width);\n border: none;\n}\n.air-datepicker.-is-mobile- * {\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n}\n.air-datepicker.-is-mobile- .air-datepicker--pointer {\n display: none;\n}\n.air-datepicker.-is-mobile-:not(.-custom-position-) {\n transform: translate(-50%, calc(-50% + var(--adp-transition-offset)));\n}\n.air-datepicker.-is-mobile-.-active-:not(.-custom-position-) {\n transform: translate(-50%, -50%);\n}\n.air-datepicker.-custom-position- {\n transition: none;\n}\n.air-datepicker-global-container {\n position: absolute;\n left: 0;\n top: 0;\n}\n.air-datepicker--pointer {\n --pointer-half-size: calc(var(--adp-pointer-size) / 2);\n position: absolute;\n width: var(--adp-pointer-size);\n height: var(--adp-pointer-size);\n z-index: -1;\n}\n.air-datepicker--pointer:after {\n content: '';\n position: absolute;\n background: #fff;\n border-top: 1px solid var(--adp-border-color-inline);\n border-right: 1px solid var(--adp-border-color-inline);\n border-top-right-radius: var(--adp-poiner-border-radius);\n width: var(--adp-pointer-size);\n height: var(--adp-pointer-size);\n box-sizing: border-box;\n}\n.-top-left- .air-datepicker--pointer,\n.-top-center- .air-datepicker--pointer,\n.-top-right- .air-datepicker--pointer,\n[data-popper-placement^='top'] .air-datepicker--pointer {\n top: calc(100% - var(--pointer-half-size) + 1px);\n}\n.-top-left- .air-datepicker--pointer:after,\n.-top-center- .air-datepicker--pointer:after,\n.-top-right- .air-datepicker--pointer:after,\n[data-popper-placement^='top'] .air-datepicker--pointer:after {\n transform: rotate(135deg);\n}\n.-right-top- .air-datepicker--pointer,\n.-right-center- .air-datepicker--pointer,\n.-right-bottom- .air-datepicker--pointer,\n[data-popper-placement^='right'] .air-datepicker--pointer {\n right: calc(100% - var(--pointer-half-size) + 1px);\n}\n.-right-top- .air-datepicker--pointer:after,\n.-right-center- .air-datepicker--pointer:after,\n.-right-bottom- .air-datepicker--pointer:after,\n[data-popper-placement^='right'] .air-datepicker--pointer:after {\n transform: rotate(225deg);\n}\n.-bottom-left- .air-datepicker--pointer,\n.-bottom-center- .air-datepicker--pointer,\n.-bottom-right- .air-datepicker--pointer,\n[data-popper-placement^='bottom'] .air-datepicker--pointer {\n bottom: calc(100% - var(--pointer-half-size) + 1px);\n}\n.-bottom-left- .air-datepicker--pointer:after,\n.-bottom-center- .air-datepicker--pointer:after,\n.-bottom-right- .air-datepicker--pointer:after,\n[data-popper-placement^='bottom'] .air-datepicker--pointer:after {\n transform: rotate(315deg);\n}\n.-left-top- .air-datepicker--pointer,\n.-left-center- .air-datepicker--pointer,\n.-left-bottom- .air-datepicker--pointer,\n[data-popper-placement^='left'] .air-datepicker--pointer {\n left: calc(100% - var(--pointer-half-size) + 1px);\n}\n.-left-top- .air-datepicker--pointer:after,\n.-left-center- .air-datepicker--pointer:after,\n.-left-bottom- .air-datepicker--pointer:after,\n[data-popper-placement^='left'] .air-datepicker--pointer:after {\n transform: rotate(45deg);\n}\n.-top-left- .air-datepicker--pointer,\n.-bottom-left- .air-datepicker--pointer {\n left: var(--adp-pointer-offset);\n}\n.-top-right- .air-datepicker--pointer,\n.-bottom-right- .air-datepicker--pointer {\n right: var(--adp-pointer-offset);\n}\n.-top-center- .air-datepicker--pointer,\n.-bottom-center- .air-datepicker--pointer {\n left: calc(50% - var(--adp-pointer-size) / 2);\n}\n.-left-top- .air-datepicker--pointer,\n.-right-top- .air-datepicker--pointer {\n top: var(--adp-pointer-offset);\n}\n.-left-bottom- .air-datepicker--pointer,\n.-right-bottom- .air-datepicker--pointer {\n bottom: var(--adp-pointer-offset);\n}\n.-left-center- .air-datepicker--pointer,\n.-right-center- .air-datepicker--pointer {\n top: calc(50% - var(--adp-pointer-size) / 2);\n}\n.air-datepicker--navigation {\n grid-area: nav;\n}\n.air-datepicker--content {\n box-sizing: content-box;\n padding: var(--adp-padding);\n grid-area: body;\n}\n.-only-timepicker- .air-datepicker--content {\n display: none;\n}\n.air-datepicker--time {\n grid-area: timepicker;\n}\n.air-datepicker--buttons {\n grid-area: buttons;\n}\n.air-datepicker--buttons,\n.air-datepicker--time {\n padding: var(--adp-padding);\n border-top: 1px solid var(--adp-border-color-inner);\n}\n.air-datepicker-overlay {\n position: fixed;\n background: var(--adp-overlay-background-color);\n left: 0;\n top: 0;\n width: 0;\n height: 0;\n opacity: 0;\n transition:\n opacity var(--adp-overlay-transition-duration) var(--adp-overlay-transition-ease),\n left 0s,\n height 0s,\n width 0s;\n transition-delay: 0s, var(--adp-overlay-transition-duration), var(--adp-overlay-transition-duration), var(--adp-overlay-transition-duration);\n z-index: var(--adp-overlay-z-index);\n}\n.air-datepicker-overlay.-active- {\n opacity: 1;\n width: 100%;\n height: 100%;\n transition:\n opacity var(--adp-overlay-transition-duration) var(--adp-overlay-transition-ease),\n height 0s,\n width 0s;\n}\n\n@keyframes verdocs-field-pulse {\n 0% {\n background-color: rgba(0, 0, 0, 0.35);\n }\n 50% {\n background-color: rgba(0, 0, 0, 0);\n }\n 100% {\n background-color: rgba(0, 0, 0, 0.35);\n }\n}\n","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 = '', readonly = false} = 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 placeholder={placeholder}\n disabled={readonly || disabled}\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"],"version":3}
1
+ {"file":"p-LPa2SLXL.js","mappings":";;;;;;;;;;;;;;;;;AAAA,MAAM,mBAAmB,GAAG,i5vBAAi5vB;;MCkBh6vB,gBAAgB,iBAAAA,kBAAA,CAAA,MAAA,gBAAA,SAAAC,CAAA,CAAA;AAL7B,IAAA,WAAA,CAAA,YAAA,EAAA;;;;;;;;AASE;;AAEG;AACoB,QAAA,IAAM,CAAA,MAAA,GAA4B,UAAU;AAEnE;;AAEG;AACoB,QAAA,IAAQ,CAAA,QAAA,GAAW,EAAE;AAE5C;;AAEG;AACoB,QAAA,IAAS,CAAA,SAAA,GAAW,E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C,EAAA,CACxD,CACa,CAClB,CACQ,CACZ,CACI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement","format"],"sources":["src/components/fields/verdocs-field-date/verdocs-field-date.scss?tag=verdocs-field-date","src/components/fields/verdocs-field-date/verdocs-field-date.tsx"],"sourcesContent":["@import '../../../theme.scss';\n\nverdocs-field-date {\n font-family: $verdocs-primary-font;\n width: 74px;\n height: 20px;\n display: block;\n font-size: 11px;\n position: relative;\n scroll-margin: 20px 0;\n letter-spacing: 0.3px;\n background-color: transparent;\n transform-origin: bottom left;\n\n &.focused {\n animation: verdocs-field-pulse 0.4s 1;\n }\n\n label {\n top: -14px;\n left: 0;\n height: 14px;\n color: white;\n padding: 0 4px;\n font-size: 9px;\n line-height: 13px;\n position: absolute;\n background: #4a4a99;\n border-top-left-radius: 2px;\n border-top-right-radius: 2px;\n }\n\n input {\n position: absolute;\n\n font-size: 12px;\n\n // This is needed to bring down the cursor from the parent element, which is where interactjs applies it\n cursor: inherit;\n\n box-sizing: border-box;\n color: rgba(0, 0, 0, 0.87);\n font-weight: 500;\n transform-origin: 0 0;\n height: 100%;\n width: 100%;\n background: none;\n border: 1px solid $light-border-color;\n appearance: none;\n\n &.hide {\n display: none;\n }\n }\n\n &.disabled input {\n opacity: 0.5;\n }\n\n &.required {\n input {\n border: 1px solid $verdocs-red-1;\n }\n }\n\n verdocs-button-panel {\n top: -3px;\n left: -2px;\n opacity: 0.5;\n z-index: 1000;\n cursor: pointer;\n position: absolute;\n transform: scale(0.6);\n\n &[data-active],\n &:hover {\n opacity: 1;\n }\n\n .icon {\n svg {\n fill: #333333;\n }\n\n &:hover {\n svg {\n fill: #000000;\n }\n }\n }\n }\n\n .settings-icon {\n position: absolute;\n top: -3px;\n left: -18px;\n display: inline-block;\n cursor: pointer;\n opacity: 0.3;\n\n svg {\n fill: $border-color;\n }\n\n &:hover {\n opacity: 1;\n }\n }\n}\n\n.air-datepicker-cell.-year-.-other-decade-,\n.air-datepicker-cell.-day-.-other-month- {\n color: var(--adp-color-other-month);\n}\n.air-datepicker-cell.-year-.-other-decade-:hover,\n.air-datepicker-cell.-day-.-other-month-:hover {\n color: var(--adp-color-other-month-hover);\n}\n.-disabled-.-focus-.air-datepicker-cell.-year-.-other-decade-,\n.-disabled-.-focus-.air-datepicker-cell.-day-.-other-month- {\n color: var(--adp-color-other-month);\n}\n.-selected-.air-datepicker-cell.-year-.-other-decade-,\n.-selected-.air-datepicker-cell.-day-.-other-month- {\n color: #fff;\n background: var(--adp-background-color-selected-other-month);\n}\n.-selected-.-focus-.air-datepicker-cell.-year-.-other-decade-,\n.-selected-.-focus-.air-datepicker-cell.-day-.-other-month- {\n background: var(--adp-background-color-selected-other-month-focused);\n}\n.-in-range-.air-datepicker-cell.-year-.-other-decade-,\n.-in-range-.air-datepicker-cell.-day-.-other-month- {\n background-color: var(--adp-background-color-in-range);\n color: var(--adp-color);\n}\n.-in-range-.-focus-.air-datepicker-cell.-year-.-other-decade-,\n.-in-range-.-focus-.air-datepicker-cell.-day-.-other-month- {\n background-color: var(--adp-background-color-in-range-focused);\n}\n.air-datepicker-cell.-year-.-other-decade-:empty,\n.air-datepicker-cell.-day-.-other-month-:empty {\n background: none;\n border: none;\n}\n.air-datepicker-cell {\n border-radius: var(--adp-cell-border-radius);\n box-sizing: border-box;\n cursor: pointer;\n display: flex;\n position: relative;\n align-items: center;\n justify-content: center;\n z-index: 1;\n}\n.air-datepicker-cell.-focus- {\n background: var(--adp-cell-background-color-hover);\n}\n.air-datepicker-cell.-current- {\n color: var(--adp-color-current-date);\n}\n.air-datepicker-cell.-current-.-focus- {\n color: var(--adp-color);\n}\n.air-datepicker-cell.-current-.-in-range- {\n color: var(--adp-color-current-date);\n}\n.air-datepicker-cell.-disabled- {\n cursor: default;\n color: var(--adp-color-disabled);\n}\n.air-datepicker-cell.-disabled-.-focus- {\n color: var(--adp-color-disabled);\n}\n.air-datepicker-cell.-disabled-.-in-range- {\n color: var(--adp-color-disabled-in-range);\n}\n.air-datepicker-cell.-disabled-.-current-.-focus- {\n color: var(--adp-color-disabled);\n}\n.air-datepicker-cell.-in-range- {\n background: var(--adp-cell-background-color-in-range);\n border-radius: 0;\n}\n.air-datepicker-cell.-in-range-:hover {\n background: var(--adp-cell-background-color-in-range-hover);\n}\n.air-datepicker-cell.-range-from- {\n border: 1px solid var(--adp-cell-border-color-in-range);\n background-color: var(--adp-cell-background-color-in-range);\n border-radius: var(--adp-cell-border-radius) 0 0 var(--adp-cell-border-radius);\n}\n.air-datepicker-cell.-range-to- {\n border: 1px solid var(--adp-cell-border-color-in-range);\n background-color: var(--adp-cell-background-color-in-range);\n border-radius: 0 var(--adp-cell-border-radius) var(--adp-cell-border-radius) 0;\n}\n.air-datepicker-cell.-range-to-.-range-from- {\n border-radius: var(--adp-cell-border-radius);\n}\n.air-datepicker-cell.-selected- {\n color: #fff;\n border: none;\n background: var(--adp-cell-background-color-selected);\n}\n.air-datepicker-cell.-selected-.-current- {\n color: #fff;\n background: var(--adp-cell-background-color-selected);\n}\n.air-datepicker-cell.-selected-.-focus- {\n background: var(--adp-cell-background-color-selected-hover);\n}\n.air-datepicker-body {\n transition: all var(--adp-transition-duration) var(--adp-transition-ease);\n}\n.air-datepicker-body.-hidden- {\n display: none;\n}\n.air-datepicker-body--day-names {\n display: grid;\n grid-template-columns: repeat(7, var(--adp-day-cell-width));\n margin: 8px 0 3px;\n}\n.air-datepicker-body--day-name {\n color: var(--adp-day-name-color);\n display: flex;\n align-items: center;\n justify-content: center;\n flex: 1;\n text-align: center;\n text-transform: uppercase;\n font-size: 0.8em;\n}\n.air-datepicker-body--day-name.-clickable- {\n cursor: pointer;\n}\n.air-datepicker-body--day-name.-clickable-:hover {\n color: var(--adp-day-name-color-hover);\n}\n.air-datepicker-body--cells {\n display: grid;\n}\n.air-datepicker-body--cells.-days- {\n grid-template-columns: repeat(7, var(--adp-day-cell-width));\n grid-auto-rows: var(--adp-day-cell-height);\n}\n.air-datepicker-body--cells.-months- {\n grid-template-columns: repeat(3, 1fr);\n grid-auto-rows: var(--adp-month-cell-height);\n}\n.air-datepicker-body--cells.-years- {\n grid-template-columns: repeat(4, 1fr);\n grid-auto-rows: var(--adp-year-cell-height);\n}\n.air-datepicker-nav {\n display: flex;\n justify-content: space-between;\n border-bottom: 1px solid var(--adp-border-color-inner);\n min-height: var(--adp-nav-height);\n padding: var(--adp-padding);\n box-sizing: content-box;\n}\n.-only-timepicker- .air-datepicker-nav {\n display: none;\n}\n.air-datepicker-nav--title,\n.air-datepicker-nav--action {\n display: flex;\n cursor: pointer;\n align-items: center;\n justify-content: center;\n}\n.air-datepicker-nav--action {\n width: var(--adp-nav-action-size);\n border-radius: var(--adp-border-radius);\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n}\n.air-datepicker-nav--action:hover {\n background: var(--adp-background-color-hover);\n}\n.air-datepicker-nav--action:active {\n background: var(--adp-background-color-active);\n}\n.air-datepicker-nav--action.-disabled- {\n visibility: hidden;\n}\n.air-datepicker-nav--action svg {\n width: 32px;\n height: 32px;\n}\n.air-datepicker-nav--action path {\n fill: none;\n stroke: var(--adp-nav-arrow-color);\n stroke-width: 2px;\n}\n.air-datepicker-nav--title {\n border-radius: var(--adp-border-radius);\n padding: 0 8px;\n}\n.air-datepicker-nav--title i {\n font-style: normal;\n color: var(--adp-nav-color-secondary);\n margin-left: 0.3em;\n}\n.air-datepicker-nav--title:hover {\n background: var(--adp-background-color-hover);\n}\n.air-datepicker-nav--title:active {\n background: var(--adp-background-color-active);\n}\n.air-datepicker-nav--title.-disabled- {\n cursor: default;\n background: none;\n}\n.air-datepicker-buttons {\n display: grid;\n grid-auto-columns: 1fr;\n grid-auto-flow: column;\n}\n.air-datepicker-button {\n display: inline-flex;\n color: var(--adp-btn-color);\n border-radius: var(--adp-btn-border-radius);\n cursor: pointer;\n height: var(--adp-btn-height);\n border: none;\n background: rgba(255, 255, 255, 0);\n}\n.air-datepicker-button:hover {\n color: var(--adp-btn-color-hover);\n background: var(--adp-btn-background-color-hover);\n}\n.air-datepicker-button:focus {\n color: var(--adp-btn-color-hover);\n background: var(--adp-btn-background-color-hover);\n outline: none;\n}\n.air-datepicker-button:active {\n background: var(--adp-btn-background-color-active);\n}\n.air-datepicker-button span {\n outline: none;\n display: flex;\n align-items: center;\n justify-content: center;\n width: 100%;\n height: 100%;\n}\n.air-datepicker-time {\n display: grid;\n grid-template-columns: max-content 1fr;\n grid-column-gap: 12px;\n align-items: center;\n position: relative;\n padding: 0 var(--adp-time-padding-inner);\n}\n.-only-timepicker- .air-datepicker-time {\n border-top: none;\n}\n.air-datepicker-time--current {\n display: flex;\n align-items: center;\n flex: 1;\n font-size: 14px;\n text-align: center;\n}\n.air-datepicker-time--current-colon {\n margin: 0 2px 3px;\n line-height: 1;\n}\n.air-datepicker-time--current-hours,\n.air-datepicker-time--current-minutes {\n line-height: 1;\n font-size: 19px;\n font-family: 'Century Gothic', CenturyGothic, AppleGothic, sans-serif;\n position: relative;\n z-index: 1;\n}\n.air-datepicker-time--current-hours:after,\n.air-datepicker-time--current-minutes:after {\n content: '';\n background: var(--adp-background-color-hover);\n border-radius: var(--adp-border-radius);\n position: absolute;\n left: -2px;\n top: -3px;\n right: -2px;\n bottom: -2px;\n z-index: -1;\n opacity: 0;\n}\n.air-datepicker-time--current-hours.-focus-:after,\n.air-datepicker-time--current-minutes.-focus-:after {\n opacity: 1;\n}\n.air-datepicker-time--current-ampm {\n text-transform: uppercase;\n align-self: flex-end;\n color: var(--adp-time-day-period-color);\n margin-left: 6px;\n font-size: 11px;\n margin-bottom: 1px;\n}\n.air-datepicker-time--row {\n display: flex;\n align-items: center;\n font-size: 11px;\n height: 17px;\n background: linear-gradient(to right, var(--adp-time-track-color), var(--adp-time-track-color)) left 50%/100% var(--adp-time-track-height) no-repeat;\n}\n.air-datepicker-time--row:first-child {\n margin-bottom: 4px;\n}\n.air-datepicker-time--row input[type='range'] {\n background: none;\n cursor: pointer;\n flex: 1;\n height: 100%;\n width: 100%;\n padding: 0;\n margin: 0;\n -webkit-appearance: none;\n}\n.air-datepicker-time--row input[type='range']::-webkit-slider-thumb {\n -webkit-appearance: none;\n}\n.air-datepicker-time--row input[type='range']::-ms-tooltip {\n display: none;\n}\n.air-datepicker-time--row input[type='range']:hover::-webkit-slider-thumb {\n border-color: var(--adp-time-track-color-hover);\n}\n.air-datepicker-time--row input[type='range']:hover::-moz-range-thumb {\n border-color: var(--adp-time-track-color-hover);\n}\n.air-datepicker-time--row input[type='range']:hover::-ms-thumb {\n border-color: var(--adp-time-track-color-hover);\n}\n.air-datepicker-time--row input[type='range']:focus {\n outline: none;\n}\n.air-datepicker-time--row input[type='range']:focus::-webkit-slider-thumb {\n background: var(--adp-cell-background-color-selected);\n border-color: var(--adp-cell-background-color-selected);\n}\n.air-datepicker-time--row input[type='range']:focus::-moz-range-thumb {\n background: var(--adp-cell-background-color-selected);\n border-color: var(--adp-cell-background-color-selected);\n}\n.air-datepicker-time--row input[type='range']:focus::-ms-thumb {\n background: var(--adp-cell-background-color-selected);\n border-color: var(--adp-cell-background-color-selected);\n}\n.air-datepicker-time--row input[type='range']::-webkit-slider-thumb {\n box-sizing: border-box;\n height: 12px;\n width: 12px;\n border-radius: 3px;\n border: 1px solid var(--adp-time-track-color);\n background: #fff;\n cursor: pointer;\n -webkit-transition: background var(--adp-transition-duration);\n transition: background var(--adp-transition-duration);\n}\n.air-datepicker-time--row input[type='range']::-moz-range-thumb {\n box-sizing: border-box;\n height: 12px;\n width: 12px;\n border-radius: 3px;\n border: 1px solid var(--adp-time-track-color);\n background: #fff;\n cursor: pointer;\n -moz-transition: background var(--adp-transition-duration);\n transition: background var(--adp-transition-duration);\n}\n.air-datepicker-time--row input[type='range']::-ms-thumb {\n box-sizing: border-box;\n height: 12px;\n width: 12px;\n border-radius: 3px;\n border: 1px solid var(--adp-time-track-color);\n background: #fff;\n cursor: pointer;\n -ms-transition: background var(--adp-transition-duration);\n transition: background var(--adp-transition-duration);\n}\n.air-datepicker-time--row input[type='range']::-webkit-slider-thumb {\n margin-top: calc(var(--adp-time-thumb-size) / 2 * -1);\n}\n.air-datepicker-time--row input[type='range']::-webkit-slider-runnable-track {\n border: none;\n height: var(--adp-time-track-height);\n cursor: pointer;\n color: rgba(0, 0, 0, 0);\n background: rgba(0, 0, 0, 0);\n}\n.air-datepicker-time--row input[type='range']::-moz-range-track {\n border: none;\n height: var(--adp-time-track-height);\n cursor: pointer;\n color: rgba(0, 0, 0, 0);\n background: rgba(0, 0, 0, 0);\n}\n.air-datepicker-time--row input[type='range']::-ms-track {\n border: none;\n height: var(--adp-time-track-height);\n cursor: pointer;\n color: rgba(0, 0, 0, 0);\n background: rgba(0, 0, 0, 0);\n}\n.air-datepicker-time--row input[type='range']::-ms-fill-lower {\n background: rgba(0, 0, 0, 0);\n}\n.air-datepicker-time--row input[type='range']::-ms-fill-upper {\n background: rgba(0, 0, 0, 0);\n}\n.air-datepicker {\n --adp-font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';\n --adp-font-size: 14px;\n --adp-width: 246px;\n --adp-z-index: 100;\n --adp-padding: 4px;\n --adp-grid-areas: 'nav' 'body' 'timepicker' 'buttons';\n --adp-transition-duration: 0.3s;\n --adp-transition-ease: ease-out;\n --adp-transition-offset: 8px;\n --adp-background-color: #fff;\n --adp-background-color-hover: #f0f0f0;\n --adp-background-color-active: #eaeaea;\n --adp-background-color-in-range: rgba(92, 196, 239, 0.1);\n --adp-background-color-in-range-focused: rgba(92, 196, 239, 0.2);\n --adp-background-color-selected-other-month-focused: #8ad5f4;\n --adp-background-color-selected-other-month: #a2ddf6;\n --adp-color: #4a4a4a;\n --adp-color-secondary: #9c9c9c;\n --adp-accent-color: #4eb5e6;\n --adp-color-current-date: var(--adp-accent-color);\n --adp-color-other-month: #dedede;\n --adp-color-disabled: #aeaeae;\n --adp-color-disabled-in-range: #939393;\n --adp-color-other-month-hover: #c5c5c5;\n --adp-border-color: #dbdbdb;\n --adp-border-color-inner: #efefef;\n --adp-border-radius: 4px;\n --adp-border-color-inline: #d7d7d7;\n --adp-nav-height: 32px;\n --adp-nav-arrow-color: var(--adp-color-secondary);\n --adp-nav-action-size: 32px;\n --adp-nav-color-secondary: var(--adp-color-secondary);\n --adp-day-name-color: #ff9a19;\n --adp-day-name-color-hover: #8ad5f4;\n --adp-day-cell-width: 1fr;\n --adp-day-cell-height: 32px;\n --adp-month-cell-height: 42px;\n --adp-year-cell-height: 56px;\n --adp-pointer-size: 10px;\n --adp-poiner-border-radius: 2px;\n --adp-pointer-offset: 14px;\n --adp-cell-border-radius: 4px;\n --adp-cell-background-color-hover: var(--adp-background-color-hover);\n --adp-cell-background-color-selected: #5cc4ef;\n --adp-cell-background-color-selected-hover: #45bced;\n --adp-cell-background-color-in-range: rgba(92, 196, 239, 0.1);\n --adp-cell-background-color-in-range-hover: rgba(92, 196, 239, 0.2);\n --adp-cell-border-color-in-range: var(--adp-cell-background-color-selected);\n --adp-btn-height: 32px;\n --adp-btn-color: var(--adp-accent-color);\n --adp-btn-color-hover: var(--adp-color);\n --adp-btn-border-radius: var(--adp-border-radius);\n --adp-btn-background-color-hover: var(--adp-background-color-hover);\n --adp-btn-background-color-active: var(--adp-background-color-active);\n --adp-time-track-height: 1px;\n --adp-time-track-color: #dedede;\n --adp-time-track-color-hover: #b1b1b1;\n --adp-time-thumb-size: 12px;\n --adp-time-padding-inner: 10px;\n --adp-time-day-period-color: var(--adp-color-secondary);\n --adp-mobile-font-size: 16px;\n --adp-mobile-nav-height: 40px;\n --adp-mobile-width: 320px;\n --adp-mobile-day-cell-height: 38px;\n --adp-mobile-month-cell-height: 48px;\n --adp-mobile-year-cell-height: 64px;\n}\n.air-datepicker-overlay {\n --adp-overlay-background-color: rgba(0, 0, 0, 0.3);\n --adp-overlay-transition-duration: 0.3s;\n --adp-overlay-transition-ease: ease-out;\n --adp-overlay-z-index: 99;\n}\n.air-datepicker {\n background: var(--adp-background-color);\n border: 1px solid var(--adp-border-color);\n box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);\n border-radius: var(--adp-border-radius);\n box-sizing: content-box;\n display: grid;\n grid-template-columns: 1fr;\n grid-template-rows: repeat(4, max-content);\n grid-template-areas: var(--adp-grid-areas);\n font-family: var(--adp-font-family), sans-serif;\n font-size: var(--adp-font-size);\n color: var(--adp-color);\n width: var(--adp-width);\n position: absolute;\n transition:\n opacity var(--adp-transition-duration) var(--adp-transition-ease),\n transform var(--adp-transition-duration) var(--adp-transition-ease);\n z-index: var(--adp-z-index);\n}\n.air-datepicker:not(.-custom-position-) {\n opacity: 0;\n}\n.air-datepicker.-from-top- {\n transform: translateY(calc(var(--adp-transition-offset) * -1));\n}\n.air-datepicker.-from-right- {\n transform: translateX(var(--adp-transition-offset));\n}\n.air-datepicker.-from-bottom- {\n transform: translateY(var(--adp-transition-offset));\n}\n.air-datepicker.-from-left- {\n transform: translateX(calc(var(--adp-transition-offset) * -1));\n}\n.air-datepicker.-active-:not(.-custom-position-) {\n transform: translate(0, 0);\n opacity: 1;\n}\n.air-datepicker.-active-.-custom-position- {\n transition: none;\n}\n.air-datepicker.-inline- {\n border-color: var(--adp-border-color-inline);\n box-shadow: none;\n position: static;\n left: auto;\n right: auto;\n opacity: 1;\n transform: none;\n}\n.air-datepicker.-inline- .air-datepicker--pointer {\n display: none;\n}\n.air-datepicker.-is-mobile- {\n --adp-font-size: var(--adp-mobile-font-size);\n --adp-day-cell-height: var(--adp-mobile-day-cell-height);\n --adp-month-cell-height: var(--adp-mobile-month-cell-height);\n --adp-year-cell-height: var(--adp-mobile-year-cell-height);\n --adp-nav-height: var(--adp-mobile-nav-height);\n --adp-nav-action-size: var(--adp-mobile-nav-height);\n position: fixed;\n width: var(--adp-mobile-width);\n border: none;\n}\n.air-datepicker.-is-mobile- * {\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n}\n.air-datepicker.-is-mobile- .air-datepicker--pointer {\n display: none;\n}\n.air-datepicker.-is-mobile-:not(.-custom-position-) {\n transform: translate(-50%, calc(-50% + var(--adp-transition-offset)));\n}\n.air-datepicker.-is-mobile-.-active-:not(.-custom-position-) {\n transform: translate(-50%, -50%);\n}\n.air-datepicker.-custom-position- {\n transition: none;\n}\n.air-datepicker-global-container {\n position: absolute;\n left: 0;\n top: 0;\n}\n.air-datepicker--pointer {\n --pointer-half-size: calc(var(--adp-pointer-size) / 2);\n position: absolute;\n width: var(--adp-pointer-size);\n height: var(--adp-pointer-size);\n z-index: -1;\n}\n.air-datepicker--pointer:after {\n content: '';\n position: absolute;\n background: #fff;\n border-top: 1px solid var(--adp-border-color-inline);\n border-right: 1px solid var(--adp-border-color-inline);\n border-top-right-radius: var(--adp-poiner-border-radius);\n width: var(--adp-pointer-size);\n height: var(--adp-pointer-size);\n box-sizing: border-box;\n}\n.-top-left- .air-datepicker--pointer,\n.-top-center- .air-datepicker--pointer,\n.-top-right- .air-datepicker--pointer,\n[data-popper-placement^='top'] .air-datepicker--pointer {\n top: calc(100% - var(--pointer-half-size) + 1px);\n}\n.-top-left- .air-datepicker--pointer:after,\n.-top-center- .air-datepicker--pointer:after,\n.-top-right- .air-datepicker--pointer:after,\n[data-popper-placement^='top'] .air-datepicker--pointer:after {\n transform: rotate(135deg);\n}\n.-right-top- .air-datepicker--pointer,\n.-right-center- .air-datepicker--pointer,\n.-right-bottom- .air-datepicker--pointer,\n[data-popper-placement^='right'] .air-datepicker--pointer {\n right: calc(100% - var(--pointer-half-size) + 1px);\n}\n.-right-top- .air-datepicker--pointer:after,\n.-right-center- .air-datepicker--pointer:after,\n.-right-bottom- .air-datepicker--pointer:after,\n[data-popper-placement^='right'] .air-datepicker--pointer:after {\n transform: rotate(225deg);\n}\n.-bottom-left- .air-datepicker--pointer,\n.-bottom-center- .air-datepicker--pointer,\n.-bottom-right- .air-datepicker--pointer,\n[data-popper-placement^='bottom'] .air-datepicker--pointer {\n bottom: calc(100% - var(--pointer-half-size) + 1px);\n}\n.-bottom-left- .air-datepicker--pointer:after,\n.-bottom-center- .air-datepicker--pointer:after,\n.-bottom-right- .air-datepicker--pointer:after,\n[data-popper-placement^='bottom'] .air-datepicker--pointer:after {\n transform: rotate(315deg);\n}\n.-left-top- .air-datepicker--pointer,\n.-left-center- .air-datepicker--pointer,\n.-left-bottom- .air-datepicker--pointer,\n[data-popper-placement^='left'] .air-datepicker--pointer {\n left: calc(100% - var(--pointer-half-size) + 1px);\n}\n.-left-top- .air-datepicker--pointer:after,\n.-left-center- .air-datepicker--pointer:after,\n.-left-bottom- .air-datepicker--pointer:after,\n[data-popper-placement^='left'] .air-datepicker--pointer:after {\n transform: rotate(45deg);\n}\n.-top-left- .air-datepicker--pointer,\n.-bottom-left- .air-datepicker--pointer {\n left: var(--adp-pointer-offset);\n}\n.-top-right- .air-datepicker--pointer,\n.-bottom-right- .air-datepicker--pointer {\n right: var(--adp-pointer-offset);\n}\n.-top-center- .air-datepicker--pointer,\n.-bottom-center- .air-datepicker--pointer {\n left: calc(50% - var(--adp-pointer-size) / 2);\n}\n.-left-top- .air-datepicker--pointer,\n.-right-top- .air-datepicker--pointer {\n top: var(--adp-pointer-offset);\n}\n.-left-bottom- .air-datepicker--pointer,\n.-right-bottom- .air-datepicker--pointer {\n bottom: var(--adp-pointer-offset);\n}\n.-left-center- .air-datepicker--pointer,\n.-right-center- .air-datepicker--pointer {\n top: calc(50% - var(--adp-pointer-size) / 2);\n}\n.air-datepicker--navigation {\n grid-area: nav;\n}\n.air-datepicker--content {\n box-sizing: content-box;\n padding: var(--adp-padding);\n grid-area: body;\n}\n.-only-timepicker- .air-datepicker--content {\n display: none;\n}\n.air-datepicker--time {\n grid-area: timepicker;\n}\n.air-datepicker--buttons {\n grid-area: buttons;\n}\n.air-datepicker--buttons,\n.air-datepicker--time {\n padding: var(--adp-padding);\n border-top: 1px solid var(--adp-border-color-inner);\n}\n.air-datepicker-overlay {\n position: fixed;\n background: var(--adp-overlay-background-color);\n left: 0;\n top: 0;\n width: 0;\n height: 0;\n opacity: 0;\n transition:\n opacity var(--adp-overlay-transition-duration) var(--adp-overlay-transition-ease),\n left 0s,\n height 0s,\n width 0s;\n transition-delay: 0s, var(--adp-overlay-transition-duration), var(--adp-overlay-transition-duration), var(--adp-overlay-transition-duration);\n z-index: var(--adp-overlay-z-index);\n}\n.air-datepicker-overlay.-active- {\n opacity: 1;\n width: 100%;\n height: 100%;\n transition:\n opacity var(--adp-overlay-transition-duration) var(--adp-overlay-transition-ease),\n height 0s,\n width 0s;\n}\n\n@keyframes verdocs-field-pulse {\n 0% {\n background-color: rgba(0, 0, 0, 0.35);\n }\n 50% {\n background-color: rgba(0, 0, 0, 0);\n }\n 100% {\n background-color: rgba(0, 0, 0, 0.35);\n }\n}\n","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 = '', readonly = false} = 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 placeholder={placeholder}\n disabled={readonly || disabled}\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"],"version":3}
@@ -9,7 +9,7 @@ import { d as defineCustomElement$6 } from './p-DGJlf5J_.js';
9
9
  import { d as defineCustomElement$5 } from './p-D_QT5uZk.js';
10
10
  import { d as defineCustomElement$4 } from './p-C3iwT41e.js';
11
11
  import { d as defineCustomElement$3 } from './p-kvTSiSQ0.js';
12
- import { d as defineCustomElement$2 } from './p-TkHAxPB_.js';
12
+ import { d as defineCustomElement$2 } from './p-Da1nfhXq.js';
13
13
  import { d as defineCustomElement$1 } from './p-BvDqCFDj.js';
14
14
 
15
15
  const verdocsFieldCheckboxCss = "@charset \"UTF-8\";@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-field-checkbox{padding:0;width:16px;height:16px;display:block;scroll-margin:20px 0;-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-transform-origin:bottom left;transform-origin:bottom left;font-family:\"Inter\", -apple-system, \"Segoe UI\", \"Roboto\", \"Helvetica Neue\", sans-serif}verdocs-field-checkbox div.label{top:-14px;left:-1px;height:14px;color:white;padding:0 4px;font-size:9px;line-height:13px;position:absolute;background:#4a4a99;border-top-left-radius:2px;border-top-right-radius:2px}verdocs-field-checkbox label{cursor:inherit;width:14px;height:14px;display:block;-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-field-checkbox.disabled label{opacity:0.5}verdocs-field-checkbox.focused{-webkit-animation:verdocs-field-pulse 0.4s 1;animation:verdocs-field-pulse 0.4s 1}verdocs-field-checkbox label>input[type=checkbox]{display:none}verdocs-field-checkbox label>input[type=checkbox]+*::before{margin:0;content:\"\";width:12px;height:12px;display:block;line-height:12px;border-radius:2px;-webkit-box-sizing:border-box;box-sizing:border-box;border:1px solid #aeb4bf}verdocs-field-checkbox label>input[type=checkbox]:checked+*{color:#55bc81}verdocs-field-checkbox label>input[type=checkbox]:checked+*::before{content:\"✓\";color:white;font-size:12px;text-align:center;background:#55bc81;border-color:#55bc81}verdocs-field-checkbox.required{border:1px solid #cc0000}verdocs-field-checkbox.hide{display:none}verdocs-field-checkbox.focused{-webkit-animation:verdocs-field-pulse 0.4s 1;animation:verdocs-field-pulse 0.4s 1}verdocs-field-checkbox verdocs-button-panel{display:block;margin-left:-20px;margin-top:-17px;-webkit-transform:scale(0.7);transform:scale(0.7)}verdocs-field-checkbox .settings-icon{position:absolute;top:-5px;left:-20px;display:inline-block;cursor:pointer;opacity:0.3}verdocs-field-checkbox .settings-icon svg{fill:#707ae5}verdocs-field-checkbox .settings-icon:hover{opacity:1}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}";
@@ -191,6 +191,6 @@ function defineCustomElement() {
191
191
  }
192
192
 
193
193
  export { VerdocsFieldCheckbox as V, defineCustomElement as d };
194
- //# sourceMappingURL=p-CtbvYEGE.js.map
194
+ //# sourceMappingURL=p-gGtgKfmC.js.map
195
195
 
196
- //# sourceMappingURL=p-CtbvYEGE.js.map
196
+ //# sourceMappingURL=p-gGtgKfmC.js.map
@@ -1 +1 @@
1
- {"file":"p-CtbvYEGE.js","mappings":";;;;;;;;;;;;;;AAAA,MAAM,uBAAuB,GAAG,q3EAAq3E;;MCax4E,oBAAoB,iBAAAA,kBAAA,CAAA,MAAA,oBAAA,SAAAC,CAAA,CAAA;AALjC,IAAA,WAAA,CAAA,YAAA,EAAA;;;;;;;AAME;;AAEG;AACoB,QAAA,IAAM,CAAA,MAAA,G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C,EAAC,SAAS,EAAE,SAAS,EAAC,CAAC;AAC1C,gBAAA,OAAO,IAAI,CAAC,iBAAiB,EAAE;AACjC,aAAC,EACD,iBAAiB,EAAE,CAAC,IAAG;;AACrB,gBAAA,CAAA,EAAA,GAAA,IAAI,CAAC,eAAe,MAAE,IAAA,IAAA,EAAA,KAAA,MAAA,GAAA,MAAA,GAAA,EAAA,CAAA,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC;AACpC,gBAAA,OAAO,IAAI,CAAC,iBAAiB,EAAE;AACjC,aAAC,EACD,QAAQ,EAAE,2EAA2E,EACrF,CAAA,CACa,CAClB,CACQ,CACZ,CACK,CACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement"],"sources":["src/components/fields/verdocs-field-checkbox/verdocs-field-checkbox.scss?tag=verdocs-field-checkbox","src/components/fields/verdocs-field-checkbox/verdocs-field-checkbox.tsx"],"sourcesContent":["@import '../../../theme.scss';\n\n// See https://www.kallmanation.com/styling-a-checkbox-with-only-css\nverdocs-field-checkbox {\n padding: 0;\n width: 16px;\n height: 16px;\n display: block;\n scroll-margin: 20px 0;\n box-sizing: border-box;\n transform-origin: bottom left;\n font-family: $verdocs-primary-font;\n\n // To avoid conflicting with the use of a label for the checkbox itself\n div.label {\n top: -14px;\n left: -1px;\n height: 14px;\n color: white;\n padding: 0 4px;\n font-size: 9px;\n line-height: 13px;\n position: absolute;\n background: #4a4a99;\n border-top-left-radius: 2px;\n border-top-right-radius: 2px;\n }\n\n label {\n // This is needed to bring down the cursor from the parent element, which is where interactjs applies it\n cursor: inherit;\n\n width: 14px;\n height: 14px;\n display: block;\n box-sizing: border-box;\n }\n\n &.disabled label {\n opacity: 0.5;\n }\n\n &.focused {\n animation: verdocs-field-pulse 0.4s 1;\n }\n\n label > input[type='checkbox'] {\n display: none;\n }\n\n label > input[type='checkbox'] + *::before {\n margin: 0;\n content: '';\n width: 12px;\n height: 12px;\n display: block;\n line-height: 12px;\n border-radius: 2px;\n box-sizing: border-box;\n border: 1px solid $verdocs-grey-2;\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 font-size: 12px;\n text-align: center;\n background: $verdocs-green;\n border-color: $verdocs-green;\n }\n\n &.required {\n border: 1px solid $verdocs-red-1;\n }\n\n &.hide {\n display: none;\n }\n\n &.focused {\n animation: verdocs-field-pulse 0.4s 1;\n }\n\n verdocs-button-panel {\n display: block;\n margin-left: -20px;\n margin-top: -17px;\n transform: scale(0.7);\n }\n\n .settings-icon {\n position: absolute;\n top: -5px;\n left: -20px;\n display: inline-block;\n cursor: pointer;\n opacity: 0.3;\n\n svg {\n fill: $border-color;\n }\n\n &:hover {\n opacity: 1;\n }\n }\n}\n\n@keyframes verdocs-field-pulse {\n 0% {\n background-color: rgba(0, 0, 0, 0.35);\n }\n 50% {\n background-color: rgba(0, 0, 0, 0);\n }\n 100% {\n background-color: rgba(0, 0, 0, 0.35);\n }\n}\n","import {ITemplateField, getRGBA, IEnvelopeField} from '@verdocs/js-sdk';\nimport {Component, Event, EventEmitter, Fragment, h, Host, Method, Prop, State} from '@stencil/core';\nimport {SettingsIcon} from '../../../utils/Icons';\nimport {Store} from '../../../utils/Datastore';\n\n/**\n * Displays a checkbox.\n */\n@Component({\n tag: 'verdocs-field-checkbox',\n styleUrl: 'verdocs-field-checkbox.scss',\n shadow: false,\n})\nexport class VerdocsFieldCheckbox {\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 * Override the field's settings. This is intended to be used during signing when fields are being\n * mutated.\n */\n @Prop() field: IEnvelopeField | null | undefined = null;\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, 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, 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 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 * 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() showingProperties?: boolean = false;\n @State() focused?: boolean = false;\n\n @Method()\n async focusField() {\n // We don't have a visible input that we can actually focus on, so we fake it\n this.focused = true;\n setTimeout(() => {\n this.focused = false;\n }, 500);\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 render() {\n const {source, sourceid, fieldname, editable = false, done = false, disabled = false, focused, xscale = 1, yscale = 1} = this;\n const {index, field} = Store.getField(source, sourceid, fieldname, this.field);\n const {required = false, label = '', value = false, readonly = false} = field || {};\n const backgroundColor = getRGBA(index);\n\n const checked = value === 'true';\n\n if (done) {\n return <Host class={{done}}>{checked ? '✓' : '☐'}</Host>;\n }\n\n return (\n <Host class={{required, disabled, done, focused}} style={{backgroundColor}}>\n {label && <div class=\"label\">{label}</div>}\n\n <label htmlFor={fieldname}>\n <input id={fieldname} name={fieldname} type=\"checkbox\" checked={checked} disabled={readonly || disabled} required={required} />\n <span />\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={field.name}\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={'Check boxes allow the user to select one or more (non-exclusive) options.'}\n />\n </verdocs-portal>\n )}\n </Fragment>\n )}\n </label>\n </Host>\n );\n }\n}\n"],"version":3}
1
+ {"file":"p-gGtgKfmC.js","mappings":";;;;;;;;;;;;;;AAAA,MAAM,uBAAuB,GAAG,q3EAAq3E;;MCax4E,oBAAoB,iBAAAA,kBAAA,CAAA,MAAA,oBAAA,SAAAC,CAAA,CAAA;AALjC,IAAA,WAAA,CAAA,YAAA,EAAA;;;;;;;AAME;;AAEG;AACoB,QAAA,IAAM,CAAA,MAAA,GAA4B,UAAU;AAEnE;;AAEG;AACoB,QAAA,IAAQ,CAAA,QAAA,GAAW,EA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AAC,iBAAiB,EAAE;AACjC,aAAC,EACD,iBAAiB,EAAE,CAAC,IAAG;;AACrB,gBAAA,CAAA,EAAA,GAAA,IAAI,CAAC,eAAe,MAAE,IAAA,IAAA,EAAA,KAAA,MAAA,GAAA,MAAA,GAAA,EAAA,CAAA,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC;AACpC,gBAAA,OAAO,IAAI,CAAC,iBAAiB,EAAE;AACjC,aAAC,EACD,QAAQ,EAAE,2EAA2E,EACrF,CAAA,CACa,CAClB,CACQ,CACZ,CACK,CACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement"],"sources":["src/components/fields/verdocs-field-checkbox/verdocs-field-checkbox.scss?tag=verdocs-field-checkbox","src/components/fields/verdocs-field-checkbox/verdocs-field-checkbox.tsx"],"sourcesContent":["@import '../../../theme.scss';\n\n// See https://www.kallmanation.com/styling-a-checkbox-with-only-css\nverdocs-field-checkbox {\n padding: 0;\n width: 16px;\n height: 16px;\n display: block;\n scroll-margin: 20px 0;\n box-sizing: border-box;\n transform-origin: bottom left;\n font-family: $verdocs-primary-font;\n\n // To avoid conflicting with the use of a label for the checkbox itself\n div.label {\n top: -14px;\n left: -1px;\n height: 14px;\n color: white;\n padding: 0 4px;\n font-size: 9px;\n line-height: 13px;\n position: absolute;\n background: #4a4a99;\n border-top-left-radius: 2px;\n border-top-right-radius: 2px;\n }\n\n label {\n // This is needed to bring down the cursor from the parent element, which is where interactjs applies it\n cursor: inherit;\n\n width: 14px;\n height: 14px;\n display: block;\n box-sizing: border-box;\n }\n\n &.disabled label {\n opacity: 0.5;\n }\n\n &.focused {\n animation: verdocs-field-pulse 0.4s 1;\n }\n\n label > input[type='checkbox'] {\n display: none;\n }\n\n label > input[type='checkbox'] + *::before {\n margin: 0;\n content: '';\n width: 12px;\n height: 12px;\n display: block;\n line-height: 12px;\n border-radius: 2px;\n box-sizing: border-box;\n border: 1px solid $verdocs-grey-2;\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 font-size: 12px;\n text-align: center;\n background: $verdocs-green;\n border-color: $verdocs-green;\n }\n\n &.required {\n border: 1px solid $verdocs-red-1;\n }\n\n &.hide {\n display: none;\n }\n\n &.focused {\n animation: verdocs-field-pulse 0.4s 1;\n }\n\n verdocs-button-panel {\n display: block;\n margin-left: -20px;\n margin-top: -17px;\n transform: scale(0.7);\n }\n\n .settings-icon {\n position: absolute;\n top: -5px;\n left: -20px;\n display: inline-block;\n cursor: pointer;\n opacity: 0.3;\n\n svg {\n fill: $border-color;\n }\n\n &:hover {\n opacity: 1;\n }\n }\n}\n\n@keyframes verdocs-field-pulse {\n 0% {\n background-color: rgba(0, 0, 0, 0.35);\n }\n 50% {\n background-color: rgba(0, 0, 0, 0);\n }\n 100% {\n background-color: rgba(0, 0, 0, 0.35);\n }\n}\n","import {ITemplateField, getRGBA, IEnvelopeField} from '@verdocs/js-sdk';\nimport {Component, Event, EventEmitter, Fragment, h, Host, Method, Prop, State} from '@stencil/core';\nimport {SettingsIcon} from '../../../utils/Icons';\nimport {Store} from '../../../utils/Datastore';\n\n/**\n * Displays a checkbox.\n */\n@Component({\n tag: 'verdocs-field-checkbox',\n styleUrl: 'verdocs-field-checkbox.scss',\n shadow: false,\n})\nexport class VerdocsFieldCheckbox {\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 * Override the field's settings. This is intended to be used during signing when fields are being\n * mutated.\n */\n @Prop() field: IEnvelopeField | null | undefined = null;\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, 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, 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 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 * 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() showingProperties?: boolean = false;\n @State() focused?: boolean = false;\n\n @Method()\n async focusField() {\n // We don't have a visible input that we can actually focus on, so we fake it\n this.focused = true;\n setTimeout(() => {\n this.focused = false;\n }, 500);\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 render() {\n const {source, sourceid, fieldname, editable = false, done = false, disabled = false, focused, xscale = 1, yscale = 1} = this;\n const {index, field} = Store.getField(source, sourceid, fieldname, this.field);\n const {required = false, label = '', value = false, readonly = false} = field || {};\n const backgroundColor = getRGBA(index);\n\n const checked = value === 'true';\n\n if (done) {\n return <Host class={{done}}>{checked ? '✓' : '☐'}</Host>;\n }\n\n return (\n <Host class={{required, disabled, done, focused}} style={{backgroundColor}}>\n {label && <div class=\"label\">{label}</div>}\n\n <label htmlFor={fieldname}>\n <input id={fieldname} name={fieldname} type=\"checkbox\" checked={checked} disabled={readonly || disabled} required={required} />\n <span />\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={field.name}\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={'Check boxes allow the user to select one or more (non-exclusive) options.'}\n />\n </verdocs-portal>\n )}\n </Fragment>\n )}\n </label>\n </Host>\n );\n }\n}\n"],"version":3}
@@ -11,7 +11,7 @@ import { d as defineCustomElement$6 } from './p-CBfSBOmz.js';
11
11
  import { d as defineCustomElement$5 } from './p-D_QT5uZk.js';
12
12
  import { d as defineCustomElement$4 } from './p-C3iwT41e.js';
13
13
  import { d as defineCustomElement$3 } from './p-kvTSiSQ0.js';
14
- import { d as defineCustomElement$2 } from './p-TkHAxPB_.js';
14
+ import { d as defineCustomElement$2 } from './p-Da1nfhXq.js';
15
15
  import { d as defineCustomElement$1 } from './p-BvDqCFDj.js';
16
16
 
17
17
  const verdocsFieldInitialCss = "@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-field-initial{font-family:\"Inter\", -apple-system, \"Segoe UI\", \"Roboto\", \"Helvetica Neue\", sans-serif;width:83px;height:36px;display:block;font-size:11px;position:relative;letter-spacing:0.3px;scroll-margin:20px 0;background-color:transparent;-webkit-transform-origin:bottom left;transform-origin:bottom left;border:1px solid rgba(0, 0, 0, 0.2)}verdocs-field-initial label{top:-14px;left:-1px;height:14px;color:white;padding:0 4px;font-size:9px;line-height:13px;position:absolute;background:#4a4a99;border-top-left-radius:2px;border-top-right-radius:2px}verdocs-field-initial.done{border:none;opacity:1}verdocs-field-initial img{display:block;max-width:100%;max-height:100%}verdocs-field-initial.disabled img{opacity:0.5}verdocs-field-initial button{cursor:inherit;-webkit-box-sizing:border-box;box-sizing:border-box;border:none;color:rgba(0, 0, 0, 0.87);font-weight:500;-webkit-transform-origin:0 0;transform-origin:0 0;height:100%;width:100%;background:none;font-size:11px}verdocs-field-initial button.hide{display:none}verdocs-field-initial.required{border:1px solid #cc0000}verdocs-field-initial.focused{-webkit-animation:verdocs-field-pulse 0.4s 1;animation:verdocs-field-pulse 0.4s 1}verdocs-field-initial verdocs-button-panel{top:-3px;left:-2px;opacity:0.5;z-index:1000;cursor:pointer;position:absolute;-webkit-transform:scale(0.6);transform:scale(0.6)}verdocs-field-initial verdocs-button-panel[data-active],verdocs-field-initial verdocs-button-panel:hover{opacity:1}verdocs-field-initial verdocs-button-panel .icon svg{fill:#333333}verdocs-field-initial verdocs-button-panel .icon:hover svg{fill:#000000}verdocs-field-initial .settings-icon{position:absolute;top:-3px;left:-20px;display:inline-block;cursor:pointer;opacity:0.3}verdocs-field-initial .settings-icon svg{fill:#707ae5}verdocs-field-initial .settings-icon:hover{opacity:1}verdocs-field-initial .edge-top,verdocs-field-initial .edge-right,verdocs-field-initial .edge-left,verdocs-field-initial .edge-bottom{position:absolute;z-index:10}verdocs-field-initial .edge-top{top:-2px;left:0;right:0;height:5px}verdocs-field-initial .edge-right{top:0;bottom:0;right:-2px;width:5px}verdocs-field-initial .edge-left{top:0;left:-2px;bottom:0;width:5px}verdocs-field-initial .edge-bottom{bottom:-2px;left:0;right:0;height:5px}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}";
@@ -298,6 +298,6 @@ function defineCustomElement() {
298
298
  }
299
299
 
300
300
  export { VerdocsFieldInitial as V, defineCustomElement as d };
301
- //# sourceMappingURL=p-B0MvlQO2.js.map
301
+ //# sourceMappingURL=p-jXH2SygA.js.map
302
302
 
303
- //# sourceMappingURL=p-B0MvlQO2.js.map
303
+ //# sourceMappingURL=p-jXH2SygA.js.map
@@ -1 +1 @@
1
- {"file":"p-B0MvlQO2.js","mappings":";;;;;;;;;;;;;;;;AAAA,MAAM,sBAAsB,GAAG,6sFAA6sF;;MCqB/tF,mBAAmB,iBAAAA,kBAAA,CAAA,MAAA,mBAAA,SAAAC,CAAA,CAAA;AALhC,IAAA,WAAA,CAAA,YAAA,EAAA;;;;;;;;;;;AAQE;;AAEG;AACoB,QAAA,IAAM,CAAA,MAAA,GAA4B,UAAU;AAEnE;;AAEG;AACoB,QAAA,IAAQ,CAAA,QAAA,GAAW,EAAE;AAE5C;;AAEG;AACoB,QAAA,IAAS,CAAA,SAAA,GAAW,EAAE;AAE7C;;;AAGG;AACK,QAAA,IAAK,CAAA,KAAA,GAAsC,IAAI;AAEvD;;AAEG;AACoB,QAAA,IAAQ,CAAA,QAAA,GAAa,KAAK;AAEjD;;AAEG;AACoB,QAAA,IAAQ,CAAA,QAAA,GAAW,EAAE;AAE5C;;;AAGG;AACoB,QAAA,IAAQ,CAAA,QAAA,GAA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BAAA,OAAO,IAAI,CAAC,iBAAiB,EAAE;AACjC,aAAC,EACD,iBAAiB,EAAE,CAAC,IAAG;;AACrB,gBAAA,CAAA,EAAA,GAAA,IAAI,CAAC,eAAe,MAAE,IAAA,IAAA,EAAA,KAAA,MAAA,GAAA,MAAA,GAAA,EAAA,CAAA,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC;AACpC,gBAAA,OAAO,IAAI,CAAC,iBAAiB,EAAE;AACjC,aAAC,EACD,QAAQ,EAAE,sEAAsE,EAAA,CAChF,CACa,CAClB,CACQ,CACZ,CACI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement"],"sources":["src/components/fields/verdocs-field-initial/verdocs-field-initial.scss?tag=verdocs-field-initial","src/components/fields/verdocs-field-initial/verdocs-field-initial.tsx"],"sourcesContent":["@import '../../../theme.scss';\n\nverdocs-field-initial {\n font-family: $verdocs-primary-font;\n width: 83px;\n height: 36px;\n display: block;\n font-size: 11px;\n position: relative;\n letter-spacing: 0.3px;\n scroll-margin: 20px 0;\n background-color: transparent;\n transform-origin: bottom left;\n border: 1px solid rgba(0, 0, 0, 0.2);\n\n label {\n top: -14px;\n left: -1px;\n height: 14px;\n color: white;\n padding: 0 4px;\n font-size: 9px;\n line-height: 13px;\n position: absolute;\n background: #4a4a99;\n border-top-left-radius: 2px;\n border-top-right-radius: 2px;\n }\n\n &.done {\n border: none;\n opacity: 1;\n }\n\n img {\n display: block;\n max-width: 100%;\n max-height: 100%;\n }\n\n &.disabled img {\n opacity: 0.5;\n }\n\n button {\n // This is needed to bring down the cursor from the parent element, which is where interactjs applies it\n cursor: inherit;\n\n box-sizing: border-box;\n border: none;\n color: rgba(0, 0, 0, 0.87);\n font-weight: 500;\n transform-origin: 0 0;\n height: 100%;\n width: 100%;\n background: none;\n font-size: 11px;\n\n &.hide {\n display: none;\n }\n }\n\n &.required {\n border: 1px solid $verdocs-red-1;\n }\n\n &.focused {\n animation: verdocs-field-pulse 0.4s 1;\n }\n\n verdocs-button-panel {\n top: -3px;\n left: -2px;\n opacity: 0.5;\n z-index: 1000;\n cursor: pointer;\n position: absolute;\n transform: scale(0.6);\n\n &[data-active],\n &:hover {\n opacity: 1;\n }\n\n .icon {\n svg {\n fill: #333333;\n }\n\n &:hover {\n svg {\n fill: #000000;\n }\n }\n }\n }\n\n .settings-icon {\n position: absolute;\n top: -3px;\n left: -20px;\n display: inline-block;\n cursor: pointer;\n opacity: 0.3;\n\n svg {\n fill: $border-color;\n }\n\n &:hover {\n opacity: 1;\n }\n }\n\n .edge-top,\n .edge-right,\n .edge-left,\n .edge-bottom {\n position: absolute;\n z-index: 10;\n }\n\n .edge-top {\n top: -2px;\n left: 0;\n right: 0;\n height: 5px;\n }\n\n .edge-right {\n top: 0;\n bottom: 0;\n right: -2px;\n width: 5px;\n }\n\n .edge-left {\n top: 0;\n left: -2px;\n bottom: 0;\n width: 5px;\n }\n\n .edge-bottom {\n bottom: -2px;\n left: 0;\n right: 0;\n height: 5px;\n }\n}\n\n@keyframes verdocs-field-pulse {\n 0% {\n background-color: rgba(0, 0, 0, 0.35);\n }\n 50% {\n background-color: rgba(0, 0, 0, 0);\n }\n 100% {\n background-color: rgba(0, 0, 0, 0.35);\n }\n}\n","import {ITemplateField, getRGBA, IEnvelopeField, VerdocsEndpoint, updateField, ITemplate} from '@verdocs/js-sdk';\nimport {Component, Event, EventEmitter, h, Host, Method, Prop, Fragment, State, Element} from '@stencil/core';\nimport {SettingsIcon} from '../../../utils/Icons';\nimport {Store} from '../../../utils/Datastore';\nimport interact from 'interactjs';\nimport {ResizeEvent} from '@interactjs/actions/resize/plugin';\n\n/**\n * Displays an initial field. If an initial already exists, it will be displayed and the field\n * will be disabled. Otherwise, a placeholder button will be shown. Clicking the button will\n * show a dialog to adopt an initial.\n *\n * NOTE: When initial fields are completed they will be filled with an initial \"stamp\".\n * This requires operation against a live, valid envelope. If you are testing this component\n * in Storybook, it will not be visible here.\n */\n@Component({\n tag: 'verdocs-field-initial',\n styleUrl: 'verdocs-field-initial.scss',\n shadow: false,\n})\nexport class VerdocsFieldInitial {\n @Element() el: HTMLElement;\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 * Override the field's settings. This is intended to be used during signing when fields are being\n * mutated.\n */\n @Prop() field: IEnvelopeField | null | undefined = null;\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 * The document or template field to display.\n */\n @Prop({reflect: true}) initials: string = '';\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 * Event emitted when an initial block is adopted by the user. The event detail will contain the base64 string of the initial image.\n */\n @Event({composed: true}) adopt: EventEmitter<string>;\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 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<string>;\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 on every character entered into / deleted from the field.\n */\n @Event({composed: true}) settingsPress: EventEmitter;\n\n /**\n * Event fired when the field is deleted.\n */\n @Event({composed: true}) deleted: EventEmitter<{fieldName: string}>;\n\n @State() showingProperties?: boolean = false;\n @State() focused?: boolean = false;\n\n @Method() async focusField() {\n this.handleShow();\n }\n\n @State()\n tempInitials: string = '';\n\n private dialog?: any;\n\n componentDidRender() {\n interact.dynamicDrop(true);\n\n if (this.editable) {\n interact(this.el).resizable({\n edges: {\n top: '.edge-top',\n left: '.edge-left',\n bottom: '.edge-bottom',\n right: '.edge-right',\n },\n modifiers: [\n interact.modifiers.restrictSize({\n min: {width: 71, height: 36},\n }),\n ],\n listeners: {\n start: this.handleResizeStart.bind(this),\n move: this.handleResize.bind(this),\n end: this.handleResizeEnd.bind(this),\n },\n });\n }\n }\n\n handleResizeStart(e: ResizeEvent) {\n e.preventDefault();\n e.stopPropagation();\n e.target.dataset.originalBottom = e.target.style.bottom;\n }\n\n handleResize(e: any) {\n let {width, height} = e.rect;\n\n const dX = e.deltaRect.left;\n const dY = e.deltaRect.bottom;\n const currentLeft = parseFloat(e.target.style.left);\n const currentBottom = parseFloat(e.target.style.bottom);\n\n width /= this.xscale;\n height /= this.yscale;\n\n Object.assign(e.target.style, {\n width: `${width}px`,\n height: `${height}px`,\n left: `${currentLeft + dX}px`,\n bottom: `${currentBottom - dY}px`,\n });\n }\n\n async handleResizeEnd(e: any) {\n const {sourceid, fieldname} = this;\n\n const width = Math.round(parseFloat(e.target.style.width));\n let height = Math.round(parseFloat(e.target.style.height));\n if (height < 20) {\n height = 15;\n }\n\n const newBottom = parseFloat(e.target.style.bottom);\n const originalBottom = parseFloat(e.target.dataset.originalBottom);\n const template = await Store.getTemplate(VerdocsEndpoint.getDefault(), this.sourceid);\n const oldField = template.fields.find(f => f.name === fieldname);\n const y = newBottom !== originalBottom ? newBottom / this.yscale : oldField?.y;\n\n updateField(VerdocsEndpoint.getDefault(), sourceid, fieldname, {width, height, y})\n .then(async updatedField => {\n const template = await Store.getTemplate(VerdocsEndpoint.getDefault(), this.sourceid);\n const newTemplate = JSON.parse(JSON.stringify(template)) as ITemplate;\n const fieldIndex = newTemplate.fields.findIndex(field => field.name === fieldname);\n if (fieldIndex > -1) {\n newTemplate.fields[fieldIndex] = updatedField;\n }\n Store.updateTemplate(this.sourceid, newTemplate);\n\n this.settingsChanged?.emit({fieldName: fieldname, field: updatedField});\n Object.assign(e.target.dataset, {x: 0, y: 0, h: 0});\n })\n .catch(e => console.log('Field update failed', e));\n }\n\n hideDialog() {\n this.dialog?.remove();\n this.dialog = null;\n this.focused = false;\n }\n\n handleAdopt(e: any) {\n console.log('[INITIAL] Adopted initials');\n this.tempInitials = e.detail;\n this.fieldChange?.emit(this.tempInitials);\n this.hideDialog();\n }\n\n handleShow() {\n this.dialog = document.createElement('verdocs-initial-dialog');\n this.dialog.setAttribute('initials', this.initials);\n // this.dialog.setAttribute('roleindex', this.roleindex);\n this.dialog.addEventListener('exit', () => this.hideDialog());\n this.dialog.addEventListener('next', (e: any) => this.handleAdopt(e));\n document.body.append(this.dialog);\n this.focused = true;\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 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, value = '', label = '', settings = {}} = field || {};\n const backgroundColor = getRGBA(index);\n const {base64} = settings;\n\n if (done) {\n return <Host class={{done}}>{value && <img src={value} alt=\"Initial\" />}</Host>;\n }\n\n return (\n <Host class={{required, disabled, done, focused}} style={{backgroundColor}}>\n {editable && <div class=\"edge-right\" />}\n {editable && <div class=\"edge-left\" />}\n {editable && <div class=\"edge-top\" />}\n {editable && <div class=\"edge-bottom\" />}\n\n {label && <label>{label}</label>}\n\n {base64 ? <img src={base64} alt=\"Initial\" /> : <button onClick={() => !disabled && this.handleShow()}>Initial</button>}\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-${fieldname}`} 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: field.name});\n return this.hideSettingsPanel();\n }}\n onSettingsChanged={e => {\n this.settingsChanged?.emit(e.detail);\n return this.hideSettingsPanel();\n }}\n helpText={\"initial fields capture the recipient's initials on a clause or page.\"}\n />\n </verdocs-portal>\n )}\n </Fragment>\n )}\n </Host>\n );\n }\n}\n"],"version":3}
1
+ {"file":"p-jXH2SygA.js","mappings":";;;;;;;;;;;;;;;;AAAA,MAAM,sBAAsB,GAAG,6sFAA6sF;;MCqB/tF,mBAAmB,iBAAAA,kBAAA,CAAA,MAAA,mBAAA,SAAAC,CAAA,CAAA;AALhC,IAAA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AAA,CAAE,EAAE,WAAW,EAAE,OAAO,IAAI,CAAC,iBAAiB,GAAG,KAAK,CAAC,EAAA,EACxH,CACE,CAAA,mCAAA,EAAA,EAAA,UAAU,EAAE,QAAQ,EACpB,SAAS,EAAE,SAAS,EACpB,OAAO,EAAE,OAAO,IAAI,CAAC,iBAAiB,GAAG,KAAK,CAAC,EAC/C,QAAQ,EAAE,MAAK;;AACb,gBAAA,CAAA,EAAA,GAAA,IAAI,CAAC,OAAO,MAAA,IAAA,IAAA,EAAA,KAAA,MAAA,GAAA,MAAA,GAAA,EAAA,CAAE,IAAI,CAAC,EAAC,SAAS,EAAE,KAAK,CAAC,IAAI,EAAC,CAAC;AAC3C,gBAAA,OAAO,IAAI,CAAC,iBAAiB,EAAE;AACjC,aAAC,EACD,iBAAiB,EAAE,CAAC,IAAG;;AACrB,gBAAA,CAAA,EAAA,GAAA,IAAI,CAAC,eAAe,MAAE,IAAA,IAAA,EAAA,KAAA,MAAA,GAAA,MAAA,GAAA,EAAA,CAAA,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC;AACpC,gBAAA,OAAO,IAAI,CAAC,iBAAiB,EAAE;AACjC,aAAC,EACD,QAAQ,EAAE,sEAAsE,EAAA,CAChF,CACa,CAClB,CACQ,CACZ,CACI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement"],"sources":["src/components/fields/verdocs-field-initial/verdocs-field-initial.scss?tag=verdocs-field-initial","src/components/fields/verdocs-field-initial/verdocs-field-initial.tsx"],"sourcesContent":["@import '../../../theme.scss';\n\nverdocs-field-initial {\n font-family: $verdocs-primary-font;\n width: 83px;\n height: 36px;\n display: block;\n font-size: 11px;\n position: relative;\n letter-spacing: 0.3px;\n scroll-margin: 20px 0;\n background-color: transparent;\n transform-origin: bottom left;\n border: 1px solid rgba(0, 0, 0, 0.2);\n\n label {\n top: -14px;\n left: -1px;\n height: 14px;\n color: white;\n padding: 0 4px;\n font-size: 9px;\n line-height: 13px;\n position: absolute;\n background: #4a4a99;\n border-top-left-radius: 2px;\n border-top-right-radius: 2px;\n }\n\n &.done {\n border: none;\n opacity: 1;\n }\n\n img {\n display: block;\n max-width: 100%;\n max-height: 100%;\n }\n\n &.disabled img {\n opacity: 0.5;\n }\n\n button {\n // This is needed to bring down the cursor from the parent element, which is where interactjs applies it\n cursor: inherit;\n\n box-sizing: border-box;\n border: none;\n color: rgba(0, 0, 0, 0.87);\n font-weight: 500;\n transform-origin: 0 0;\n height: 100%;\n width: 100%;\n background: none;\n font-size: 11px;\n\n &.hide {\n display: none;\n }\n }\n\n &.required {\n border: 1px solid $verdocs-red-1;\n }\n\n &.focused {\n animation: verdocs-field-pulse 0.4s 1;\n }\n\n verdocs-button-panel {\n top: -3px;\n left: -2px;\n opacity: 0.5;\n z-index: 1000;\n cursor: pointer;\n position: absolute;\n transform: scale(0.6);\n\n &[data-active],\n &:hover {\n opacity: 1;\n }\n\n .icon {\n svg {\n fill: #333333;\n }\n\n &:hover {\n svg {\n fill: #000000;\n }\n }\n }\n }\n\n .settings-icon {\n position: absolute;\n top: -3px;\n left: -20px;\n display: inline-block;\n cursor: pointer;\n opacity: 0.3;\n\n svg {\n fill: $border-color;\n }\n\n &:hover {\n opacity: 1;\n }\n }\n\n .edge-top,\n .edge-right,\n .edge-left,\n .edge-bottom {\n position: absolute;\n z-index: 10;\n }\n\n .edge-top {\n top: -2px;\n left: 0;\n right: 0;\n height: 5px;\n }\n\n .edge-right {\n top: 0;\n bottom: 0;\n right: -2px;\n width: 5px;\n }\n\n .edge-left {\n top: 0;\n left: -2px;\n bottom: 0;\n width: 5px;\n }\n\n .edge-bottom {\n bottom: -2px;\n left: 0;\n right: 0;\n height: 5px;\n }\n}\n\n@keyframes verdocs-field-pulse {\n 0% {\n background-color: rgba(0, 0, 0, 0.35);\n }\n 50% {\n background-color: rgba(0, 0, 0, 0);\n }\n 100% {\n background-color: rgba(0, 0, 0, 0.35);\n }\n}\n","import {ITemplateField, getRGBA, IEnvelopeField, VerdocsEndpoint, updateField, ITemplate} from '@verdocs/js-sdk';\nimport {Component, Event, EventEmitter, h, Host, Method, Prop, Fragment, State, Element} from '@stencil/core';\nimport {SettingsIcon} from '../../../utils/Icons';\nimport {Store} from '../../../utils/Datastore';\nimport interact from 'interactjs';\nimport {ResizeEvent} from '@interactjs/actions/resize/plugin';\n\n/**\n * Displays an initial field. If an initial already exists, it will be displayed and the field\n * will be disabled. Otherwise, a placeholder button will be shown. Clicking the button will\n * show a dialog to adopt an initial.\n *\n * NOTE: When initial fields are completed they will be filled with an initial \"stamp\".\n * This requires operation against a live, valid envelope. If you are testing this component\n * in Storybook, it will not be visible here.\n */\n@Component({\n tag: 'verdocs-field-initial',\n styleUrl: 'verdocs-field-initial.scss',\n shadow: false,\n})\nexport class VerdocsFieldInitial {\n @Element() el: HTMLElement;\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 * Override the field's settings. This is intended to be used during signing when fields are being\n * mutated.\n */\n @Prop() field: IEnvelopeField | null | undefined = null;\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 * The document or template field to display.\n */\n @Prop({reflect: true}) initials: string = '';\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 * Event emitted when an initial block is adopted by the user. The event detail will contain the base64 string of the initial image.\n */\n @Event({composed: true}) adopt: EventEmitter<string>;\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 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<string>;\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 on every character entered into / deleted from the field.\n */\n @Event({composed: true}) settingsPress: EventEmitter;\n\n /**\n * Event fired when the field is deleted.\n */\n @Event({composed: true}) deleted: EventEmitter<{fieldName: string}>;\n\n @State() showingProperties?: boolean = false;\n @State() focused?: boolean = false;\n\n @Method() async focusField() {\n this.handleShow();\n }\n\n @State()\n tempInitials: string = '';\n\n private dialog?: any;\n\n componentDidRender() {\n interact.dynamicDrop(true);\n\n if (this.editable) {\n interact(this.el).resizable({\n edges: {\n top: '.edge-top',\n left: '.edge-left',\n bottom: '.edge-bottom',\n right: '.edge-right',\n },\n modifiers: [\n interact.modifiers.restrictSize({\n min: {width: 71, height: 36},\n }),\n ],\n listeners: {\n start: this.handleResizeStart.bind(this),\n move: this.handleResize.bind(this),\n end: this.handleResizeEnd.bind(this),\n },\n });\n }\n }\n\n handleResizeStart(e: ResizeEvent) {\n e.preventDefault();\n e.stopPropagation();\n e.target.dataset.originalBottom = e.target.style.bottom;\n }\n\n handleResize(e: any) {\n let {width, height} = e.rect;\n\n const dX = e.deltaRect.left;\n const dY = e.deltaRect.bottom;\n const currentLeft = parseFloat(e.target.style.left);\n const currentBottom = parseFloat(e.target.style.bottom);\n\n width /= this.xscale;\n height /= this.yscale;\n\n Object.assign(e.target.style, {\n width: `${width}px`,\n height: `${height}px`,\n left: `${currentLeft + dX}px`,\n bottom: `${currentBottom - dY}px`,\n });\n }\n\n async handleResizeEnd(e: any) {\n const {sourceid, fieldname} = this;\n\n const width = Math.round(parseFloat(e.target.style.width));\n let height = Math.round(parseFloat(e.target.style.height));\n if (height < 20) {\n height = 15;\n }\n\n const newBottom = parseFloat(e.target.style.bottom);\n const originalBottom = parseFloat(e.target.dataset.originalBottom);\n const template = await Store.getTemplate(VerdocsEndpoint.getDefault(), this.sourceid);\n const oldField = template.fields.find(f => f.name === fieldname);\n const y = newBottom !== originalBottom ? newBottom / this.yscale : oldField?.y;\n\n updateField(VerdocsEndpoint.getDefault(), sourceid, fieldname, {width, height, y})\n .then(async updatedField => {\n const template = await Store.getTemplate(VerdocsEndpoint.getDefault(), this.sourceid);\n const newTemplate = JSON.parse(JSON.stringify(template)) as ITemplate;\n const fieldIndex = newTemplate.fields.findIndex(field => field.name === fieldname);\n if (fieldIndex > -1) {\n newTemplate.fields[fieldIndex] = updatedField;\n }\n Store.updateTemplate(this.sourceid, newTemplate);\n\n this.settingsChanged?.emit({fieldName: fieldname, field: updatedField});\n Object.assign(e.target.dataset, {x: 0, y: 0, h: 0});\n })\n .catch(e => console.log('Field update failed', e));\n }\n\n hideDialog() {\n this.dialog?.remove();\n this.dialog = null;\n this.focused = false;\n }\n\n handleAdopt(e: any) {\n console.log('[INITIAL] Adopted initials');\n this.tempInitials = e.detail;\n this.fieldChange?.emit(this.tempInitials);\n this.hideDialog();\n }\n\n handleShow() {\n this.dialog = document.createElement('verdocs-initial-dialog');\n this.dialog.setAttribute('initials', this.initials);\n // this.dialog.setAttribute('roleindex', this.roleindex);\n this.dialog.addEventListener('exit', () => this.hideDialog());\n this.dialog.addEventListener('next', (e: any) => this.handleAdopt(e));\n document.body.append(this.dialog);\n this.focused = true;\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 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, value = '', label = '', settings = {}} = field || {};\n const backgroundColor = getRGBA(index);\n const {base64} = settings;\n\n if (done) {\n return <Host class={{done}}>{value && <img src={value} alt=\"Initial\" />}</Host>;\n }\n\n return (\n <Host class={{required, disabled, done, focused}} style={{backgroundColor}}>\n {editable && <div class=\"edge-right\" />}\n {editable && <div class=\"edge-left\" />}\n {editable && <div class=\"edge-top\" />}\n {editable && <div class=\"edge-bottom\" />}\n\n {label && <label>{label}</label>}\n\n {base64 ? <img src={base64} alt=\"Initial\" /> : <button onClick={() => !disabled && this.handleShow()}>Initial</button>}\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-${fieldname}`} 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: field.name});\n return this.hideSettingsPanel();\n }}\n onSettingsChanged={e => {\n this.settingsChanged?.emit(e.detail);\n return this.hideSettingsPanel();\n }}\n helpText={\"initial fields capture the recipient's initials on a clause or page.\"}\n />\n </verdocs-portal>\n )}\n </Fragment>\n )}\n </Host>\n );\n }\n}\n"],"version":3}