legalesign-document-viewer 1.0.4 → 1.0.5
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/{editorUtils-CRCLbYrX.js → editorUtils-CskM29uR.js} +3 -3
- package/dist/cjs/{editorUtils-CRCLbYrX.js.map → editorUtils-CskM29uR.js.map} +1 -1
- package/dist/cjs/{history-BBZQuObJ.js → history-C8Dy_82r.js} +16 -2
- package/dist/{esm/history-xqZBqrca.js.map → cjs/history-C8Dy_82r.js.map} +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/ls-add-new-button_20.cjs.entry.js +2 -2
- package/dist/cjs/ls-assignee-select_21.cjs.entry.js +16 -31
- package/dist/cjs/ls-compose-loader_7.cjs.entry.js +14 -12
- package/dist/cjs/ls-document-viewer.cjs.entry.js +55 -9
- package/dist/cjs/ls-document-viewer.cjs.js +1 -1
- package/dist/cjs/ls-field-alignment_3.cjs.entry.js +3 -3
- package/dist/cjs/{mouseHandlers-BvqJ2tsu.js → mouseHandlers-DvI94o4n.js} +4 -4
- package/dist/cjs/{mouseHandlers-BvqJ2tsu.js.map → mouseHandlers-DvI94o4n.js.map} +1 -1
- package/dist/collection/components/ls-document-viewer/history.js +1 -0
- package/dist/collection/components/ls-document-viewer/history.js.map +1 -1
- package/dist/collection/components/ls-document-viewer/keyHandlers.js +2 -3
- package/dist/collection/components/ls-document-viewer/keyHandlers.js.map +1 -1
- package/dist/collection/components/ls-document-viewer/ls-document-viewer.js +53 -4
- package/dist/collection/components/ls-document-viewer/ls-document-viewer.js.map +1 -1
- package/dist/collection/components/ls-editor-field/ls-editor-field.js +9 -18
- package/dist/collection/components/ls-editor-field/ls-editor-field.js.map +1 -1
- package/dist/collection/components/ls-field-content/ls-field-content.js +5 -11
- package/dist/collection/components/ls-field-content/ls-field-content.js.map +1 -1
- package/dist/collection/components/ls-statusbar/ls-statusbar.js +52 -10
- package/dist/collection/components/ls-statusbar/ls-statusbar.js.map +1 -1
- package/dist/components/ls-document-viewer.js +69 -22
- package/dist/components/ls-document-viewer.js.map +1 -1
- package/dist/components/ls-editor-field.js +1 -1
- package/dist/components/ls-field-content.js +1 -1
- package/dist/components/ls-field-distribute.js +1 -1
- package/dist/components/ls-field-properties-checkbox.js +1 -1
- package/dist/components/ls-field-properties-date.js +1 -1
- package/dist/components/ls-field-properties-dropdown.js +2 -2
- package/dist/components/ls-field-properties-email.js +1 -1
- package/dist/components/ls-field-properties-file.js +1 -1
- package/dist/components/ls-field-properties-general.js +1 -1
- package/dist/components/ls-field-properties-multiple.js +1 -1
- package/dist/components/ls-field-properties-number.js +1 -1
- package/dist/components/ls-field-properties-signature.js +1 -1
- package/dist/components/ls-field-properties-text.js +1 -1
- package/dist/components/ls-field-properties.js +1 -1
- package/dist/components/ls-left-bar.js +1 -1
- package/dist/components/ls-statusbar.js +1 -1
- package/dist/components/{p-xSOFT8uc.js → p-7AZBNv_W.js} +4 -4
- package/dist/components/{p-xSOFT8uc.js.map → p-7AZBNv_W.js.map} +1 -1
- package/dist/components/{p-Ce1yNs3F.js → p-B-P0RM5X.js} +14 -14
- package/dist/components/{p-Ce1yNs3F.js.map → p-B-P0RM5X.js.map} +1 -1
- package/dist/components/{p-VFHHgnl2.js → p-BJoHocUQ.js} +8 -14
- package/dist/components/p-BJoHocUQ.js.map +1 -0
- package/dist/components/{p-CU_v-klT.js → p-BLMY8rNM.js} +12 -21
- package/dist/components/p-BLMY8rNM.js.map +1 -0
- package/dist/components/{p-BN_BZ9eU.js → p-BOg59Hui.js} +4 -4
- package/dist/components/{p-BN_BZ9eU.js.map → p-BOg59Hui.js.map} +1 -1
- package/dist/components/{p-Cue0UgwB.js → p-BRbTJsNX.js} +4 -4
- package/dist/components/{p-Cue0UgwB.js.map → p-BRbTJsNX.js.map} +1 -1
- package/dist/components/{p-thlkOeP_.js → p-Bi1odRMK.js} +4 -4
- package/dist/components/{p-thlkOeP_.js.map → p-Bi1odRMK.js.map} +1 -1
- package/dist/components/{p-Dw0UiotU.js → p-BrO24XkQ.js} +18 -14
- package/dist/components/p-BrO24XkQ.js.map +1 -0
- package/dist/components/{p-DP3FTRHD.js → p-CWbixCW0.js} +4 -4
- package/dist/components/{p-DP3FTRHD.js.map → p-CWbixCW0.js.map} +1 -1
- package/dist/components/{p-Cwf28UAj.js → p-CZCkljMh.js} +15 -15
- package/dist/components/{p-Cwf28UAj.js.map → p-CZCkljMh.js.map} +1 -1
- package/dist/components/{p-dLpaJicA.js → p-CvU1rUiv.js} +4 -4
- package/dist/components/{p-dLpaJicA.js.map → p-CvU1rUiv.js.map} +1 -1
- package/dist/components/{p-BzEVOvpL.js → p-CwR2DcQ8.js} +4 -4
- package/dist/components/{p-BzEVOvpL.js.map → p-CwR2DcQ8.js.map} +1 -1
- package/dist/components/{p-D7o_Ls97.js → p-DKz0A1Hf.js} +4 -4
- package/dist/components/{p-D7o_Ls97.js.map → p-DKz0A1Hf.js.map} +1 -1
- package/dist/components/{p-DydgLtEF.js → p-DmQNqtPP.js} +14 -3
- package/dist/components/p-DmQNqtPP.js.map +1 -0
- package/dist/components/{p-BvZKfSxt.js → p-TQAB33L1.js} +4 -4
- package/dist/components/{p-BvZKfSxt.js.map → p-TQAB33L1.js.map} +1 -1
- package/dist/components/{p-DVfpfKI7.js → p-ihnCvIHa.js} +4 -4
- package/dist/components/{p-DVfpfKI7.js.map → p-ihnCvIHa.js.map} +1 -1
- package/dist/esm/{editorUtils-DcBt3fOj.js → editorUtils-DF1r6W-l.js} +3 -3
- package/dist/esm/{editorUtils-DcBt3fOj.js.map → editorUtils-DF1r6W-l.js.map} +1 -1
- package/dist/esm/{history-xqZBqrca.js → history-CmJjDhcp.js} +14 -3
- package/dist/esm/history-CmJjDhcp.js.map +1 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/ls-add-new-button_20.entry.js +2 -2
- package/dist/esm/ls-assignee-select_21.entry.js +16 -31
- package/dist/esm/ls-compose-loader_7.entry.js +14 -12
- package/dist/esm/ls-document-viewer.entry.js +55 -9
- package/dist/esm/ls-document-viewer.entry.js.map +1 -1
- package/dist/esm/ls-document-viewer.js +1 -1
- package/dist/esm/ls-field-alignment_3.entry.js +3 -3
- package/dist/esm/{mouseHandlers-CUHWhJed.js → mouseHandlers-Bwr3Oepx.js} +4 -4
- package/dist/esm/{mouseHandlers-CUHWhJed.js.map → mouseHandlers-Bwr3Oepx.js.map} +1 -1
- package/dist/ls-document-viewer/ls-document-viewer.esm.js +1 -1
- package/dist/ls-document-viewer/{p-3ba7f381.entry.js → p-21289573.entry.js} +2 -2
- package/dist/ls-document-viewer/p-21289573.entry.js.map +1 -0
- package/dist/ls-document-viewer/{p-d5c42d5f.entry.js → p-6f2687fc.entry.js} +2 -2
- package/dist/ls-document-viewer/p-885d302d.entry.js +2 -0
- package/dist/ls-document-viewer/p-885d302d.entry.js.map +1 -0
- package/dist/ls-document-viewer/p-9b6efe5e.entry.js +24 -0
- package/dist/ls-document-viewer/p-9b6efe5e.entry.js.map +1 -0
- package/dist/ls-document-viewer/{p-ChvyHQhX.js → p-BWxpQfiq.js} +2 -2
- package/dist/ls-document-viewer/{p-ChvyHQhX.js.map → p-BWxpQfiq.js.map} +1 -1
- package/dist/ls-document-viewer/p-CmJjDhcp.js +2 -0
- package/dist/ls-document-viewer/p-CmJjDhcp.js.map +1 -0
- package/dist/ls-document-viewer/{p-CEM1EUk-.js → p-SfEjlcdN.js} +2 -2
- package/dist/ls-document-viewer/{p-CEM1EUk-.js.map → p-SfEjlcdN.js.map} +1 -1
- package/dist/ls-document-viewer/{p-e3cf0df0.entry.js → p-a4a0858b.entry.js} +2 -2
- package/dist/types/components/ls-document-viewer/ls-document-viewer.d.ts +4 -0
- package/dist/types/components/ls-statusbar/ls-statusbar.d.ts +2 -0
- package/dist/types/components.d.ts +16 -0
- package/package.json +1 -1
- package/dist/cjs/history-BBZQuObJ.js.map +0 -1
- package/dist/components/p-CU_v-klT.js.map +0 -1
- package/dist/components/p-Dw0UiotU.js.map +0 -1
- package/dist/components/p-DydgLtEF.js.map +0 -1
- package/dist/components/p-VFHHgnl2.js.map +0 -1
- package/dist/ls-document-viewer/p-0340d8ac.entry.js +0 -24
- package/dist/ls-document-viewer/p-0340d8ac.entry.js.map +0 -1
- package/dist/ls-document-viewer/p-3ba7f381.entry.js.map +0 -1
- package/dist/ls-document-viewer/p-ba48b708.entry.js +0 -2
- package/dist/ls-document-viewer/p-ba48b708.entry.js.map +0 -1
- package/dist/ls-document-viewer/p-xqZBqrca.js +0 -2
- package/dist/ls-document-viewer/p-xqZBqrca.js.map +0 -1
- /package/dist/ls-document-viewer/{p-d5c42d5f.entry.js.map → p-6f2687fc.entry.js.map} +0 -0
- /package/dist/ls-document-viewer/{p-e3cf0df0.entry.js.map → p-a4a0858b.entry.js.map} +0 -0
|
@@ -4,11 +4,11 @@ var index = require('./index-DFeU0FNc.js');
|
|
|
4
4
|
var defaultPalette = require('./defaultPalette-Dt4FmPno.js');
|
|
5
5
|
var i18n = require('./i18n-e8JieHV6.js');
|
|
6
6
|
var clsx = require('./clsx-BtxeOLZW.js');
|
|
7
|
-
var editorUtils = require('./editorUtils-
|
|
7
|
+
var editorUtils = require('./editorUtils-CskM29uR.js');
|
|
8
8
|
var index$1 = require('./index-D4CLu1QR.js');
|
|
9
9
|
var defaultFieldLabels = require('./defaultFieldLabels-BUxtUsF1.js');
|
|
10
10
|
var defaultFieldIcons = require('./defaultFieldIcons-CQbunrYl.js');
|
|
11
|
-
require('./history-
|
|
11
|
+
require('./history-C8Dy_82r.js');
|
|
12
12
|
|
|
13
13
|
const lsAssigneeSelectCss = () => `:host{display:block;width:100%}*{margin:0}.ls-dv-assignee-dropdown{position:relative;width:100%}.ls-dv-assignee-header{display:flex;align-items:center;gap:0.5rem;padding:0.25rem;padding-left:0.75rem;border-radius:0.75rem;border:1px solid var(--gray-40, #d8d9dc);background:var(--gray-10, #f7f8fa);box-shadow:0 1px 0.125rem rgba(0, 0, 0, 0.05);position:relative}.ls-dv-assignee-header.ls-dv-disabled{cursor:not-allowed;opacity:0.7}.ls-dv-leading-icon{color:var(--gray-80, #6f7176);flex-shrink:0}.ls-dv-assignee-name{flex:1;font-size:var(--text-sm);font-weight:400;color:var(--gray-100, #45484d);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:var(--font-family)}.ls-dv-reassign-btn{all:unset;display:flex;align-items:center;justify-content:center;width:1.75rem;height:1.75rem;border-radius:0.625rem;border:1px solid var(--gray-40, #d8d9dc);background:var(--white, #ffffff);color:var(--gray-80, #6f7176);cursor:pointer;flex-shrink:0}.ls-dv-reassign-btn:hover{border-color:var(--gray-50, #c8c9cc);background:var(--gray-10, #f7f8fa)}.ls-dv-assignee-list{position:absolute;top:calc(100% + 0.25rem);left:0;right:0;display:flex;flex-direction:column;gap:0.25rem;padding:0.25rem;border-radius:1rem;border:1px solid var(--gray-30, #e0e2e5);background:var(--white, #ffffff);box-shadow:0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);z-index:100;max-height:15rem;overflow-y:auto}.ls-dv-assignee-item{display:flex;padding:0.5rem 0.75rem 0.5rem 0.5rem;align-items:center;gap:0.75rem;border-radius:0.75rem;cursor:pointer}.ls-dv-assignee-item:hover{background:var(--gray-10, #f7f8fa)}.ls-dv-assignee-item.ls-dv-item-disabled{opacity:0.4;cursor:not-allowed}.ls-dv-assignee-item.ls-dv-item-disabled:hover{background:transparent}.ls-dv-assignee-item.ls-dv-selected,.ls-dv-assignee-item.ls-dv-selected:hover{background:var(--background-selected, var(--gray-10, #f7f8fa))}.ls-dv-role-icon{display:flex;padding:0.375rem;border-radius:0.5rem;flex-shrink:0}.ls-dv-role-text{display:flex;flex-direction:column;flex:1;min-width:0}.ls-dv-role-name{color:var(--gray-100, #45484d);font-size:0.75rem;font-weight:500;line-height:1rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ls-dv-role-type{color:var(--gray-70, #939599);font-size:0.75rem;font-weight:400;line-height:1rem}.ls-dv-check-icon{color:var(--gray-40, #d8d9dc);flex-shrink:0}.ls-dv-assignee-item.ls-dv-selected .ls-dv-check-icon{color:var(--check-icon-selected)}.ls-dv-assignee-item.ls-dv-selected .ls-dv-role-name{color:var(--role-name-selected)}.ls-dv-assignee-item.ls-dv-selected .ls-dv-role-type{color:var(--role-type-selected)}`;
|
|
14
14
|
|
|
@@ -234,17 +234,8 @@ const LsEditorField = class {
|
|
|
234
234
|
if (this.labeltimer) {
|
|
235
235
|
clearTimeout(this.labeltimer);
|
|
236
236
|
this.labeltimer = null;
|
|
237
|
-
// Revert to the last committed value by re-reading from the DOM
|
|
238
|
-
// The textarea will update on next render via dataItem binding
|
|
239
|
-
return;
|
|
240
237
|
}
|
|
241
|
-
//
|
|
242
|
-
document.dispatchEvent(new KeyboardEvent('keydown', {
|
|
243
|
-
key: e.key,
|
|
244
|
-
ctrlKey: e.ctrlKey,
|
|
245
|
-
metaKey: e.metaKey,
|
|
246
|
-
shiftKey: e.shiftKey,
|
|
247
|
-
}));
|
|
238
|
+
// Don't stopPropagation — let the event reach the document-level keydown handler
|
|
248
239
|
return;
|
|
249
240
|
}
|
|
250
241
|
// Let Delete/Backspace propagate for date fields (no text to edit)
|
|
@@ -490,17 +481,17 @@ const LsEditorField = class {
|
|
|
490
481
|
const zoomValue = parseFloat(this.zoom) || 1;
|
|
491
482
|
// const topOffset = (this.dataItem.height ?? 1) + 4;
|
|
492
483
|
const topOffset = 24;
|
|
493
|
-
return (index.h(index.Host, { key: '
|
|
484
|
+
return (index.h(index.Host, { key: 'cac174dae3845620103d7a22e737e6acc1043b15', id: this.dataItem ? 'ls-field-' + this.dataItem.id : undefined, style: hostStyle, onMouseEnter: this.handleMouseEnter, onMouseLeave: this.handleMouseLeave }, index.h("div", { key: '4b410d9dea0722699001f51c3eb456983d491cbb', class: {
|
|
494
485
|
'ls-editor-field': true,
|
|
495
486
|
'is-selected': this.selected,
|
|
496
|
-
} }, !this.dataItem?.optional && this.dataItem?.formElementType !== 'checkbox' && (index.h("ls-icon", { key: '
|
|
487
|
+
} }, !this.dataItem?.optional && this.dataItem?.formElementType !== 'checkbox' && (index.h("ls-icon", { key: '999ddf46b79570f7a450eda0ccc726962f6a9277', name: "required-icon", size: Math.round(12 * zoomValue), class: "ls-dv-required-icon", customStyle: {
|
|
497
488
|
position: 'absolute',
|
|
498
489
|
top: '50%',
|
|
499
490
|
right: `${0.25 * zoomValue}rem`,
|
|
500
491
|
transform: 'translateY(-50%)',
|
|
501
492
|
lineHeight: '1',
|
|
502
493
|
fontSize: `${0.75 * zoomValue}rem`,
|
|
503
|
-
} })), !this.dataItem?.optional && this.dataItem?.formElementType === 'checkbox' && (index.h("ls-icon", { key: '
|
|
494
|
+
} })), !this.dataItem?.optional && this.dataItem?.formElementType === 'checkbox' && (index.h("ls-icon", { key: '1cd62d4d80944136a4c71beeb66c2009b73ca92f', name: "required-icon", size: Math.round(8 * zoomValue), class: "ls-dv-required-icon", customStyle: {
|
|
504
495
|
position: 'absolute',
|
|
505
496
|
top: `-${3 * zoomValue}px`,
|
|
506
497
|
right: `-${3 * zoomValue}px`,
|
|
@@ -536,9 +527,9 @@ const LsEditorField = class {
|
|
|
536
527
|
el.style.height = el.scrollHeight + 'px';
|
|
537
528
|
});
|
|
538
529
|
}
|
|
539
|
-
} })), index.h("div", { key: '
|
|
530
|
+
} })), index.h("div", { key: '86a01beedeb9230aa71132890666f64ea0d335cc', id: "field-info", class: this.isEditing ? 'ls-dv-hidden-field' : 'ls-dv-editor-field-draggable', style: { color: `${defaultPalette.defaultRolePalette[this.dataItem?.signer % 100].s100}`, ...(this.dataItem?.formElementType === 'checkbox' ? { width: '100%', overflow: 'visible', justifyContent: 'center', alignItems: 'center' } : {}) } }, index.h("span", { key: 'f2f0c0f899b5ba6fa6d9fa11aae8b22a20dbac10', style: { width: '100%', display: 'block', textAlign: this.dataItem?.formElementType === 'checkbox' ? 'center' : 'inherit' } }, this.dataItem?.formElementType === 'checkbox'
|
|
540
531
|
? this.getCheckboxSymbol()
|
|
541
|
-
: this.dataItem?.value || i18n.dvI18n.t(this.getFieldTypeKey()))), (this.floatingActive || this.selected) && !this.multiSelected && this.dataItem?.label && (index.h("div", { key: '
|
|
532
|
+
: this.dataItem?.value || i18n.dvI18n.t(this.getFieldTypeKey()))), (this.floatingActive || this.selected) && !this.multiSelected && this.dataItem?.label && (index.h("div", { key: '44e1f06dc15f847334f2c8c6ca8b63402eb63eae', style: {
|
|
542
533
|
position: 'absolute',
|
|
543
534
|
background: `${defaultPalette.defaultRolePalette[this.dataItem?.signer % 100].s20}`,
|
|
544
535
|
color: `${defaultPalette.defaultRolePalette[this.dataItem?.signer % 100].s80}`,
|
|
@@ -550,7 +541,7 @@ const LsEditorField = class {
|
|
|
550
541
|
left: `-${2 * zoomValue}px`,
|
|
551
542
|
whiteSpace: 'nowrap',
|
|
552
543
|
width: 'fit-content',
|
|
553
|
-
} }, this.dataItem?.label)), (this.floatingActive || this.selected) && !this.multiSelected && (index.h("p", { key: '
|
|
544
|
+
} }, this.dataItem?.label)), (this.floatingActive || this.selected) && !this.multiSelected && (index.h("p", { key: '1eb6a43f5b613fda172fb57a22e2a484ffc96d96', style: {
|
|
554
545
|
position: 'absolute',
|
|
555
546
|
color: 'var(--gray-80, #3a3a3a)',
|
|
556
547
|
bottom: `-${1.75 * zoomValue}rem`,
|
|
@@ -561,7 +552,7 @@ const LsEditorField = class {
|
|
|
561
552
|
textOverflow: 'ellipsis',
|
|
562
553
|
maxWidth: `${10 * zoomValue}rem`,
|
|
563
554
|
fontFamily: 'sans-serif',
|
|
564
|
-
} }, i18n.dvI18n.t('fieldproperties.assignedto'), " ", this.assignee)), this.selected && !this.multiSelected && (index.h("div", { key: '
|
|
555
|
+
} }, i18n.dvI18n.t('fieldproperties.assignedto'), " ", this.assignee)), this.selected && !this.multiSelected && (index.h("div", { key: '3d33360b58f717443f50c9c609b12ed99b456c10', class: "resize-handles" }, index.h("div", { key: '2feb2a1b13d760e89c9350c86e37fce9e46108d8', class: "resize-handle handle-e" }), index.h("div", { key: '755b440eb2dc580ae6a755870639dc6bee193987', class: "resize-handle handle-s" }), index.h("div", { key: '47d752af9587193ee1660ac1da78a66bb696a781', class: "resize-handle handle-se" }))), this.floatingActive && !this.readonly && (index.h("button", { key: 'c35c8a5e0daae718a799b973c8f923183f618fe7', class: 'ls-dv-x-button', style: {
|
|
565
556
|
display: 'flex',
|
|
566
557
|
justifyContent: 'center',
|
|
567
558
|
alignItems: 'center',
|
|
@@ -570,7 +561,7 @@ const LsEditorField = class {
|
|
|
570
561
|
lineHeight: `${0.75 * zoomValue}rem`,
|
|
571
562
|
fontSize: `${0.75 * zoomValue}rem`,
|
|
572
563
|
...(this.dataItem?.formElementType === 'checkbox' ? { transform: `translate(75%, -75%)` } : {}),
|
|
573
|
-
}, onClick: () => this.deleteField() }, index.h("ls-icon", { key: '
|
|
564
|
+
}, onClick: () => this.deleteField() }, index.h("ls-icon", { key: '62a713c4e4030e83ea521eea67f506c2769dfa65', name: "x-icon", size: Math.round(12 * zoomValue) }))))));
|
|
574
565
|
}
|
|
575
566
|
static get watchers() { return {
|
|
576
567
|
"dataItem": ["dataItemChanged", "watchDataItemHandler"],
|
|
@@ -640,19 +631,13 @@ const LsFieldContent = class {
|
|
|
640
631
|
const isMod = e.ctrlKey || e.metaKey;
|
|
641
632
|
if (isMod && (e.key === 'z' || e.key === 'Z' || e.key === 'y' || e.key === 'Y')) {
|
|
642
633
|
e.preventDefault();
|
|
643
|
-
e.stopPropagation();
|
|
644
634
|
// Cancel any pending debounce (discard uncommitted changes)
|
|
645
635
|
if (this.labeltimer) {
|
|
646
636
|
clearTimeout(this.labeltimer);
|
|
647
637
|
this.labeltimer = null;
|
|
648
638
|
}
|
|
649
|
-
//
|
|
650
|
-
|
|
651
|
-
key: e.key,
|
|
652
|
-
ctrlKey: e.ctrlKey,
|
|
653
|
-
metaKey: e.metaKey,
|
|
654
|
-
shiftKey: e.shiftKey,
|
|
655
|
-
}));
|
|
639
|
+
// Don't stopPropagation — let the event reach the document-level keydown handler
|
|
640
|
+
return;
|
|
656
641
|
}
|
|
657
642
|
}
|
|
658
643
|
handleValueChange(value) {
|
|
@@ -870,7 +855,7 @@ const LsFieldContent = class {
|
|
|
870
855
|
this.alterImmediate({ validation: newValidation, value: newValue });
|
|
871
856
|
}
|
|
872
857
|
render() {
|
|
873
|
-
return (index.h(index.Host, { key: '
|
|
858
|
+
return (index.h(index.Host, { key: 'f2695d6b0be7a1f227e4ec0a402c8d30b230957f' }, this.roles?.length > 0 && (index.h("ls-props-section", { key: '90aa78e28c9248ab72427067edde3c4dced1d4d1', sectionTitle: i18n.dvI18n.t('fieldproperties.assignee'), sectionDescription: i18n.dvI18n.t('fieldproperties.assigneedescription') }, index.h("ls-assignee-select", { key: '3eae837f63bca4fa50f087920e81fdd274f0ac50', signer: this.dataItem?.signer, roles: this.roles, disabled: this.readonly, disabledSenderReason: this.getSenderDisabledReason(), disabledApproverReason: this.isSignatureType() ? i18n.dvI18n.t('fieldproperties.signaturecannotapproversingle') : '', onAssigneeChange: ev => this.handleReassign(ev.detail) }))), index.h("ls-props-section", { key: 'dd02103fdeb7aa059a70285f17606e9bc2475038', sectionTitle: i18n.dvI18n.t('fieldproperties.fieldtype'), sectionDescription: i18n.dvI18n.t('fieldproperties.fieldtypedescription') }, index.h("ls-field-type-select", { key: '1315446ded6cb4f6eeebde98138259c0fc49ac87', fieldType: this.dataItem?.formElementType, assignee: this.dataItem?.signer, roles: this.roles, roleTypes: [this.getRoleType()], disabled: this.readonly, filtertoolbox: this.filtertoolbox, onFieldTypeChange: ev => this.handleFieldTypeChange(ev.detail) })), this.dataItem?.formElementType !== 'signature' && (index.h("ls-props-section", { key: 'a9335a5e678251b47a561660c57ac90dc1db4a78', sectionTitle: i18n.dvI18n.t('fieldproperties.requiredfield'), row: true, sectionDescription: i18n.dvI18n.t('fieldproperties.requiredfielddescription') }, index.h("ls-toggle", { key: '2d6ad9045ed62d17dfc38b8d2998cd1ff90d8187', id: "toggle-required", checked: !this.dataItem?.optional, onValueChange: ev => !this.readonly && this.alterImmediate({ optional: !ev.detail }) }))), index.h("ls-props-section", { key: '6f4b480cea21715d2cf72583541296284406573a', sectionTitle: i18n.dvI18n.t('fieldproperties.fieldlabel'), sectionDescription: i18n.dvI18n.t('fieldproperties.fieldlabeldescription') }, index.h("ls-formfield", { key: '66a33605ec7344089b17a3ec6117d654496e8ad3', as: "text", name: "field-label", value: this.dataItem?.label, placeholder: defaultFieldLabels.getFieldTitleSuggestion(this.dataItem?.formElementType), disabled: this.readonly, onTextChange: e => this.alter({ label: e.detail.value }) })), this.supportsValue() && (index.h("ls-props-section", { key: '3e6af27f381635c6bc2235ee9e33b18c79f0e42e', sectionTitle: i18n.dvI18n.t('fieldproperties.value'), sectionDescription: i18n.dvI18n.t('fieldproperties.valuedescription') }, this.isDateField() ? (index.h("div", { class: "ls-dv-date-input-wrapper" }, index.h("input", { class: "ls-dv-date-display", type: "text", value: this.dataItem?.value, placeholder: this.getDateFormat(), readOnly: true, onClick: () => {
|
|
874
859
|
if (this.readonly)
|
|
875
860
|
return;
|
|
876
861
|
const picker = this.component.shadowRoot.getElementById('ls-date-picker');
|
|
@@ -880,9 +865,9 @@ const LsFieldContent = class {
|
|
|
880
865
|
const input = e.target;
|
|
881
866
|
this.alter({ value: this.formatDateFromISO(input.value) });
|
|
882
867
|
index$1.forceCloseDatePicker(input);
|
|
883
|
-
}, disabled: this.readonly }))) : (index.h("ls-formfield", { as: "text", name: "field-value", value: this.dataItem?.value, placeholder: defaultFieldLabels.getFieldPlaceholder(this.dataItem?.formElementType), valid: !this.valueError, dirty: this.isDirty, errorText: this.valueError, disabled: this.readonly, onTextChange: e => this.handleValueChange(e.detail.value) })))), this.dataItem.validation === 20 && (index.h("ls-props-section", { key: '
|
|
868
|
+
}, disabled: this.readonly }))) : (index.h("ls-formfield", { as: "text", name: "field-value", value: this.dataItem?.value, placeholder: defaultFieldLabels.getFieldPlaceholder(this.dataItem?.formElementType), valid: !this.valueError, dirty: this.isDirty, errorText: this.valueError, disabled: this.readonly, onTextChange: e => this.handleValueChange(e.detail.value) })))), this.dataItem.validation === 20 && (index.h("ls-props-section", { key: '163081bd7416239c1b85971f1c4178724fcc7ca5', sectionTitle: i18n.dvI18n.t('fieldproperties.options'), sectionDescription: i18n.dvI18n.t('fieldproperties.optionsdescription') }, index.h("textarea", { key: '8c07efb5fa1153628ada1d28ee63142f8690a67d', value: this.dataItem?.options, placeholder: "Option 1\nOption 2\nOption 3", onInput: e => this.alter({ options: e.target.value }), disabled: this.readonly }))), this.showValidationTypes && this.dataItem?.formElementType !== 'drawn field' && this.dataItem?.formElementType !== 'regular expression' && this.dataItem?.formElementType !== 'initials' && (index.h("ls-props-section", { key: '776f6727b350957116a0f1bb7c3c80db0fc9c0b7', sectionTitle: i18n.dvI18n.t('fieldproperties.contentformat'), sectionDescription: i18n.dvI18n.t('fieldproperties.contentformatdescription') }, index.h("ls-input-wrapper", { key: '25a49f7b0f46803e322c7e4c0e76130882611e91', select: true }, index.h("select", { key: 'dcd4417138a42d0c008e85577c5734d7e46738eb', onChange: ev => !this.readonly && this.handleFormatChange(parseInt(ev.target.value)) }, editorUtils.validationTypes
|
|
884
869
|
.filter(type => type.formType === this.dataItem?.formElementType)
|
|
885
|
-
.map(type => (index.h("option", { selected: this.dataItem?.validation === type.id, value: type.id }, type.description))))))), this.dataItem?.formElementType === 'checkbox' && this.getCheckboxStates().length === 2 && (index.h("ls-props-section", { key: '
|
|
870
|
+
.map(type => (index.h("option", { selected: this.dataItem?.validation === type.id, value: type.id }, type.description))))))), this.dataItem?.formElementType === 'checkbox' && this.getCheckboxStates().length === 2 && (index.h("ls-props-section", { key: '340af765731696c7a8f13392f28e696a83f7bf7d', sectionTitle: i18n.dvI18n.t('fieldproperties.displaystate'), sectionDescription: i18n.dvI18n.t('fieldproperties.displaystatedescription') }, index.h("div", { key: 'edcefae0f0e8e0eaaa63943ea2bb78fa52ef7253', class: "ls-dv-checkbox-toggle" }, this.getCheckboxStates().map((state, idx) => (index.h("button", { key: idx, class: { 'ls-dv-checkbox-toggle-btn': true, 'ls-dv-active': idx === 0 ? this.dataItem?.value?.toString() !== 'true' : this.dataItem?.value?.toString() === 'true' }, onClick: () => !this.readonly && this.alterImmediate({ value: idx === 0 ? 'false' : 'true' }), disabled: this.readonly }, state)))))), index.h("slot", { key: 'df7013168408522a2bd12a7b52b68d1927287b41' })));
|
|
886
871
|
}
|
|
887
872
|
static get watchers() { return {
|
|
888
873
|
"dataItem": ["watchDataItemHandler"]
|
|
@@ -4,7 +4,7 @@ var index = require('./index-DFeU0FNc.js');
|
|
|
4
4
|
var i18n = require('./i18n-e8JieHV6.js');
|
|
5
5
|
var fieldDefaults = require('./fieldDefaults-BZtB5J2S.js');
|
|
6
6
|
var defaultPalette = require('./defaultPalette-Dt4FmPno.js');
|
|
7
|
-
var history = require('./history-
|
|
7
|
+
var history = require('./history-C8Dy_82r.js');
|
|
8
8
|
|
|
9
9
|
const lsComposeLoaderCss = () => `:host{position:absolute;display:flex;top:0;left:0;height:100%;width:100%;z-index:3000}:host>*{box-sizing:border-box;margin:0;padding:0}.ls-dv-compose-loader{display:flex;flex-direction:column;background:var(--gray-10, #f7f8fa);width:100%;height:100%}.ls-dv-compose-loader__header{border-bottom:1px solid var(--gray-20, #edeff2);pointer-events:none;height:2rem;background:white;display:flex;align-items:center;justify-content:center}.ls-dv-compose-loader__header-skeleton{width:10rem;height:0.75rem;background:linear-gradient(90deg, var(--gray-30, #e0e2e5) 25%, transparent 100%);border-radius:0.625rem;animation:pulse 1.5s infinite}.ls-dv-compose-loader__header-bar{padding:1rem;display:flex;align-items:center}.ls-dv-compose-loader__header-title{font-weight:bold;font-size:1.1rem}.ls-dv-compose-loader__header-docname{margin-left:1rem;color:var(--gray-100, #45484d)}.ls-dv-compose-loader__main{display:flex;padding:1rem;gap:1.5rem;height:calc(100% - 2.375rem);position:relative}.ls-dv-compose-loader__sidebar{position:absolute;height:100%;width:19rem}.ls-dv-compose-loader__card{display:flex;flex-direction:column;gap:0.75rem;padding:1rem;background:var(--white, #ffffff);border-radius:1.5rem;border:1px solid var(--gray-30, #e0e2e5);width:100%;height:100%;max-height:calc(100% - 2rem);overflow:hidden}.ls-dv-compose-loader__skeleton,.ls-dv-compose-loader__icon-skeleton{background:linear-gradient(90deg, var(--gray-30, #e0e2e5) 25%, transparent 100%);border-radius:0.625rem;animation:pulse 1.5s infinite}.ls-dv-skeleton-title{width:12.5rem;min-height:1.25rem}.ls-dv-skeleton-line--blue,.ls-dv-skeleton-line--green,.ls-dv-skeleton-line--gray,.ls-dv-skeleton-line{width:12.5rem;height:0.75rem}.ls-dv-skeleton-short--blue,.ls-dv-skeleton-short--green,.ls-dv-skeleton-short--gray,.ls-dv-skeleton-short{width:5rem;height:0.75rem}.ls-dv-skeleton-medium{width:4rem;height:0.75rem}.ls-dv-skeleton-icon{width:1rem;height:1rem}.ls-dv-skeleton-btn{width:7rem;height:0.75rem;background:linear-gradient(90deg, var(white) 25%, transparent 100%)}.ls-dv-skeleton-btn-icon{width:1rem;height:1rem;background:linear-gradient(90deg, var(white) 25%, transparent 100%)}.ls-dv-skeleton-line--blue,.ls-dv-skeleton-short--blue{background:linear-gradient(90deg, var(--blue-50, #78a3fa) 25%, transparent 100%)}.ls-dv-compose-loader__skeleton-box--blue{background:linear-gradient(90deg, var(--blue-30, #bed4fa) 25%, transparent 100%)}.ls-dv-skeleton-line--green,.ls-dv-skeleton-short--green{background:linear-gradient(90deg, var(--green-50, #57e5b1) 25%, transparent 100%)}.ls-dv-compose-loader__skeleton-box--green{background:linear-gradient(90deg, var(--green-30, #9df5d4) 25%, transparent 100%)}.ls-dv-skeleton-line--gray,.ls-dv-skeleton-short--gray{background:linear-gradient(90deg, var(--gray-50, #c8c9cc) 25%, transparent 100%)}.ls-dv-compose-loader__skeleton-box--gray{background:linear-gradient(90deg, var(--gray-30, #e0e2e5) 25%, transparent 100%)}.ls-dv-compose-loader__skeleton-group{display:flex;flex-direction:column;gap:0.5rem}.ls-dv-compose-loader__section{display:flex;flex-direction:column;gap:0.75rem;border:1px solid var(--gray-30, #e0e2e5);padding:0.75rem;border-radius:1.5rem;background:var(--gray-10, #f7f8fa);margin-top:0.25rem;box-shadow:0 1px 2px rgba(0, 0, 0, 0.03)}.ls-dv-compose-loader__section--blue{border-color:var(--blue-30, #bed4fa);background:var(--blue-10, #f0f6ff)}.ls-dv-compose-loader__section--green{border-color:var(--green-30, #9df5d4);background:var(--green-10, #effff9)}.ls-dv-compose-loader__skeleton-box--green,.ls-dv-compose-loader__skeleton-box--blue,.ls-dv-compose-loader__skeleton-box--gray{display:flex;align-items:center;width:5rem;height:1.15rem;border-radius:0.375rem}.ls-dv-compose-loader__row{display:flex;gap:0.75rem;background:var(--white, #ffffff);border:1px solid var(--gray-20, #edeff2);padding:0.5rem 1rem 0.5rem 0.5rem;border-radius:0.625rem;align-items:center}.ls-dv-compose-loader__icon-skeleton--blue{display:flex;align-items:center;justify-content:center;min-width:2.375rem;min-height:2.375rem;background:var(--blue-10, #f0f6ff);border:1px solid var(--blue-30, #bed4fa);border-radius:0.625rem}.ls-dv-compose-loader__icon--blue{width:1.25rem;height:1.25rem;background:linear-gradient(90deg, var(--blue-30, #bed4fa) 25%, transparent 100%);border-radius:0.625rem}.ls-dv-compose-loader__icon-skeleton--green{display:flex;align-items:center;justify-content:center;min-width:2.375rem;min-height:2.375rem;background:var(--green-10, #effff9);border:1px solid var(--green-30, #9df5d4);border-radius:0.625rem}.ls-dv-compose-loader__icon--green{width:1.25rem;height:1.25rem;background:linear-gradient(90deg, var(--green-30, #9df5d4) 25%, transparent 100%);border-radius:0.625rem}.ls-dv-compose-loader__row-content{display:flex;width:100%;align-items:center;justify-content:space-between}.ls-dv-compose-loader__preview{display:flex;justify-content:center;align-items:center;width:100%;height:100%}.ls-dv-compose-loader__preview-box{background:var(--white, #ffffff);border:1px solid var(--gray-30, #e0e2e5);aspect-ratio:1/1.414;height:100%;margin-top:7rem;min-width:40vw;box-shadow:0 4px 24px rgba(0, 0, 0, 0.12)}.ls-dv-compose-loader__button{position:absolute;top:1rem;right:1rem;border-radius:1rem;padding:0.25rem;background:var(--white, #ffffff)}.ls-dv-compose-loader__action-btn{border-radius:1rem;padding:1rem;display:flex;align-items:center;gap:0.75rem;border:none;background:var(--primary-60, #4456f6);cursor:not-allowed}@keyframes pulse{0%{opacity:1}50%{opacity:0.4}100%{opacity:1}}`;
|
|
10
10
|
|
|
@@ -366,7 +366,7 @@ const LsSelectMenu = class {
|
|
|
366
366
|
};
|
|
367
367
|
LsSelectMenu.style = lsSelectMenuCss();
|
|
368
368
|
|
|
369
|
-
const version = "1.0.
|
|
369
|
+
const version = "1.0.5";
|
|
370
370
|
|
|
371
371
|
const lsStatusbarCss = () => `:host{position:absolute;z-index:1000;left:23.625rem;right:0.5rem;bottom:1rem;display:flex;flex-direction:row;gap:0.5rem;align-items:end;justify-content:space-between;height:2.25rem;overflow:visible}:host(.ls-dv-statusbar-preview){left:0;right:0;justify-content:center}.ls-dv-status-bar-group{display:flex;flex-direction:row;gap:0.5rem;align-items:end}.ls-dv-controls-bar{display:flex;flex-direction:row;background-color:white;border:1px solid var(--gray-30, #e0e2e5);box-shadow:0px 4px 16px rgba(0, 0, 0, 0.1);border-radius:1.125rem;height:fit-content}.ls-dv-page-nav{margin-left:-6rem;position:relative}:host(.ls-dv-statusbar-preview) .ls-dv-page-nav{margin-left:0}*{margin:0;padding:0;box-sizing:border-box}.ls-dv-status-bar-section{display:flex;flex-direction:row;align-items:center;gap:0.625rem;padding:0 0.625rem;height:2.25rem}.ls-dv-controls-bar>:not(:nth-child(1)){border-left:1px solid var(--gray-30, #e0e2e5)}button{border:0}button:hover{color:var(--gray-100, #45484d);border-radius:0.625rem}button:disabled{color:var(--gray-40, #d8d9dc);cursor:not-allowed}input[type=range]{-webkit-appearance:none;width:100%;height:0.5rem;background:var(--gray-20, #edeff2);border-radius:0.25rem;outline:none}input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:0.5rem;height:0.5rem;background:var(--gray-70, #939599);border-radius:50%;cursor:pointer}input[type=range]::-moz-range-thumb{width:0.5rem;height:0.5rem;background:var(--gray-70, #939599);border:none;border-radius:50%;cursor:pointer}input[type=range]::-moz-range-track{background:var(--gray-20, #edeff2);height:0.5rem;border-radius:0.25rem}input[type=range]::-webkit-slider-runnable-track{background:var(--gray-20, #edeff2);height:0.5rem;border-radius:0.25rem}p{color:var(--gray-80, #6f7176);font-family:var(--font-family);font-size:var(--text-sm);font-style:normal;font-weight:400;line-height:var(--text-sm-line-height)}span{color:var(--gray-80, #6f7176);font-family:var(--font-family);font-size:var(--text-sm);font-style:normal;font-weight:400;line-height:var(--text-sm-line-height)}a{color:var(--primary-60, #4456f6);font-size:var(--text-sm);font-style:normal;font-weight:400;line-height:var(--text-sm-line-height);cursor:pointer}a:hover{text-decoration:underline;color:var(--primary-70, #2134dc)}.ls-dv-button-link,.ls-dv-button-link:hover{all:unset}select{appearance:none;height:2.25rem}.ls-dv-input-wrapper{position:relative;width:fit-content}#selectorIcon{position:absolute;top:50%;right:0.675rem;transform:translateY(-50%);pointer-events:none;color:var(--gray-80, #6f7176)}#selectLeadingIcon{position:absolute;top:50%;left:0.675rem;transform:translateY(-50%);pointer-events:none;color:var(--gray-80, #6f7176)}.ls-dv-has-leading-icon{padding-left:2.5rem}button{all:unset;border:0;appearance:button;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;color:var(--gray-80, #6f7176);text-transform:capitalize}button.ls-dv-tertiary-grey:hover{background:var(--gray-10, #f7f8fa)}.ls-dv-button-group{display:flex;border-radius:0.625rem;border:1px solid var(--gray-30, #e0e2e5);background:var(--white, #ffffff);overflow:clip}.ls-dv-button-group button{display:flex;background:transparent;border-radius:unset;padding:0.25rem 0.75rem;min-width:2.156rem;min-height:unset;color:var(--gray-80, #6f7176)}.ls-dv-button-group button:hover{background:var(--gray-10, #f7f8fa)}.ls-dv-button-group>:first-child{border-radius:0.625rem 0 0 0.625rem}.ls-dv-button-group>:last-child{border-radius:0 0.5rem 0.5rem 0}.ls-dv-button-group>:not(:first-child){border-left:1px solid var(--gray-30, #e0e2e5)}.ls-dv-zoom-level-btn{font-family:var(--font-family);font-size:var(--text-sm);font-weight:400;color:var(--gray-80, #6f7176);padding:0.25rem 0.375rem;border-radius:0.25rem;margin:0 -0.25rem}.ls-dv-zoom-level-btn:hover{background:var(--gray-10, #f7f8fa)}.ls-dv-zoom-menu{position:absolute;width:6rem;bottom:3rem;left:1rem;background:white;border:1px solid var(--gray-30, #e0e2e5);border-radius:1rem;box-shadow:0px 4px 24px rgba(0, 0, 0, 0.12);padding:0.25rem;z-index:1001;display:flex;flex-direction:column;gap:0.25rem}.ls-dv-page-menu{left:auto;max-height:60cqh;overflow-y:auto}.ls-dv-zoom-menu-item{position:relative;font-family:var(--font-family);font-size:var(--text-sm);font-weight:400;color:var(--gray-80, #6f7176);padding:0.375rem 0.625rem;border-radius:0.825rem;display:flex;align-items:center;justify-content:space-between}.ls-dv-zoom-menu-item:hover{background:var(--gray-10, #f7f8fa)}.ls-dv-zoom-menu-item.active{font-weight:500;color:var(--primary-70, #2134dc);background:var(--primary-10, #eff4ff)}.ls-dv-thumbnail-popover{position:absolute;bottom:3rem;right:-3rem;background:white;border:1px solid var(--gray-30, #e0e2e5);border-radius:1.75rem;box-shadow:0px 8px 24px rgba(0, 0, 0, 0.15);padding:0.75rem;z-index:1001;max-height:80cqh;overflow:hidden;display:flex;flex-direction:column}.ls-dv-thumbnail-grid{background:var(--gray-10, #f7f8fa);padding:0.75rem;border-radius:1rem;border:1px solid var(--gray-30, #e0e2e5);display:grid;grid-template-columns:repeat(auto-fill, minmax(100px, 1fr));gap:1rem;overflow-y:auto;max-height:100%}.ls-dv-thumbnail-wrapper{display:flex;flex-direction:column;align-items:center;gap:0.25rem;cursor:pointer}.ls-dv-thumbnail-wrapper>span:last-child{font-size:var(--text-xs, 0.75rem);color:var(--gray-80, #6f7176);font-weight:500}.ls-dv-thumbnail{border:1px solid var(--gray-30, #e0e2e5);border-radius:0.5rem;cursor:pointer;transition:border-color 0.15s}.ls-dv-thumbnail:hover{border-color:var(--primary-40, #79adfc);box-shadow:0 0 0 2px rgba(163, 180, 249, 0.3)}.ls-dv-thumbnail.active{border-color:var(--primary-60, #4456f6);outline:0.25rem solid var(--primary-30, #9dc3fc);box-shadow:var(--shadow-md)}.ls-dv-thumbnail-dots{display:flex;gap:3px;justify-content:center;flex-wrap:wrap;margin-top:0.25rem}.ls-dv-thumbnail-dot{width:0.5rem;height:0.5rem;border-radius:50%;display:inline-block;border:2px solid var(--dot-color-60);background-color:var(--dot-color-40);cursor:pointer;transition:background-color 0.15s, border-color 0.15s}.ls-dv-thumbnail-dot:hover{background-color:var(--dot-color-60);border-color:var(--dot-color-70)}.ls-dv-version{position:absolute;bottom:100%;right:0;color:var(--gray-50, #afb0b2);font-size:0.625rem;padding-bottom:0.25rem;display:block}:host(.ls-dv-statusbar-preview) .ls-dv-version{bottom:-1.25rem;margin-right:0.5rem}`;
|
|
372
372
|
|
|
@@ -390,6 +390,8 @@ const LsStatusbar = class {
|
|
|
390
390
|
* {LsDocumentViewer}
|
|
391
391
|
*/
|
|
392
392
|
editor;
|
|
393
|
+
canUndo = false;
|
|
394
|
+
canRedo = false;
|
|
393
395
|
/**
|
|
394
396
|
* The viewer mode.
|
|
395
397
|
* {'preview' | 'editor' | 'compose'}
|
|
@@ -563,14 +565,14 @@ const LsStatusbar = class {
|
|
|
563
565
|
if (!mutations)
|
|
564
566
|
return;
|
|
565
567
|
this.editor._skipHistory = true;
|
|
566
|
-
this.editor.mutate
|
|
568
|
+
this.editor.mutateHandler(new CustomEvent('mutate', { detail: mutations }));
|
|
567
569
|
}
|
|
568
570
|
applyRedo() {
|
|
569
571
|
const mutations = history.redo();
|
|
570
572
|
if (!mutations)
|
|
571
573
|
return;
|
|
572
574
|
this.editor._skipHistory = true;
|
|
573
|
-
this.editor.mutate
|
|
575
|
+
this.editor.mutateHandler(new CustomEvent('mutate', { detail: mutations }));
|
|
574
576
|
}
|
|
575
577
|
componentWillLoad() {
|
|
576
578
|
this.zoom = this.editor.zoom;
|
|
@@ -599,9 +601,9 @@ const LsStatusbar = class {
|
|
|
599
601
|
}
|
|
600
602
|
render() {
|
|
601
603
|
const isPreview = this.mode === 'preview';
|
|
602
|
-
return (index.h(index.Host, { key: '
|
|
604
|
+
return (index.h(index.Host, { key: '18ccc02a34ad30d1ecec33c3ad967b8224ba4994', class: { 'ls-dv-statusbar-preview': isPreview } }, !isPreview && (index.h("div", { key: 'b9d5bb97994a209e65a81576a67a50d8e5ef3524', class: 'ls-dv-controls-bar' }, index.h("div", { key: '8e058a4ea295561d1f4becf989af38e18376f09a', class: 'ls-dv-status-bar-section' }, index.h("button", { key: 'bbbc73f66594d7c868f947f8aab7ac3f02f3d2f6', onClick: () => this.applyUndo(), disabled: !this.canUndo, id: "undo-btn", "data-tooltip-id": "ls-dv-tooltip", "data-tooltip-content": i18n.dvI18n.t('statusbar.undo') }, index.h("ls-icon", { key: 'ecf1675a45114131a79d834ae9aa3c5e179edc48', name: "undo-icon", size: 18 })), index.h("button", { key: 'f3bb9d84e8591988c067008cb81b5630f105e792', onClick: () => this.applyRedo(), disabled: !this.canRedo, id: "redo-btn", "data-tooltip-id": "ls-dv-tooltip", "data-tooltip-content": i18n.dvI18n.t('statusbar.redo') }, index.h("ls-icon", { key: '96845aaf86d0ee3234a5806ec40964f35b67ab1a', name: "redo-icon", style: { transform: "scale(-1, 1)", marginLeft: '0.25rem' }, size: 18 }))))), index.h("div", { key: '503c0ea4eda6202f87c929def2e496a159a37aa1', class: { 'ls-dv-controls-bar': true, 'ls-dv-page-nav': true } }, index.h("div", { key: '8ac7bc2c067ae5c2074c0e9e882da6dff125c6e5', class: 'ls-dv-status-bar-section', style: this.pageCount === 1 && { display: 'none' } }, index.h("button", { key: '485a17228d9332c22138f561a7a7dcc43cb7cef7', onClick: () => {
|
|
603
605
|
this.editor.pagePrev();
|
|
604
|
-
}, disabled: this.page === 1, id: "prev-page-btn", "data-tooltip-id": "ls-dv-tooltip", "data-tooltip-content": this.page === 1 ? i18n.dvI18n.t('statusbar.nopreviouspage') : i18n.dvI18n.t('statusbar.previouspage') }, index.h("ls-icon", { key: '
|
|
606
|
+
}, disabled: this.page === 1, id: "prev-page-btn", "data-tooltip-id": "ls-dv-tooltip", "data-tooltip-content": this.page === 1 ? i18n.dvI18n.t('statusbar.nopreviouspage') : i18n.dvI18n.t('statusbar.previouspage') }, index.h("ls-icon", { key: 'df602dae238984d08801f4365b866002dca86969', name: "chevron-left-icon" })), index.h("button", { key: '32eef5c295eb562f5780c03756bba3690d4ae9e5', id: "page-level-btn", class: "ls-dv-zoom-level-btn", onClick: () => {
|
|
605
607
|
this.showPageMenu = !this.showPageMenu;
|
|
606
608
|
if (this.showPageMenu) {
|
|
607
609
|
requestAnimationFrame(() => document.addEventListener('click', this.pageMenuClickHandler, true));
|
|
@@ -609,13 +611,13 @@ const LsStatusbar = class {
|
|
|
609
611
|
else {
|
|
610
612
|
document.removeEventListener('click', this.pageMenuClickHandler, true);
|
|
611
613
|
}
|
|
612
|
-
} }, this.page, " / ", this.pageCount), this.showPageMenu && (index.h("div", { key: '
|
|
614
|
+
} }, this.page, " / ", this.pageCount), this.showPageMenu && (index.h("div", { key: 'f8fe0d9e3d67b364092b9f12300f9e03ec7c6aad', id: "ls-page-menu", class: "ls-dv-zoom-menu ls-dv-page-menu" }, Array.from({ length: this.pageCount }, (_, i) => i + 1).map(p => (index.h("button", { class: { 'ls-dv-zoom-menu-item': true, 'active': this.page === p }, onClick: () => {
|
|
613
615
|
this.goToPage(p);
|
|
614
616
|
this.showPageMenu = false;
|
|
615
617
|
document.removeEventListener('click', this.pageMenuClickHandler, true);
|
|
616
|
-
} }, p, this.page === p && index.h("ls-icon", { name: "check-icon", size: 14 })))))), index.h("button", { key: '
|
|
618
|
+
} }, p, this.page === p && index.h("ls-icon", { name: "check-icon", size: 14 })))))), index.h("button", { key: '6093169c96a12306aba655b311696e99065d2697', onClick: () => {
|
|
617
619
|
this.editor.pageNext();
|
|
618
|
-
}, disabled: this.page === this.pageCount, id: "next-page-btn", "data-tooltip-id": "ls-dv-tooltip", "data-tooltip-content": this.page === this.pageCount ? i18n.dvI18n.t('statusbar.nonextpage') : i18n.dvI18n.t('statusbar.nextpage') }, index.h("ls-icon", { key: '
|
|
620
|
+
}, disabled: this.page === this.pageCount, id: "next-page-btn", "data-tooltip-id": "ls-dv-tooltip", "data-tooltip-content": this.page === this.pageCount ? i18n.dvI18n.t('statusbar.nonextpage') : i18n.dvI18n.t('statusbar.nextpage') }, index.h("ls-icon", { key: '08f8e556677ef1efebd0b7b6e72983ae6cedecf4', name: "chevron-right-icon" })))), index.h("div", { key: '54214796ad12fdcd1e3361f84ed8d39ab05c56fc', class: 'ls-dv-status-bar-group' }, index.h("div", { key: 'f271c0049806dbe810afd00c928b5d7377376955', class: 'ls-dv-controls-bar', style: { position: 'relative' } }, index.h("div", { key: 'f2afc562cea8029131cd63522eb6a353b23d09b5', class: 'ls-dv-status-bar-section' }, index.h("button", { key: '549f1c0d525684dc93f21531e5a4988e138c2206', onClick: () => this.setZoom(this.editor.zoom * 0.8), id: "zoom-out-btn", "data-tooltip-id": "ls-dv-tooltip", "data-tooltip-content": i18n.dvI18n.t('statusbar.zoomout') }, index.h("ls-icon", { key: '5a206f88c6418038493eb6e6eef27f627f55e061', name: "zoom-out-icon" })), index.h("button", { key: '19e4203f02d5a0b9bbbd107bcd32ed40d7a5fb19', id: "zoom-level-btn", class: "ls-dv-zoom-level-btn", onClick: () => {
|
|
619
621
|
this.showZoomMenu = !this.showZoomMenu;
|
|
620
622
|
if (this.showZoomMenu) {
|
|
621
623
|
requestAnimationFrame(() => document.addEventListener('click', this.zoomMenuClickHandler, true));
|
|
@@ -623,11 +625,11 @@ const LsStatusbar = class {
|
|
|
623
625
|
else {
|
|
624
626
|
document.removeEventListener('click', this.zoomMenuClickHandler, true);
|
|
625
627
|
}
|
|
626
|
-
} }, Math.round(this.zoom * 100), "%"), this.showZoomMenu && (index.h("div", { key: '
|
|
628
|
+
} }, Math.round(this.zoom * 100), "%"), this.showZoomMenu && (index.h("div", { key: 'be8a4d0e048d49eaf8e65edd886d96f7e7f17aff', id: "ls-zoom-menu", class: "ls-dv-zoom-menu" }, [2, 1.75, 1.5, 1.25, 1, 0.75, 0.5, 0.25].map(level => (index.h("button", { class: { 'ls-dv-zoom-menu-item': true, 'active': Math.round(this.zoom * 100) === Math.round(level * 100) }, onClick: () => {
|
|
627
629
|
this.setZoom(level);
|
|
628
630
|
this.showZoomMenu = false;
|
|
629
631
|
document.removeEventListener('click', this.zoomMenuClickHandler, true);
|
|
630
|
-
} }, Math.round(level * 100), "%", Math.round(this.zoom * 100) === Math.round(level * 100) && index.h("ls-icon", { name: "check-icon", size: 14 })))))), index.h("button", { key: '
|
|
632
|
+
} }, Math.round(level * 100), "%", Math.round(this.zoom * 100) === Math.round(level * 100) && index.h("ls-icon", { name: "check-icon", size: 14 })))))), index.h("button", { key: '28384af43c2b6ed5db0f893cf4fa5f88c36332a4', onClick: () => this.setZoom(this.editor.zoom / 0.8), id: "zoom-in-btn", "data-tooltip-id": "ls-dv-tooltip", "data-tooltip-content": i18n.dvI18n.t('statusbar.zoomin') }, index.h("ls-icon", { key: '97540f2c59fd5e3228ced46b895837f05c95fbcb', name: "zoom-in-icon" }))), !isPreview && (index.h("div", { key: '30f5236f017a1ff8b61d33f91ea9031eebde36a6', class: 'ls-dv-status-bar-section' }, index.h("button", { key: '4b7c04149439b2cddcd0cf474e2d9b57efa9bc76', onClick: () => this.fitWidth(), id: "fit-width-btn", "data-tooltip-id": "ls-dv-tooltip", "data-tooltip-content": i18n.dvI18n.t('statusbar.fitwidth') }, index.h("ls-icon", { key: 'dd765543163aaad0deb4300066333dac43a85206', name: "fit-width-icon" })), index.h("button", { key: '571cb22457f5848917e97226f74e120395a40ccd', onClick: () => this.fitHeight(), id: "fit-height-btn", "data-tooltip-id": "ls-dv-tooltip", "data-tooltip-content": i18n.dvI18n.t('statusbar.fitheight') }, index.h("ls-icon", { key: 'ef4cdbf95a3110b0e20d438c5870f32cf786e535', name: "fit-height-icon" })))), index.h("div", { key: '8f27158a751d07a53ae0f8afe6ad51344a497a03', class: 'ls-dv-status-bar-section', style: this.pageCount === 1 ? { display: 'none' } : {} }, index.h("button", { key: 'f09978de659a2defbd0be5c4de99337d7fc59c0a', onClick: () => {
|
|
631
633
|
this.showThumbnails = !this.showThumbnails;
|
|
632
634
|
if (this.showThumbnails) {
|
|
633
635
|
requestAnimationFrame(() => {
|
|
@@ -640,7 +642,7 @@ const LsStatusbar = class {
|
|
|
640
642
|
else {
|
|
641
643
|
document.removeEventListener('click', this.outsideClickHandler);
|
|
642
644
|
}
|
|
643
|
-
}, id: "page-thumbnails-btn", "data-tooltip-id": "ls-dv-tooltip", "data-tooltip-content": i18n.dvI18n.t('statusbar.pagethumbnails') }, index.h("ls-icon", { key: '
|
|
645
|
+
}, id: "page-thumbnails-btn", "data-tooltip-id": "ls-dv-tooltip", "data-tooltip-content": i18n.dvI18n.t('statusbar.pagethumbnails') }, index.h("ls-icon", { key: '6b324a39ffbe36972aaa09d92191cfaace18ca42', name: !this.showThumbnails ? 'side-panel-open-right-icon' : 'side-panel-close-right-icon', size: 18 }))), this.showThumbnails && (index.h("div", { key: '9aa2b3535ad900e5ba758457631d57fd5d6c38fe', class: "ls-dv-thumbnail-popover" }, index.h("div", { key: '90a1ca58218f2873e3a4309b77fda5bfc2787b82', id: "ls-thumbnail-container", class: "ls-dv-thumbnail-grid" })))), !isPreview && index.h("ls-helper-bar", { key: '47782efbb75ccbd0b762f294906f6475e952b801' }), index.h("span", { key: '1d6a5f8c19234bab666afc6a3f1e7a16d0d097ca', class: "ls-dv-version" }, "v", version), index.h("ls-tooltip", { key: 'ac89e817031ff7d4285b2d4627e49def6ddd1daf', tooltipId: "ls-dv-tooltip" }), index.h("slot", { key: 'e69df05d6946068a5daaf3cb4eb95ae4f58aa427' }))));
|
|
644
646
|
}
|
|
645
647
|
static get watchers() { return {
|
|
646
648
|
"page": ["onPageChange"]
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
var index = require('./index-DFeU0FNc.js');
|
|
4
4
|
var i18n = require('./i18n-e8JieHV6.js');
|
|
5
|
-
var editorUtils = require('./editorUtils-
|
|
5
|
+
var editorUtils = require('./editorUtils-CskM29uR.js');
|
|
6
6
|
var fieldDefaults = require('./fieldDefaults-BZtB5J2S.js');
|
|
7
|
-
var mouseHandlers = require('./mouseHandlers-
|
|
8
|
-
var history = require('./history-
|
|
7
|
+
var mouseHandlers = require('./mouseHandlers-DvI94o4n.js');
|
|
8
|
+
var history = require('./history-C8Dy_82r.js');
|
|
9
9
|
require('./defaultPalette-Dt4FmPno.js');
|
|
10
10
|
|
|
11
11
|
var _documentCurrentScript = typeof document !== 'undefined' ? document.currentScript : null;
|
|
@@ -26116,16 +26116,15 @@ function applyUndo() {
|
|
|
26116
26116
|
const mutations = history.undo();
|
|
26117
26117
|
if (!mutations)
|
|
26118
26118
|
return;
|
|
26119
|
-
// Emit with _skipHistory flag so mutateHandler doesn't record it
|
|
26120
26119
|
this._skipHistory = true;
|
|
26121
|
-
this.mutate
|
|
26120
|
+
this.mutateHandler(new CustomEvent('mutate', { detail: mutations }));
|
|
26122
26121
|
}
|
|
26123
26122
|
function applyRedo() {
|
|
26124
26123
|
const mutations = history.redo();
|
|
26125
26124
|
if (!mutations)
|
|
26126
26125
|
return;
|
|
26127
26126
|
this._skipHistory = true;
|
|
26128
|
-
this.mutate
|
|
26127
|
+
this.mutateHandler(new CustomEvent('mutate', { detail: mutations }));
|
|
26129
26128
|
}
|
|
26130
26129
|
// Buffered version of alter that batches rapid key presses
|
|
26131
26130
|
function bufferedAlter(diffFnFactory) {
|
|
@@ -30486,6 +30485,8 @@ if (typeof URL.parse !== 'function') {
|
|
|
30486
30485
|
};
|
|
30487
30486
|
}
|
|
30488
30487
|
GlobalWorkerOptions.workerSrc = `https://unpkg.com/pdfjs-dist@5.4.449/build/pdf.worker.min.mjs`;
|
|
30488
|
+
// Module-level reference to the document keydown listener so it can be cleaned up across remounts
|
|
30489
|
+
let _activeKeyDownListener = null;
|
|
30489
30490
|
const LsDocumentViewer = class {
|
|
30490
30491
|
constructor(hostRef) {
|
|
30491
30492
|
index.registerInstance(this, hostRef);
|
|
@@ -30554,6 +30555,10 @@ const LsDocumentViewer = class {
|
|
|
30554
30555
|
* {string}
|
|
30555
30556
|
*/
|
|
30556
30557
|
templateid;
|
|
30558
|
+
templateIdChanged() {
|
|
30559
|
+
if (this.token && this._initialized)
|
|
30560
|
+
this.reload();
|
|
30561
|
+
}
|
|
30557
30562
|
/**
|
|
30558
30563
|
* A JSON string containing the recipient details. Only used in COMPOSE mode.
|
|
30559
30564
|
* {string}
|
|
@@ -30698,6 +30703,7 @@ const LsDocumentViewer = class {
|
|
|
30698
30703
|
addParticipant;
|
|
30699
30704
|
adapter;
|
|
30700
30705
|
_skipHistory = false;
|
|
30706
|
+
_loadGeneration = 0;
|
|
30701
30707
|
// Action an external data action and use the result (if required)
|
|
30702
30708
|
mutateHandler(event) {
|
|
30703
30709
|
if (this.token && this.adapter) {
|
|
@@ -30724,11 +30730,15 @@ const LsDocumentViewer = class {
|
|
|
30724
30730
|
}
|
|
30725
30731
|
this._skipHistory = false;
|
|
30726
30732
|
this.isMutating = true;
|
|
30733
|
+
const currentGeneration = this._loadGeneration;
|
|
30727
30734
|
const promises = mutations.map(me => this.adapter
|
|
30728
30735
|
.handleEvent(me, this.token)
|
|
30729
30736
|
.then(result => {
|
|
30730
30737
|
if (result === 'invalid')
|
|
30731
30738
|
return;
|
|
30739
|
+
// Discard stale responses from a previous template
|
|
30740
|
+
if (this._loadGeneration !== currentGeneration)
|
|
30741
|
+
return;
|
|
30732
30742
|
// Cascade name change to witness if it still matches a default pattern
|
|
30733
30743
|
// Must check before matchData/syncRoles overwrites this._template.roles
|
|
30734
30744
|
if (me.action === 'update' && me.data.roleType !== 'WITNESS') {
|
|
@@ -31215,6 +31225,7 @@ const LsDocumentViewer = class {
|
|
|
31215
31225
|
this.validationErrors = editorUtils.validate.bind(this)(this._template);
|
|
31216
31226
|
this.validate.emit({ valid: this.validationErrors.length === 0, errors: this.validationErrors });
|
|
31217
31227
|
}
|
|
31228
|
+
_initialized = false;
|
|
31218
31229
|
initViewer() {
|
|
31219
31230
|
// Generate a canvas to draw the background PDF on.
|
|
31220
31231
|
this.canvas = this.component.shadowRoot.getElementById('pdf-canvas');
|
|
@@ -31232,7 +31243,12 @@ const LsDocumentViewer = class {
|
|
|
31232
31243
|
document.addEventListener('mousemove', mouseHandlers.mouseMove.bind(this));
|
|
31233
31244
|
document.addEventListener('mouseup', mouseHandlers.mouseUp.bind(this));
|
|
31234
31245
|
dropTarget.addEventListener('dblclick', mouseHandlers.mouseDoubleClick.bind(this));
|
|
31235
|
-
|
|
31246
|
+
// Remove any previous keydown listener before adding a new one
|
|
31247
|
+
if (_activeKeyDownListener) {
|
|
31248
|
+
document.removeEventListener('keydown', _activeKeyDownListener);
|
|
31249
|
+
}
|
|
31250
|
+
_activeKeyDownListener = keyDown.bind(this);
|
|
31251
|
+
document.addEventListener('keydown', _activeKeyDownListener);
|
|
31236
31252
|
}
|
|
31237
31253
|
// Listen for flushed mutations from destroyed sidebar components
|
|
31238
31254
|
document.addEventListener('ls-flush-mutate', ((e) => {
|
|
@@ -31257,6 +31273,7 @@ const LsDocumentViewer = class {
|
|
|
31257
31273
|
this.setZoom(Math.round(newZoom * 1e2) / 1e2);
|
|
31258
31274
|
}, { passive: false });
|
|
31259
31275
|
this.generateFields();
|
|
31276
|
+
this._initialized = true;
|
|
31260
31277
|
}
|
|
31261
31278
|
// Generate all the field HTML elements that are required (for every page)
|
|
31262
31279
|
generateFields(clearExisting = true) {
|
|
@@ -31286,6 +31303,8 @@ const LsDocumentViewer = class {
|
|
|
31286
31303
|
}
|
|
31287
31304
|
async load() {
|
|
31288
31305
|
this.isLoading = true;
|
|
31306
|
+
this._loadGeneration++;
|
|
31307
|
+
history.clearHistory();
|
|
31289
31308
|
// Get all template and group listing data.
|
|
31290
31309
|
try {
|
|
31291
31310
|
this.adapter = new LsDocumentAdapter(this.endpoint);
|
|
@@ -31354,6 +31373,32 @@ const LsDocumentViewer = class {
|
|
|
31354
31373
|
}
|
|
31355
31374
|
}
|
|
31356
31375
|
}
|
|
31376
|
+
async reload() {
|
|
31377
|
+
this.isLoading = true;
|
|
31378
|
+
this._loadGeneration++;
|
|
31379
|
+
history.clearHistory();
|
|
31380
|
+
try {
|
|
31381
|
+
this.adapter = new LsDocumentAdapter(this.endpoint);
|
|
31382
|
+
const result = (await this.adapter.execute(this.token, editorUtils.getTemplate(this.templateid)));
|
|
31383
|
+
this.parseTemplate(JSON.stringify(result.template));
|
|
31384
|
+
const resultGroup = (await this.adapter.execute(this.token, getGroupData(this._template.groupId)));
|
|
31385
|
+
this.groupInfo = resultGroup.group;
|
|
31386
|
+
this.generateFields();
|
|
31387
|
+
this.showPageFields(this.pageNum);
|
|
31388
|
+
this.validationErrors = editorUtils.validate.bind(this)(this._template);
|
|
31389
|
+
this.validate.emit({ valid: this.validationErrors.length === 0, errors: this.validationErrors });
|
|
31390
|
+
this.pageCount = this._template.pageCount;
|
|
31391
|
+
this.selected = [];
|
|
31392
|
+
this.setZoom(1.0);
|
|
31393
|
+
this.isLoading = false;
|
|
31394
|
+
if (this._template?.link)
|
|
31395
|
+
this.loadAndRender(this._template.link);
|
|
31396
|
+
}
|
|
31397
|
+
catch (e) {
|
|
31398
|
+
this.isLoading = false;
|
|
31399
|
+
console.error('Failed to reload template.', e?.message || e);
|
|
31400
|
+
}
|
|
31401
|
+
}
|
|
31357
31402
|
componentWillLoad() {
|
|
31358
31403
|
if (this.language) {
|
|
31359
31404
|
i18n.dvI18n.changeLanguage(this.language);
|
|
@@ -31380,14 +31425,15 @@ const LsDocumentViewer = class {
|
|
|
31380
31425
|
return false;
|
|
31381
31426
|
}
|
|
31382
31427
|
render() {
|
|
31383
|
-
return (index.h(index.Host, { key: '
|
|
31428
|
+
return (index.h(index.Host, { key: '1c9984bf147503f2979dc5591f140514f3a38d9f' }, index.h(index.h.Fragment, null, this.isLoading && (index.h(index.h.Fragment, null, index.h("div", { key: '7d33135c3fdf99a71d72f25b5c28e49ecc3867be', class: 'ls-dv-page-loader' }, index.h("ls-loading-logo", { key: '8990a520c84835b97b4d3cd4ea84a6f94968c45b', size: 200, colour: "var(--primary-60)" })), index.h("div", { key: '29641895ac2d52d69183a07123d27e6566c17d97', class: 'ls-dv-custom-loader-slot' }, index.h("slot", { key: '7bef6ef95e5d3e8792118288ad69d64ae6c883b3', name: "custom-loader" })), this.mode === 'compose' && index.h("ls-compose-loader", { key: '2c92baf059816aa925265f3a4c284d819ebb02e6' }))), this.error && (index.h("div", { key: 'ba8f19052b333c14077ba661b47141eedd751cc3', class: "ls-dv-error-state" }, index.h("div", { key: 'e7f5b45617ea473575c3999e610e8ac9d9a3e662', class: "ls-dv-error-card" }, index.h("ls-icon", { key: 'a0d262e3b0ac53362ff51476268a8046840b1069', name: "exclamation-circle-icon", size: 32, style: { color: 'var(--red-60, #dc2626)' } }), index.h("p", { key: 'e5b119fba5d291231791f9956d8304a3bebf3b05', class: "ls-dv-error-title" }, this.errorTitle), index.h("p", { key: 'e260583526bdc4ad7f7cb28601af606a50ee5037', class: "ls-dv-error-message" }, this.error)))), index.h("div", { key: 'ab6eae0fb397f32330b3bfb3c17f8297b0e14bdc', class: "ls-dv-page-header" }, index.h("div", { key: 'ac7d6391d6dc3e0c59550032c959ef10672f93e1', class: 'ls-dv-left-slot-wrapper' }, index.h("slot", { key: '3100fd24301ab2781ab3bbe63f3654d4475c4726', name: "left-button" })), index.h("div", { key: '3948a22df5ee5f8c1dde92645407ae6095a947c3', class: 'ls-dv-right-slot-wrapper' }, index.h("slot", { key: '06eb1fc89813e466a4752d355d21f55a3880c5f3', name: "right-button" })), this.mode === 'editor' && (index.h("div", { key: '7f3d54c519be843dcf5cd903ac85f8b5ff3017f5' }, index.h("span", { key: '626fef0097d482620b136eaba0f5a833d5e13ba5', class: "ls-dv-header-text-1" }, i18n.dvI18n.t('viewer.templatecreation')), index.h("span", { key: '53ea6ffbb0302a460980e332cee7e5540bed390d' }, "/"), index.h("span", { key: 'f2df918d17814b9ad977eb4865ac42b27ab67772', class: "ls-dv-header-text-2" }, this._template?.title))), this.mode === 'compose' && (index.h("div", { key: '8cdd65e6001ecb5b44a7b67849d44e358a7e5730', style: { display: 'flex', alignItems: 'center', gap: '0.25rem' } }, index.h("slot", { key: '40bb1ee712a356a4bfeac8da94e7fd8463a05285', name: "top-bar" })))), index.h("form", { key: '7f5299608155174f9db6625ca4d36678c8de4e62', id: "ls-editor-form" }, index.h("ls-left-bar", { key: '77e10b47bac609bc88e80c2f18c7e347329a31a3', mode: this.mode, selected: this.selected, manager: this.manager, signer: this.signer, filtertoolbox: this.filtertoolbox, template: this._template, recipients: this._recipients, validationErrors: this.validationErrors, fieldTypeSelected: this.fieldTypeSelected, displayTable: this.displayTable, selectedDataItems: this.selectedDataItems, busy: this.isMutating, onManagerChange: e => this.handleManagerChange(e.detail), onClearSelected: () => {
|
|
31384
31429
|
this.unselect();
|
|
31385
31430
|
const toolbar = this.component.shadowRoot.getElementById('ls-toolbar');
|
|
31386
31431
|
if (toolbar)
|
|
31387
31432
|
toolbar.dataItem = [];
|
|
31388
|
-
} }, index.h("slot", { key: '
|
|
31433
|
+
} }, index.h("slot", { key: '0f1fa9523db6632cdd035684f091b8e45567bb83', name: "recipient-panel", slot: "recipient-panel" })), index.h("ls-toolbar", { key: '83744e49b7872db1c2d73ea5aa8c5d63c9081519', id: "ls-toolbar", template: this._template, editor: this, groupInfo: this.groupInfo, mode: this.mode, signer: this.signer, selected: this.selected, pageNum: this.pageNum }), index.h("div", { key: '886d632ca40c9bbecc176cf64e197c92cb1795ee', id: "ls-mid-area" }, index.h("div", { key: '5af07dd82b20bcc0e28e8c7e64a570b2cd5a0bf7', class: { 'ls-dv-document-frame-wrapper': true, 'ls-dv-document-frame-wrapper--preview': this.mode === 'preview' }, id: "document-frame-wrapper" }, index.h("div", { key: '3873b725f4a85956bd2191e92c18ce9f5c8d4756', id: "ls-document-frame" }, index.h("canvas", { key: 'ba49a53daecf0bba5dc836f6247059374656ed54', id: "pdf-canvas", class: this.displayTable || this.isLoading ? 'ls-dv-hidden' : '' }), index.h("ls-editor-table", { key: '6fdc6a2ddf91b8146689e708cffd70197f358d50', editor: this, class: this.displayTable ? '' : 'ls-dv-hidden' }), index.h("div", { key: '71247cc36b357ee37ebfb44c5e32bf63b0db9c75', id: "ls-box-selector" }), index.h("div", { key: '08a521f79281736b46a3a8f7fc5f56bfd7cae6f4', id: "ls-drag-selector" }), this.mode !== 'preview' && !this._template?.locked && !this.isLoading && this._template?.elementConnection?.templateElements?.length > 0 && (index.h("ls-select-menu", { key: '73529d16cbc7acec207429d0e2f04fcbb12851b5', class: "ls-dv-select-menu-position", selected: this.selected, pageNum: this.pageNum, editor: this })), this.mode !== 'preview' && !this._template?.locked && !this.isLoading && this._template?.elementConnection?.templateElements?.length > 0 && (index.h("ls-select-menu", { key: 'b73febb91ce6ecb8b2bbdf7ebeac096819adc2f6', class: "ls-dv-select-menu-floating", selected: this.selected, pageNum: this.pageNum, editor: this, floating: true })))), index.h("ls-statusbar", { key: '823577c9cc7ec7b87dab69ae131afddc0ffb4de8', editor: this, page: this.pageNum, pageCount: this.pageCount, mode: this.mode, canUndo: history.canUndo(), canRedo: history.canRedo() }), this.mode === 'editor' && (index.h("div", { key: 'b0a35c6102836f109c99f786181cdecbbc7f3b7f', class: 'ls-dv-validation-tag-wrapper' }, index.h("ls-validation-tag", { key: '8fa7669d0451d5a1a6736a537d8c4544656d4198', validationErrors: this.validationErrors }), index.h("slot", { key: '217e3a0a9ffd3ea623181529c558773315fa02ab', name: "next-button" })))))), index.h("ls-tooltip", { key: '1932ad5cd7739438055a03b30398fc17045216df', tooltipId: "ls-dv-tooltip" })));
|
|
31389
31434
|
}
|
|
31390
31435
|
static get watchers() { return {
|
|
31436
|
+
"templateid": ["templateIdChanged"],
|
|
31391
31437
|
"language": ["languageChanged"],
|
|
31392
31438
|
"mode": ["modeHandler"],
|
|
31393
31439
|
"_template": ["templateLockedHandler"],
|