@verdocs/web-sdk 6.2.0-beta.10 → 6.2.0-beta.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/verdocs-field-attachment_13.cjs.entry.js +15 -16
- package/dist/collection/components/fields/verdocs-field-attachment/verdocs-field-attachment.js +2 -2
- package/dist/collection/components/fields/verdocs-field-attachment/verdocs-field-attachment.js.map +1 -1
- package/dist/collection/components/fields/verdocs-field-checkbox/verdocs-field-checkbox.js +2 -2
- package/dist/collection/components/fields/verdocs-field-checkbox/verdocs-field-checkbox.js.map +1 -1
- package/dist/collection/components/fields/verdocs-field-date/verdocs-field-date.js +2 -2
- package/dist/collection/components/fields/verdocs-field-date/verdocs-field-date.js.map +1 -1
- package/dist/collection/components/fields/verdocs-field-dropdown/verdocs-field-dropdown.js +3 -3
- package/dist/collection/components/fields/verdocs-field-dropdown/verdocs-field-dropdown.js.map +1 -1
- package/dist/collection/components/fields/verdocs-field-radio/verdocs-field-radio.js +2 -3
- package/dist/collection/components/fields/verdocs-field-radio/verdocs-field-radio.js.map +1 -1
- package/dist/collection/components/fields/verdocs-field-textarea/verdocs-field-textarea.js +2 -2
- package/dist/collection/components/fields/verdocs-field-textarea/verdocs-field-textarea.js.map +1 -1
- package/dist/collection/components/fields/verdocs-field-textbox/verdocs-field-textbox.js +2 -2
- package/dist/collection/components/fields/verdocs-field-textbox/verdocs-field-textbox.js.map +1 -1
- package/dist/components/{p-P-4S3wSU.js → p-BUPn0KJI.js} +5 -5
- package/dist/components/p-BUPn0KJI.js.map +1 -0
- package/dist/components/{p-Hkdx4H9H.js → p-Bi0l6QlD.js} +4 -4
- package/dist/components/p-Bi0l6QlD.js.map +1 -0
- package/dist/components/{p-ve-pBNd-.js → p-BxbKHTfr.js} +4 -4
- package/dist/components/p-BxbKHTfr.js.map +1 -0
- package/dist/components/{p-CbxnHcQ3.js → p-CPQ8z-s9.js} +4 -5
- package/dist/components/p-CPQ8z-s9.js.map +1 -0
- package/dist/components/{p-DwuiNrjE.js → p-DNl85SmH.js} +4 -4
- package/dist/components/p-DNl85SmH.js.map +1 -0
- package/dist/components/{p-D3SGhXmE.js → p-DqEgCVAc.js} +4 -4
- package/dist/components/p-DqEgCVAc.js.map +1 -0
- package/dist/components/{p-GtsDe5v2.js → p-DzmiWHGk.js} +10 -10
- package/dist/components/{p-GtsDe5v2.js.map → p-DzmiWHGk.js.map} +1 -1
- package/dist/components/{p-CR3sHtk0.js → p-E9PbrxYN.js} +9 -9
- package/dist/components/{p-CR3sHtk0.js.map → p-E9PbrxYN.js.map} +1 -1
- package/dist/components/{p-CEa7rXxy.js → p-dQTAo6oZ.js} +10 -10
- package/dist/components/{p-CEa7rXxy.js.map → p-dQTAo6oZ.js.map} +1 -1
- package/dist/components/{p-PXUFg-8o.js → p-rPFlZtPo.js} +4 -4
- package/dist/components/p-rPFlZtPo.js.map +1 -0
- package/dist/components/verdocs-build.js +10 -10
- package/dist/components/verdocs-field-attachment.js +1 -1
- package/dist/components/verdocs-field-checkbox.js +1 -1
- package/dist/components/verdocs-field-date.js +1 -1
- package/dist/components/verdocs-field-dropdown.js +1 -1
- package/dist/components/verdocs-field-radio.js +1 -1
- package/dist/components/verdocs-field-textarea.js +1 -1
- package/dist/components/verdocs-field-textbox.js +1 -1
- package/dist/components/verdocs-preview.js +1 -1
- package/dist/components/verdocs-template-document-page.js +1 -1
- package/dist/components/verdocs-template-fields.js +1 -1
- package/dist/esm/verdocs-field-attachment_13.entry.js +15 -16
- package/dist/esm-es5/verdocs-field-attachment_13.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-attachment_13.entry.js.map +1 -1
- package/dist/verdocs-web-sdk/p-9eb85897.system.entry.js +2 -0
- package/dist/verdocs-web-sdk/p-9eb85897.system.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/p-BxnDlEK2.system.js +1 -1
- package/dist/verdocs-web-sdk/p-DK3iWsPn.system.js.map +1 -0
- package/dist/verdocs-web-sdk/p-eddd3dbf.entry.js +2 -0
- package/dist/verdocs-web-sdk/p-eddd3dbf.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +1 -1
- package/package.json +3 -3
- package/dist/components/p-CbxnHcQ3.js.map +0 -1
- package/dist/components/p-D3SGhXmE.js.map +0 -1
- package/dist/components/p-DwuiNrjE.js.map +0 -1
- package/dist/components/p-Hkdx4H9H.js.map +0 -1
- package/dist/components/p-P-4S3wSU.js.map +0 -1
- package/dist/components/p-PXUFg-8o.js.map +0 -1
- package/dist/components/p-ve-pBNd-.js.map +0 -1
- package/dist/verdocs-web-sdk/p-8118695e.system.entry.js +0 -2
- package/dist/verdocs-web-sdk/p-8118695e.system.entry.js.map +0 -1
- package/dist/verdocs-web-sdk/p-Bj4xnlKC.system.js.map +0 -1
- package/dist/verdocs-web-sdk/p-e0c8651e.entry.js +0 -2
- package/dist/verdocs-web-sdk/p-e0c8651e.entry.js.map +0 -1
|
@@ -166,7 +166,7 @@ const VerdocsFieldTextbox = /*@__PURE__*/ proxyCustomElement(class VerdocsFieldT
|
|
|
166
166
|
render() {
|
|
167
167
|
const { source, sourceid, fieldname, editable = false, done = false, disabled = false, focused, xscale = 1, yscale = 1 } = this;
|
|
168
168
|
const { index, field } = Store.getField(source, sourceid, fieldname, this.field);
|
|
169
|
-
let { required = false, placeholder = '', label = '', width = 150, default: value = '', multiline = false } = field || {};
|
|
169
|
+
let { required = false, placeholder = '', label = '', width = 150, readonly = false, default: value = '', multiline = false } = field || {};
|
|
170
170
|
const backgroundColor = getRGBA(index);
|
|
171
171
|
// TODO: Consolidate value/defaultValue handling between template and envelope fields.
|
|
172
172
|
if (field === null || field === void 0 ? void 0 : field.value) {
|
|
@@ -177,7 +177,7 @@ const VerdocsFieldTextbox = /*@__PURE__*/ proxyCustomElement(class VerdocsFieldT
|
|
|
177
177
|
if (done) {
|
|
178
178
|
return h(Host, { class: { done } }, value);
|
|
179
179
|
}
|
|
180
|
-
return (h(Host, { class: { required, disabled, done, focused }, style: { backgroundColor } }, editable && h("div", { class: "edge-top" }), editable && h("div", { class: "edge-right" }), editable && h("div", { class: "edge-left" }), editable && h("div", { class: "edge-bottom" }), label && h("label", null, label), multiline ? (h("textarea", { name: fieldname,
|
|
180
|
+
return (h(Host, { class: { required, disabled, done, focused }, style: { backgroundColor } }, editable && h("div", { class: "edge-top" }), editable && h("div", { class: "edge-right" }), editable && h("div", { class: "edge-left" }), editable && h("div", { class: "edge-bottom" }), label && h("label", null, label), multiline ? (h("textarea", { name: fieldname, required: required, placeholder: placeholder, disabled: readonly || disabled, ref: el => (this.inputEl = el), onFocus: () => (this.focused = true), onBlur: () => (this.focused = false) }, value)) : (h("input", { type: "text", value: value, name: fieldname, required: required, maxlength: maxlength, placeholder: placeholder, disabled: readonly || disabled, ref: el => (this.inputEl = el), onFocus: () => (this.focused = true), onBlur: () => (this.focused = false) })), editable && (h(Fragment, null, h("div", { id: `verdocs-settings-panel-trigger-${fieldname}`, style: { transform: `scale(${Math.floor((1 / xscale) * 1000) / 1000}, ${Math.floor((1 / yscale) * 1000) / 1000})` }, class: "settings-icon", innerHTML: SettingsIcon, onClick: (e) => {
|
|
181
181
|
e.stopPropagation();
|
|
182
182
|
this.showingProperties = !this.showingProperties;
|
|
183
183
|
} }), this.showingProperties && (h("verdocs-portal", { anchor: `verdocs-settings-panel-trigger-${fieldname}`, onClickAway: () => (this.showingProperties = false) }, h("verdocs-template-field-properties", { templateId: sourceid, fieldName: fieldname, onClose: () => this.hideSettingsPanel(), onDelete: () => {
|
|
@@ -271,6 +271,6 @@ function defineCustomElement() {
|
|
|
271
271
|
}
|
|
272
272
|
|
|
273
273
|
export { VerdocsFieldTextbox as V, defineCustomElement as d };
|
|
274
|
-
//# sourceMappingURL=p-
|
|
274
|
+
//# sourceMappingURL=p-rPFlZtPo.js.map
|
|
275
275
|
|
|
276
|
-
//# sourceMappingURL=p-
|
|
276
|
+
//# sourceMappingURL=p-rPFlZtPo.js.map
|
|
@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,QAAQ,EACpB,SAAS,EAAE,SAAS,EACpB,OAAO,EAAE,MAAM,IAAI,CAAC,iBAAiB,EAAE,EACvC,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,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}
|
|
@@ -8,15 +8,15 @@ import { d as defineCustomElement$F } from './p-ChnAjOXc.js';
|
|
|
8
8
|
import { d as defineCustomElement$E } from './p-DPAlF5W0.js';
|
|
9
9
|
import { d as defineCustomElement$D } from './p-BVn3xhxx.js';
|
|
10
10
|
import { d as defineCustomElement$C } from './p-qPO42SgN.js';
|
|
11
|
-
import { d as defineCustomElement$B } from './p-
|
|
12
|
-
import { d as defineCustomElement$A } from './p-
|
|
13
|
-
import { d as defineCustomElement$z } from './p-
|
|
14
|
-
import { d as defineCustomElement$y } from './p-
|
|
11
|
+
import { d as defineCustomElement$B } from './p-BxbKHTfr.js';
|
|
12
|
+
import { d as defineCustomElement$A } from './p-DqEgCVAc.js';
|
|
13
|
+
import { d as defineCustomElement$z } from './p-Bi0l6QlD.js';
|
|
14
|
+
import { d as defineCustomElement$y } from './p-BUPn0KJI.js';
|
|
15
15
|
import { d as defineCustomElement$x } from './p-dHBtO65i.js';
|
|
16
|
-
import { d as defineCustomElement$w } from './p-
|
|
16
|
+
import { d as defineCustomElement$w } from './p-CPQ8z-s9.js';
|
|
17
17
|
import { d as defineCustomElement$v } from './p-EXpiIDZa.js';
|
|
18
|
-
import { d as defineCustomElement$u } from './p-
|
|
19
|
-
import { d as defineCustomElement$t } from './p-
|
|
18
|
+
import { d as defineCustomElement$u } from './p-DNl85SmH.js';
|
|
19
|
+
import { d as defineCustomElement$t } from './p-rPFlZtPo.js';
|
|
20
20
|
import { d as defineCustomElement$s } from './p-K-NdlPFS.js';
|
|
21
21
|
import { d as defineCustomElement$r } from './p-DnOIbTGi.js';
|
|
22
22
|
import { d as defineCustomElement$q } from './p-DGYycCbd.js';
|
|
@@ -25,7 +25,7 @@ import { d as defineCustomElement$o } from './p-VxVNy_Vd.js';
|
|
|
25
25
|
import { d as defineCustomElement$n } from './p-BdN73vyV.js';
|
|
26
26
|
import { d as defineCustomElement$m } from './p-C2aep_b9.js';
|
|
27
27
|
import { d as defineCustomElement$l } from './p-BDofff4X.js';
|
|
28
|
-
import { d as defineCustomElement$k } from './p-
|
|
28
|
+
import { d as defineCustomElement$k } from './p-DzmiWHGk.js';
|
|
29
29
|
import { d as defineCustomElement$j } from './p-CDAcaz4P.js';
|
|
30
30
|
import { d as defineCustomElement$i } from './p-Bv5CFhqy.js';
|
|
31
31
|
import { d as defineCustomElement$h } from './p-BA36wKSy.js';
|
|
@@ -35,9 +35,9 @@ import { d as defineCustomElement$e } from './p-CPTiPp39.js';
|
|
|
35
35
|
import { d as defineCustomElement$d } from './p-DsixyEYT.js';
|
|
36
36
|
import { d as defineCustomElement$c } from './p-Bi-CeVWz.js';
|
|
37
37
|
import { d as defineCustomElement$b } from './p-Cg4UNrkK.js';
|
|
38
|
-
import { d as defineCustomElement$a } from './p-
|
|
38
|
+
import { d as defineCustomElement$a } from './p-E9PbrxYN.js';
|
|
39
39
|
import { d as defineCustomElement$9 } from './p-BNTIQRGG.js';
|
|
40
|
-
import { d as defineCustomElement$8 } from './p-
|
|
40
|
+
import { d as defineCustomElement$8 } from './p-dQTAo6oZ.js';
|
|
41
41
|
import { d as defineCustomElement$7 } from './p-DMu9DQ9X.js';
|
|
42
42
|
import { d as defineCustomElement$6 } from './p-BSdKow-j.js';
|
|
43
43
|
import { d as defineCustomElement$5 } from './p-CKMliVhp.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { V as VerdocsFieldAttachment$1, d as defineCustomElement$1 } from './p-
|
|
1
|
+
import { V as VerdocsFieldAttachment$1, d as defineCustomElement$1 } from './p-BxbKHTfr.js';
|
|
2
2
|
|
|
3
3
|
const VerdocsFieldAttachment = VerdocsFieldAttachment$1;
|
|
4
4
|
const defineCustomElement = defineCustomElement$1;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { V as VerdocsFieldCheckbox$1, d as defineCustomElement$1 } from './p-
|
|
1
|
+
import { V as VerdocsFieldCheckbox$1, d as defineCustomElement$1 } from './p-DqEgCVAc.js';
|
|
2
2
|
|
|
3
3
|
const VerdocsFieldCheckbox = VerdocsFieldCheckbox$1;
|
|
4
4
|
const defineCustomElement = defineCustomElement$1;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { V as VerdocsFieldDate$1, d as defineCustomElement$1 } from './p-
|
|
1
|
+
import { V as VerdocsFieldDate$1, d as defineCustomElement$1 } from './p-Bi0l6QlD.js';
|
|
2
2
|
|
|
3
3
|
const VerdocsFieldDate = VerdocsFieldDate$1;
|
|
4
4
|
const defineCustomElement = defineCustomElement$1;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { V as VerdocsFieldDropdown$1, d as defineCustomElement$1 } from './p-
|
|
1
|
+
import { V as VerdocsFieldDropdown$1, d as defineCustomElement$1 } from './p-BUPn0KJI.js';
|
|
2
2
|
|
|
3
3
|
const VerdocsFieldDropdown = VerdocsFieldDropdown$1;
|
|
4
4
|
const defineCustomElement = defineCustomElement$1;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { V as VerdocsFieldRadio$1, d as defineCustomElement$1 } from './p-
|
|
1
|
+
import { V as VerdocsFieldRadio$1, d as defineCustomElement$1 } from './p-CPQ8z-s9.js';
|
|
2
2
|
|
|
3
3
|
const VerdocsFieldRadio = VerdocsFieldRadio$1;
|
|
4
4
|
const defineCustomElement = defineCustomElement$1;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { V as VerdocsFieldTextarea$1, d as defineCustomElement$1 } from './p-
|
|
1
|
+
import { V as VerdocsFieldTextarea$1, d as defineCustomElement$1 } from './p-DNl85SmH.js';
|
|
2
2
|
|
|
3
3
|
const VerdocsFieldTextarea = VerdocsFieldTextarea$1;
|
|
4
4
|
const defineCustomElement = defineCustomElement$1;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { V as VerdocsFieldTextbox$1, d as defineCustomElement$1 } from './p-
|
|
1
|
+
import { V as VerdocsFieldTextbox$1, d as defineCustomElement$1 } from './p-rPFlZtPo.js';
|
|
2
2
|
|
|
3
3
|
const VerdocsFieldTextbox = VerdocsFieldTextbox$1;
|
|
4
4
|
const defineCustomElement = defineCustomElement$1;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { V as VerdocsTemplateDocumentPage$1, d as defineCustomElement$1 } from './p-
|
|
1
|
+
import { V as VerdocsTemplateDocumentPage$1, d as defineCustomElement$1 } from './p-E9PbrxYN.js';
|
|
2
2
|
|
|
3
3
|
const VerdocsTemplateDocumentPage = VerdocsTemplateDocumentPage$1;
|
|
4
4
|
const defineCustomElement = defineCustomElement$1;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { V as VerdocsTemplateFields$1, d as defineCustomElement$1 } from './p-
|
|
1
|
+
import { V as VerdocsTemplateFields$1, d as defineCustomElement$1 } from './p-dQTAo6oZ.js';
|
|
2
2
|
|
|
3
3
|
const VerdocsTemplateFields = VerdocsTemplateFields$1;
|
|
4
4
|
const defineCustomElement = defineCustomElement$1;
|
|
@@ -110,13 +110,13 @@ const VerdocsFieldAttachment = class {
|
|
|
110
110
|
render() {
|
|
111
111
|
const { source, sourceid, fieldname, editable = false, done = false, disabled = false, focused, xscale = 1, yscale = 1 } = this;
|
|
112
112
|
const { index, field } = Store.getField(source, sourceid, fieldname, this.field);
|
|
113
|
-
const { required = false, value = '', label = '', settings = {} } = field || {};
|
|
113
|
+
const { required = false, value = '', label = '', readonly = false, settings = {} } = field || {};
|
|
114
114
|
const backgroundColor = getRGBA(index);
|
|
115
115
|
const hasFile = value || !!this.selectedFile;
|
|
116
116
|
if (done) {
|
|
117
117
|
return (h(Host, { class: { done } }, h("div", { class: "attach", innerHTML: hasFile ? AttachedIcon : PaperclipIcon$1 })));
|
|
118
118
|
}
|
|
119
|
-
return (h(Host, { class: { required, disabled, done, focused }, style: { backgroundColor } }, label && h("label", null, label), h("div", { class: "attach", innerHTML: hasFile ? AttachedIcon : PaperclipIcon$1, onClick: () => !disabled && this.handleShow() }), editable && (h(Fragment, null, h("div", { id: `verdocs-settings-panel-trigger-${fieldname}`, style: { transform: `scale(${Math.floor((1 / xscale) * 1000) / 1000}, ${Math.floor((1 / yscale) * 1000) / 1000})` }, class: "settings-icon", innerHTML: SettingsIcon, onClick: (e) => {
|
|
119
|
+
return (h(Host, { class: { required, disabled, done, focused }, style: { backgroundColor } }, label && h("label", null, label), h("div", { class: "attach", innerHTML: hasFile ? AttachedIcon : PaperclipIcon$1, onClick: () => !disabled && !readonly && this.handleShow() }), editable && (h(Fragment, null, h("div", { id: `verdocs-settings-panel-trigger-${fieldname}`, style: { transform: `scale(${Math.floor((1 / xscale) * 1000) / 1000}, ${Math.floor((1 / yscale) * 1000) / 1000})` }, class: "settings-icon", innerHTML: SettingsIcon, onClick: (e) => {
|
|
120
120
|
e.stopPropagation();
|
|
121
121
|
this.showingProperties = !this.showingProperties;
|
|
122
122
|
} }), this.showingProperties && (h("verdocs-portal", { anchor: `verdocs-settings-panel-trigger-${fieldname}`, onClickAway: () => (this.showingProperties = false) }, h("verdocs-template-field-properties", { templateId: sourceid, fieldName: fieldname, onClose: () => (this.showingProperties = false), onDelete: () => {
|
|
@@ -211,13 +211,13 @@ const VerdocsFieldCheckbox = class {
|
|
|
211
211
|
render() {
|
|
212
212
|
const { source, sourceid, fieldname, editable = false, done = false, disabled = false, focused, xscale = 1, yscale = 1 } = this;
|
|
213
213
|
const { index, field } = Store.getField(source, sourceid, fieldname, this.field);
|
|
214
|
-
const { required = false, label = '', value = false } = field || {};
|
|
214
|
+
const { required = false, label = '', value = false, readonly = false } = field || {};
|
|
215
215
|
const backgroundColor = getRGBA(index);
|
|
216
216
|
const checked = value === 'true';
|
|
217
217
|
if (done) {
|
|
218
218
|
return h(Host, { class: { done } }, checked ? '✓' : '☐');
|
|
219
219
|
}
|
|
220
|
-
return (h(Host, { class: { required, disabled, done, focused }, style: { backgroundColor } }, label && h("div", { class: "label" }, label), h("label", { htmlFor: fieldname }, h("input", { id: fieldname, name: fieldname, type: "checkbox", checked: checked, disabled: disabled, required: required }), h("span", null), editable && (h(Fragment, null, h("div", { id: `verdocs-settings-panel-trigger-${fieldname}`, style: { transform: `scale(${Math.floor((1 / xscale) * 1000) / 1000}, ${Math.floor((1 / yscale) * 1000) / 1000})` }, class: "settings-icon", innerHTML: SettingsIcon, onClick: (e) => {
|
|
220
|
+
return (h(Host, { class: { required, disabled, done, focused }, style: { backgroundColor } }, label && h("div", { class: "label" }, label), h("label", { htmlFor: fieldname }, h("input", { id: fieldname, name: fieldname, type: "checkbox", checked: checked, disabled: readonly || disabled, required: required }), h("span", null), editable && (h(Fragment, null, h("div", { id: `verdocs-settings-panel-trigger-${fieldname}`, style: { transform: `scale(${Math.floor((1 / xscale) * 1000) / 1000}, ${Math.floor((1 / yscale) * 1000) / 1000})` }, class: "settings-icon", innerHTML: SettingsIcon, onClick: (e) => {
|
|
221
221
|
e.stopPropagation();
|
|
222
222
|
this.showingProperties = !this.showingProperties;
|
|
223
223
|
} }), this.showingProperties && (h("verdocs-portal", { anchor: `verdocs-settings-panel-trigger-${field.name}`, onClickAway: () => (this.showingProperties = false) }, h("verdocs-template-field-properties", { templateId: sourceid, fieldName: field.name, onClose: () => (this.showingProperties = false), onDelete: () => {
|
|
@@ -325,13 +325,13 @@ const VerdocsFieldDate = class {
|
|
|
325
325
|
render() {
|
|
326
326
|
const { source, sourceid, fieldname, editable = false, done = false, disabled = false, focused, xscale = 1, yscale = 1 } = this;
|
|
327
327
|
const { index, field } = Store.getField(source, sourceid, fieldname, this.field);
|
|
328
|
-
const { required = false, placeholder = 'Date...', value = '', label = '' } = field || {};
|
|
328
|
+
const { required = false, placeholder = 'Date...', value = '', label = '', readonly = false } = field || {};
|
|
329
329
|
const backgroundColor = getRGBA(index);
|
|
330
330
|
const formattedValue = value ? dateFnsExports.format(new Date(value), FORMAT_DATE) : '';
|
|
331
331
|
if (this.done) {
|
|
332
332
|
return h(Host, { class: { done } }, formattedValue);
|
|
333
333
|
}
|
|
334
|
-
return (h(Host, { class: { required, disabled, done, focused }, style: { backgroundColor } }, label && h("label", null, label), h("input", { name: fieldname, class: "input-el", type: "text", value: formattedValue, id: this.containerId,
|
|
334
|
+
return (h(Host, { class: { required, disabled, done, focused }, style: { backgroundColor } }, label && h("label", null, label), h("input", { name: fieldname, class: "input-el", type: "text", value: formattedValue, id: this.containerId, placeholder: placeholder, disabled: readonly || disabled, onFocus: () => (this.focused = true), onBlur: () => (this.focused = false) }), editable && (h(Fragment, null, h("div", { id: `verdocs-settings-panel-trigger-${fieldname}`, style: { transform: `scale(${Math.floor((1 / xscale) * 1000) / 1000}, ${Math.floor((1 / yscale) * 1000) / 1000})` }, class: "settings-icon", innerHTML: SettingsIcon, onClick: (e) => {
|
|
335
335
|
e.stopPropagation();
|
|
336
336
|
this.showingProperties = !this.showingProperties;
|
|
337
337
|
} }), this.showingProperties && (h("verdocs-portal", { anchor: `verdocs-settings-panel-trigger-${field.name}`, onClickAway: () => (this.showingProperties = false) }, h("verdocs-template-field-properties", { templateId: sourceid, fieldName: fieldname, onClose: () => (this.showingProperties = false), onDelete: () => {
|
|
@@ -432,7 +432,7 @@ const VerdocsFieldDropdown = class {
|
|
|
432
432
|
render() {
|
|
433
433
|
const { source, sourceid, fieldname, editable = false, done = false, disabled = false, focused, xscale = 1, yscale = 1 } = this;
|
|
434
434
|
const { index, field } = Store.getField(source, sourceid, fieldname, this.field);
|
|
435
|
-
let { required = false, value = '', label = '', options } = field || {};
|
|
435
|
+
let { required = false, value = '', label = '', options, readonly = false } = field || {};
|
|
436
436
|
const backgroundColor = getRGBA(index);
|
|
437
437
|
// TODO: Consolidate value/defaultValue handling between template and envelope fields.
|
|
438
438
|
if (field === null || field === void 0 ? void 0 : field.value) {
|
|
@@ -444,8 +444,8 @@ const VerdocsFieldDropdown = class {
|
|
|
444
444
|
// TODO: Look for other places this mistaken assumption was made.
|
|
445
445
|
// Defaults only apply in destructuring if undefined. null doesn't trigger it.
|
|
446
446
|
options || (options = []);
|
|
447
|
-
console.log('Dropdown value', this.fieldname, value);
|
|
448
|
-
return (h(Host, { class: { required, disabled, done, focused }, style: { backgroundColor } }, label && h("label", null, label), h("select", { disabled: disabled, onChange: e => this.handleChange(e), ref: el => (this.selectEl = el) }, h("option", { value: "" }, "Select..."), options.map(option => (h("option", { value: option.id, selected: option.id === value }, option.label))), !options.length && h("option", { value: "NA" }, "N/A")), editable && (h(Fragment, null, h("div", { id: `verdocs-settings-panel-trigger-${fieldname}`, style: { transform: `scale(${Math.floor((1 / xscale) * 1000) / 1000}, ${Math.floor((1 / yscale) * 1000) / 1000})` }, class: "settings-icon", innerHTML: SettingsIcon, onClick: (e) => {
|
|
447
|
+
console.log('Dropdown value', this.fieldname, value, options);
|
|
448
|
+
return (h(Host, { class: { required, disabled, done, focused }, style: { backgroundColor } }, label && h("label", null, label), h("select", { disabled: readonly || disabled, onChange: e => this.handleChange(e), ref: el => (this.selectEl = el) }, h("option", { value: "" }, "Select..."), options.map(option => (h("option", { value: option.id, selected: option.id === value }, option.label))), !options.length && (h("option", { value: "NA", selected: 'NA' === value }, "N/A"))), editable && (h(Fragment, null, h("div", { id: `verdocs-settings-panel-trigger-${fieldname}`, style: { transform: `scale(${Math.floor((1 / xscale) * 1000) / 1000}, ${Math.floor((1 / yscale) * 1000) / 1000})` }, class: "settings-icon", innerHTML: SettingsIcon, onClick: (e) => {
|
|
449
449
|
e.stopPropagation();
|
|
450
450
|
this.showingProperties = !this.showingProperties;
|
|
451
451
|
} }), this.showingProperties && (h("verdocs-portal", { anchor: `verdocs-settings-panel-trigger-${fieldname}`, onClickAway: () => (this.showingProperties = false) }, h("verdocs-template-field-properties", { templateId: sourceid, fieldName: fieldname, onClose: () => (this.showingProperties = false), onDelete: () => {
|
|
@@ -672,14 +672,13 @@ const VerdocsFieldRadio = class {
|
|
|
672
672
|
render() {
|
|
673
673
|
const { source, sourceid, fieldname, editable = false, done = false, disabled = false, focused, xscale = 1, yscale = 1 } = this;
|
|
674
674
|
const { index, field } = Store.getField(source, sourceid, fieldname, this.field);
|
|
675
|
-
const { name, required = false, label = '', group = '', value = false } = field || {};
|
|
675
|
+
const { name, required = false, label = '', group = '', value = false, readonly = false } = field || {};
|
|
676
676
|
const backgroundColor = getRGBA(index);
|
|
677
677
|
const selected = value === 'true';
|
|
678
678
|
if (done) {
|
|
679
679
|
return (h(Host, { class: { done }, style: { maxWidth: '10px' } }, h("span", { innerHTML: selected ? RadioIconSelected : RadioIconUnselected })));
|
|
680
680
|
}
|
|
681
|
-
|
|
682
|
-
return (h(Host, { class: { required: this.required || required, disabled, done, focused }, style: { backgroundColor } }, label && h("div", { class: "label" }, label), editable && group && h("div", { class: "group" }, group), h("input", { id: fieldname, type: "radio", name: group || fieldname, value: name, checked: !!selected, disabled: disabled, required: required }), h("label", { htmlFor: fieldname }), editable && (h(Fragment, null, h("div", { id: `verdocs-settings-panel-trigger-${fieldname}`, style: { transform: `scale(${Math.floor((1 / xscale) * 1000) / 1000}, ${Math.floor((1 / yscale) * 1000) / 1000})` }, class: "settings-icon", innerHTML: SettingsIcon, onClick: (e) => {
|
|
681
|
+
return (h(Host, { class: { required: this.required || required, disabled, done, focused }, style: { backgroundColor } }, label && h("div", { class: "label" }, label), editable && group && h("div", { class: "group" }, group), h("input", { id: fieldname, type: "radio", name: group || fieldname, value: name, checked: !!selected, disabled: readonly || disabled, required: required }), h("label", { htmlFor: fieldname }), editable && (h(Fragment, null, h("div", { id: `verdocs-settings-panel-trigger-${fieldname}`, style: { transform: `scale(${Math.floor((1 / xscale) * 1000) / 1000}, ${Math.floor((1 / yscale) * 1000) / 1000})` }, class: "settings-icon", innerHTML: SettingsIcon, onClick: (e) => {
|
|
683
682
|
e.stopPropagation();
|
|
684
683
|
this.showingProperties = !this.showingProperties;
|
|
685
684
|
} }), this.showingProperties && (h("verdocs-portal", { anchor: `verdocs-settings-panel-trigger-${fieldname}`, onClickAway: () => (this.showingProperties = false) }, h("verdocs-template-field-properties", { templateId: sourceid, fieldName: fieldname, onClose: () => (this.showingProperties = false), onDelete: () => {
|
|
@@ -950,12 +949,12 @@ const VerdocsFieldTextarea = class {
|
|
|
950
949
|
render() {
|
|
951
950
|
const { source, sourceid, fieldname, editable = false, done = false, disabled = false, focused, xscale = 1, yscale = 1 } = this;
|
|
952
951
|
const { index, field } = Store.getField(source, sourceid, fieldname, this.field);
|
|
953
|
-
const { required = false, placeholder = '', value = '', label = '' } = field || {};
|
|
952
|
+
const { required = false, placeholder = '', value = '', label = '', readonly = false } = field || {};
|
|
954
953
|
const backgroundColor = getRGBA(index);
|
|
955
954
|
if (done) {
|
|
956
955
|
return h(Host, { class: { done } }, value);
|
|
957
956
|
}
|
|
958
|
-
return (h(Host, { class: { required, disabled, done, focused }, style: { backgroundColor } }, label && h("label", null, label), h("textarea", { name: fieldname,
|
|
957
|
+
return (h(Host, { class: { required, disabled, done, focused }, style: { backgroundColor } }, label && h("label", null, label), h("textarea", { name: fieldname, required: required, placeholder: placeholder, disabled: readonly || disabled, ref: el => (this.inputEl = el), onFocus: () => (this.focused = true), onBlur: () => (this.focused = false) }, value), editable && (h(Fragment, null, h("div", { id: `verdocs-settings-panel-trigger-${fieldname}`, style: { transform: `scale(${Math.floor((1 / xscale) * 1000) / 1000}, ${Math.floor((1 / yscale) * 1000) / 1000})` }, class: "settings-icon", innerHTML: SettingsIcon, onClick: (e) => {
|
|
959
958
|
e.stopPropagation();
|
|
960
959
|
this.showingProperties = !this.showingProperties;
|
|
961
960
|
} }), this.showingProperties && (h("verdocs-portal", { anchor: `verdocs-settings-panel-trigger-${fieldname}`, onClickAway: () => (this.showingProperties = false) }, h("verdocs-template-field-properties", { templateId: sourceid, fieldName: fieldname, onClose: () => (this.showingProperties = false), onDelete: () => {
|
|
@@ -1122,7 +1121,7 @@ const VerdocsFieldTextbox = class {
|
|
|
1122
1121
|
render() {
|
|
1123
1122
|
const { source, sourceid, fieldname, editable = false, done = false, disabled = false, focused, xscale = 1, yscale = 1 } = this;
|
|
1124
1123
|
const { index, field } = Store.getField(source, sourceid, fieldname, this.field);
|
|
1125
|
-
let { required = false, placeholder = '', label = '', width = 150, default: value = '', multiline = false } = field || {};
|
|
1124
|
+
let { required = false, placeholder = '', label = '', width = 150, readonly = false, default: value = '', multiline = false } = field || {};
|
|
1126
1125
|
const backgroundColor = getRGBA(index);
|
|
1127
1126
|
// TODO: Consolidate value/defaultValue handling between template and envelope fields.
|
|
1128
1127
|
if (field === null || field === void 0 ? void 0 : field.value) {
|
|
@@ -1133,7 +1132,7 @@ const VerdocsFieldTextbox = class {
|
|
|
1133
1132
|
if (done) {
|
|
1134
1133
|
return h(Host, { class: { done } }, value);
|
|
1135
1134
|
}
|
|
1136
|
-
return (h(Host, { class: { required, disabled, done, focused }, style: { backgroundColor } }, editable && h("div", { class: "edge-top" }), editable && h("div", { class: "edge-right" }), editable && h("div", { class: "edge-left" }), editable && h("div", { class: "edge-bottom" }), label && h("label", null, label), multiline ? (h("textarea", { name: fieldname,
|
|
1135
|
+
return (h(Host, { class: { required, disabled, done, focused }, style: { backgroundColor } }, editable && h("div", { class: "edge-top" }), editable && h("div", { class: "edge-right" }), editable && h("div", { class: "edge-left" }), editable && h("div", { class: "edge-bottom" }), label && h("label", null, label), multiline ? (h("textarea", { name: fieldname, required: required, placeholder: placeholder, disabled: readonly || disabled, ref: el => (this.inputEl = el), onFocus: () => (this.focused = true), onBlur: () => (this.focused = false) }, value)) : (h("input", { type: "text", value: value, name: fieldname, required: required, maxlength: maxlength, placeholder: placeholder, disabled: readonly || disabled, ref: el => (this.inputEl = el), onFocus: () => (this.focused = true), onBlur: () => (this.focused = false) })), editable && (h(Fragment, null, h("div", { id: `verdocs-settings-panel-trigger-${fieldname}`, style: { transform: `scale(${Math.floor((1 / xscale) * 1000) / 1000}, ${Math.floor((1 / yscale) * 1000) / 1000})` }, class: "settings-icon", innerHTML: SettingsIcon, onClick: (e) => {
|
|
1137
1136
|
e.stopPropagation();
|
|
1138
1137
|
this.showingProperties = !this.showingProperties;
|
|
1139
1138
|
} }), this.showingProperties && (h("verdocs-portal", { anchor: `verdocs-settings-panel-trigger-${fieldname}`, onClickAway: () => (this.showingProperties = false) }, h("verdocs-template-field-properties", { templateId: sourceid, fieldName: fieldname, onClose: () => this.hideSettingsPanel(), onDelete: () => {
|