legalesign-document-viewer 1.0.4 → 1.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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/ls-field-format_2.cjs.entry.js +10 -10
- 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-field-format/ls-field-format.js +10 -10
- package/dist/collection/components/ls-field-format/ls-field-format.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 +71 -24
- 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-format.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/ls-toolbar.js +1 -1
- package/dist/components/{p-BUAS2e6p.js → p--onI05IE.js} +12 -12
- package/dist/components/p--onI05IE.js.map +1 -0
- 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-Cts0eCoL.js → p-C4nAOEBk.js} +3 -3
- package/dist/components/{p-Cts0eCoL.js.map → p-C4nAOEBk.js.map} +1 -1
- 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-Dw0UiotU.js → p-CXfWNJjL.js} +18 -14
- package/dist/components/p-CXfWNJjL.js.map +1 -0
- 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/ls-field-format_2.entry.js +10 -10
- 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-12f94755.entry.js} +2 -2
- package/dist/ls-document-viewer/p-12f94755.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/ls-document-viewer/p-de351297.entry.js +2 -0
- package/dist/ls-document-viewer/p-de351297.entry.js.map +1 -0
- 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-BUAS2e6p.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-c47ad3e6.entry.js +0 -2
- package/dist/ls-document-viewer/p-c47ad3e6.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
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { t as transformTag, p as proxyCustomElement, H, c as createEvent, h, a as Host } from './p-DIvmRYeB.js';
|
|
2
2
|
import { d as dvI18n } from './p-WVWIAGo_.js';
|
|
3
|
-
import { o as oob, m as moveField, u as updateTemplate, r as recalculateCoordinates, s as syncRoles, d as defineCustomElement$U, c as matchData, e as validate, g as getInputType, h as getApiType, i as addField, j as getTemplate } from './p-
|
|
3
|
+
import { o as oob, m as moveField, u as updateTemplate, r as recalculateCoordinates, s as syncRoles, d as defineCustomElement$U, c as matchData, e as validate, g as getInputType, h as getApiType, i as addField, j as getTemplate } from './p-BLMY8rNM.js';
|
|
4
4
|
import { D as DEFAULT_FONT_SIZE$1, a as DEFAULT_FONT_NAME, F as FIELD_DEFAULTS } from './p-04cXI5GQ.js';
|
|
5
|
-
import { c as copySelected, a as cutSelected, p as pasteClipboard, u as updateSelectionBox, d as defineCustomElement$O, t as toolboxDragStart, m as mouseClick, b as mouseDown, e as mouseMove, f as mouseUp, g as mouseDoubleClick } from './p-
|
|
6
|
-
import { r as redo, u as undo, b as recordMutations } from './p-
|
|
5
|
+
import { c as copySelected, a as cutSelected, p as pasteClipboard, u as updateSelectionBox, d as defineCustomElement$O, t as toolboxDragStart, m as mouseClick, b as mouseDown, e as mouseMove, f as mouseUp, g as mouseDoubleClick } from './p-Bi1odRMK.js';
|
|
6
|
+
import { r as redo, u as undo, b as recordMutations, c as clearHistory, d as canRedo, e as canUndo } from './p-DmQNqtPP.js';
|
|
7
7
|
import { d as defineCustomElement$_ } from './p-CQI0GKzS.js';
|
|
8
8
|
import { d as defineCustomElement$Z } from './p-CgoyKNia.js';
|
|
9
9
|
import { d as defineCustomElement$Y } from './p-pnSqPPx5.js';
|
|
@@ -13,24 +13,24 @@ import { d as defineCustomElement$V } from './p-CLklwQ7z.js';
|
|
|
13
13
|
import { d as defineCustomElement$T } from './p-C6FqoNri.js';
|
|
14
14
|
import { d as defineCustomElement$S } from './p-DWGdXqO4.js';
|
|
15
15
|
import { d as defineCustomElement$R } from './p-DRDChAg6.js';
|
|
16
|
-
import { d as defineCustomElement$Q } from './p-
|
|
16
|
+
import { d as defineCustomElement$Q } from './p-BJoHocUQ.js';
|
|
17
17
|
import { d as defineCustomElement$P } from './p-DkV1l_zw.js';
|
|
18
18
|
import { d as defineCustomElement$N } from './p-CSxx3aLG.js';
|
|
19
|
-
import { d as defineCustomElement$M } from './p
|
|
19
|
+
import { d as defineCustomElement$M } from './p--onI05IE.js';
|
|
20
20
|
import { d as defineCustomElement$L } from './p-Dab8K5mi.js';
|
|
21
|
-
import { d as defineCustomElement$K } from './p-
|
|
21
|
+
import { d as defineCustomElement$K } from './p-B-P0RM5X.js';
|
|
22
22
|
import { d as defineCustomElement$J } from './p-BgIA-QAy.js';
|
|
23
23
|
import { d as defineCustomElement$I } from './p-Ce-55WxN.js';
|
|
24
|
-
import { d as defineCustomElement$H } from './p-
|
|
24
|
+
import { d as defineCustomElement$H } from './p-ihnCvIHa.js';
|
|
25
25
|
import { d as defineCustomElement$G } from './p-C1SFI6sR.js';
|
|
26
|
-
import { d as defineCustomElement$F } from './p-
|
|
27
|
-
import { d as defineCustomElement$E } from './p-
|
|
28
|
-
import { d as defineCustomElement$D } from './p-
|
|
29
|
-
import { d as defineCustomElement$C } from './p-
|
|
30
|
-
import { d as defineCustomElement$B } from './p-
|
|
31
|
-
import { d as defineCustomElement$A } from './p-
|
|
32
|
-
import { d as defineCustomElement$z } from './p-
|
|
33
|
-
import { d as defineCustomElement$y } from './p-
|
|
26
|
+
import { d as defineCustomElement$F } from './p-DKz0A1Hf.js';
|
|
27
|
+
import { d as defineCustomElement$E } from './p-TQAB33L1.js';
|
|
28
|
+
import { d as defineCustomElement$D } from './p-CWbixCW0.js';
|
|
29
|
+
import { d as defineCustomElement$C } from './p-7AZBNv_W.js';
|
|
30
|
+
import { d as defineCustomElement$B } from './p-BOg59Hui.js';
|
|
31
|
+
import { d as defineCustomElement$A } from './p-BRbTJsNX.js';
|
|
32
|
+
import { d as defineCustomElement$z } from './p-CvU1rUiv.js';
|
|
33
|
+
import { d as defineCustomElement$y } from './p-CwR2DcQ8.js';
|
|
34
34
|
import { d as defineCustomElement$x } from './p-pEYsk7D-.js';
|
|
35
35
|
import { d as defineCustomElement$w } from './p-DX7Kb9cb.js';
|
|
36
36
|
import { d as defineCustomElement$v } from './p-CzkJGTTH.js';
|
|
@@ -40,7 +40,7 @@ import { d as defineCustomElement$s } from './p-Brq7Gduk.js';
|
|
|
40
40
|
import { d as defineCustomElement$r } from './p-Cnnef3Aj.js';
|
|
41
41
|
import { d as defineCustomElement$q } from './p-DzUG2q_b.js';
|
|
42
42
|
import { d as defineCustomElement$p } from './p-CIV0VNix.js';
|
|
43
|
-
import { d as defineCustomElement$o } from './p-
|
|
43
|
+
import { d as defineCustomElement$o } from './p-CZCkljMh.js';
|
|
44
44
|
import { d as defineCustomElement$n } from './p-MzXqai7c.js';
|
|
45
45
|
import { d as defineCustomElement$m } from './p-CKoM9Y6t.js';
|
|
46
46
|
import { d as defineCustomElement$l } from './p-Cujzhc6S.js';
|
|
@@ -54,11 +54,11 @@ import { d as defineCustomElement$e } from './p-Qxe4qT6a.js';
|
|
|
54
54
|
import { d as defineCustomElement$d } from './p-CgFpE1fV.js';
|
|
55
55
|
import { d as defineCustomElement$c } from './p-CF40f_5M.js';
|
|
56
56
|
import { d as defineCustomElement$b } from './p-Dl8z1tmj.js';
|
|
57
|
-
import { d as defineCustomElement$a } from './p-
|
|
57
|
+
import { d as defineCustomElement$a } from './p-CXfWNJjL.js';
|
|
58
58
|
import { d as defineCustomElement$9 } from './p-CM71cfRg.js';
|
|
59
59
|
import { d as defineCustomElement$8 } from './p-t_ow9YJD.js';
|
|
60
60
|
import { d as defineCustomElement$7 } from './p-BGf2weVY.js';
|
|
61
|
-
import { d as defineCustomElement$6 } from './p-
|
|
61
|
+
import { d as defineCustomElement$6 } from './p-C4nAOEBk.js';
|
|
62
62
|
import { d as defineCustomElement$5 } from './p-BIGiHXfV.js';
|
|
63
63
|
import { d as defineCustomElement$4 } from './p-XnnsjcVC.js';
|
|
64
64
|
import { d as defineCustomElement$3 } from './p-cjANxX0x.js';
|
|
@@ -26171,16 +26171,15 @@ function applyUndo() {
|
|
|
26171
26171
|
const mutations = undo();
|
|
26172
26172
|
if (!mutations)
|
|
26173
26173
|
return;
|
|
26174
|
-
// Emit with _skipHistory flag so mutateHandler doesn't record it
|
|
26175
26174
|
this._skipHistory = true;
|
|
26176
|
-
this.mutate
|
|
26175
|
+
this.mutateHandler(new CustomEvent('mutate', { detail: mutations }));
|
|
26177
26176
|
}
|
|
26178
26177
|
function applyRedo() {
|
|
26179
26178
|
const mutations = redo();
|
|
26180
26179
|
if (!mutations)
|
|
26181
26180
|
return;
|
|
26182
26181
|
this._skipHistory = true;
|
|
26183
|
-
this.mutate
|
|
26182
|
+
this.mutateHandler(new CustomEvent('mutate', { detail: mutations }));
|
|
26184
26183
|
}
|
|
26185
26184
|
// Buffered version of alter that batches rapid key presses
|
|
26186
26185
|
function bufferedAlter(diffFnFactory) {
|
|
@@ -30541,6 +30540,8 @@ if (typeof URL.parse !== 'function') {
|
|
|
30541
30540
|
};
|
|
30542
30541
|
}
|
|
30543
30542
|
GlobalWorkerOptions.workerSrc = `https://unpkg.com/pdfjs-dist@5.4.449/build/pdf.worker.min.mjs`;
|
|
30543
|
+
// Module-level reference to the document keydown listener so it can be cleaned up across remounts
|
|
30544
|
+
let _activeKeyDownListener = null;
|
|
30544
30545
|
const LsDocumentViewer$1 = /*@__PURE__*/ proxyCustomElement(class LsDocumentViewer extends H {
|
|
30545
30546
|
constructor(registerHost) {
|
|
30546
30547
|
super();
|
|
@@ -30613,6 +30614,10 @@ const LsDocumentViewer$1 = /*@__PURE__*/ proxyCustomElement(class LsDocumentView
|
|
|
30613
30614
|
* {string}
|
|
30614
30615
|
*/
|
|
30615
30616
|
templateid;
|
|
30617
|
+
templateIdChanged() {
|
|
30618
|
+
if (this.token && this._initialized)
|
|
30619
|
+
this.reload();
|
|
30620
|
+
}
|
|
30616
30621
|
/**
|
|
30617
30622
|
* A JSON string containing the recipient details. Only used in COMPOSE mode.
|
|
30618
30623
|
* {string}
|
|
@@ -30757,6 +30762,7 @@ const LsDocumentViewer$1 = /*@__PURE__*/ proxyCustomElement(class LsDocumentView
|
|
|
30757
30762
|
addParticipant;
|
|
30758
30763
|
adapter;
|
|
30759
30764
|
_skipHistory = false;
|
|
30765
|
+
_loadGeneration = 0;
|
|
30760
30766
|
// Action an external data action and use the result (if required)
|
|
30761
30767
|
mutateHandler(event) {
|
|
30762
30768
|
if (this.token && this.adapter) {
|
|
@@ -30783,11 +30789,15 @@ const LsDocumentViewer$1 = /*@__PURE__*/ proxyCustomElement(class LsDocumentView
|
|
|
30783
30789
|
}
|
|
30784
30790
|
this._skipHistory = false;
|
|
30785
30791
|
this.isMutating = true;
|
|
30792
|
+
const currentGeneration = this._loadGeneration;
|
|
30786
30793
|
const promises = mutations.map(me => this.adapter
|
|
30787
30794
|
.handleEvent(me, this.token)
|
|
30788
30795
|
.then(result => {
|
|
30789
30796
|
if (result === 'invalid')
|
|
30790
30797
|
return;
|
|
30798
|
+
// Discard stale responses from a previous template
|
|
30799
|
+
if (this._loadGeneration !== currentGeneration)
|
|
30800
|
+
return;
|
|
30791
30801
|
// Cascade name change to witness if it still matches a default pattern
|
|
30792
30802
|
// Must check before matchData/syncRoles overwrites this._template.roles
|
|
30793
30803
|
if (me.action === 'update' && me.data.roleType !== 'WITNESS') {
|
|
@@ -31274,6 +31284,7 @@ const LsDocumentViewer$1 = /*@__PURE__*/ proxyCustomElement(class LsDocumentView
|
|
|
31274
31284
|
this.validationErrors = validate.bind(this)(this._template);
|
|
31275
31285
|
this.validate.emit({ valid: this.validationErrors.length === 0, errors: this.validationErrors });
|
|
31276
31286
|
}
|
|
31287
|
+
_initialized = false;
|
|
31277
31288
|
initViewer() {
|
|
31278
31289
|
// Generate a canvas to draw the background PDF on.
|
|
31279
31290
|
this.canvas = this.component.shadowRoot.getElementById('pdf-canvas');
|
|
@@ -31291,7 +31302,12 @@ const LsDocumentViewer$1 = /*@__PURE__*/ proxyCustomElement(class LsDocumentView
|
|
|
31291
31302
|
document.addEventListener('mousemove', mouseMove.bind(this));
|
|
31292
31303
|
document.addEventListener('mouseup', mouseUp.bind(this));
|
|
31293
31304
|
dropTarget.addEventListener('dblclick', mouseDoubleClick.bind(this));
|
|
31294
|
-
|
|
31305
|
+
// Remove any previous keydown listener before adding a new one
|
|
31306
|
+
if (_activeKeyDownListener) {
|
|
31307
|
+
document.removeEventListener('keydown', _activeKeyDownListener);
|
|
31308
|
+
}
|
|
31309
|
+
_activeKeyDownListener = keyDown.bind(this);
|
|
31310
|
+
document.addEventListener('keydown', _activeKeyDownListener);
|
|
31295
31311
|
}
|
|
31296
31312
|
// Listen for flushed mutations from destroyed sidebar components
|
|
31297
31313
|
document.addEventListener('ls-flush-mutate', ((e) => {
|
|
@@ -31316,6 +31332,7 @@ const LsDocumentViewer$1 = /*@__PURE__*/ proxyCustomElement(class LsDocumentView
|
|
|
31316
31332
|
this.setZoom(Math.round(newZoom * 1e2) / 1e2);
|
|
31317
31333
|
}, { passive: false });
|
|
31318
31334
|
this.generateFields();
|
|
31335
|
+
this._initialized = true;
|
|
31319
31336
|
}
|
|
31320
31337
|
// Generate all the field HTML elements that are required (for every page)
|
|
31321
31338
|
generateFields(clearExisting = true) {
|
|
@@ -31345,6 +31362,8 @@ const LsDocumentViewer$1 = /*@__PURE__*/ proxyCustomElement(class LsDocumentView
|
|
|
31345
31362
|
}
|
|
31346
31363
|
async load() {
|
|
31347
31364
|
this.isLoading = true;
|
|
31365
|
+
this._loadGeneration++;
|
|
31366
|
+
clearHistory();
|
|
31348
31367
|
// Get all template and group listing data.
|
|
31349
31368
|
try {
|
|
31350
31369
|
this.adapter = new LsDocumentAdapter(this.endpoint);
|
|
@@ -31413,6 +31432,32 @@ const LsDocumentViewer$1 = /*@__PURE__*/ proxyCustomElement(class LsDocumentView
|
|
|
31413
31432
|
}
|
|
31414
31433
|
}
|
|
31415
31434
|
}
|
|
31435
|
+
async reload() {
|
|
31436
|
+
this.isLoading = true;
|
|
31437
|
+
this._loadGeneration++;
|
|
31438
|
+
clearHistory();
|
|
31439
|
+
try {
|
|
31440
|
+
this.adapter = new LsDocumentAdapter(this.endpoint);
|
|
31441
|
+
const result = (await this.adapter.execute(this.token, getTemplate(this.templateid)));
|
|
31442
|
+
this.parseTemplate(JSON.stringify(result.template));
|
|
31443
|
+
const resultGroup = (await this.adapter.execute(this.token, getGroupData(this._template.groupId)));
|
|
31444
|
+
this.groupInfo = resultGroup.group;
|
|
31445
|
+
this.generateFields();
|
|
31446
|
+
this.showPageFields(this.pageNum);
|
|
31447
|
+
this.validationErrors = validate.bind(this)(this._template);
|
|
31448
|
+
this.validate.emit({ valid: this.validationErrors.length === 0, errors: this.validationErrors });
|
|
31449
|
+
this.pageCount = this._template.pageCount;
|
|
31450
|
+
this.selected = [];
|
|
31451
|
+
this.setZoom(1.0);
|
|
31452
|
+
this.isLoading = false;
|
|
31453
|
+
if (this._template?.link)
|
|
31454
|
+
this.loadAndRender(this._template.link);
|
|
31455
|
+
}
|
|
31456
|
+
catch (e) {
|
|
31457
|
+
this.isLoading = false;
|
|
31458
|
+
console.error('Failed to reload template.', e?.message || e);
|
|
31459
|
+
}
|
|
31460
|
+
}
|
|
31416
31461
|
componentWillLoad() {
|
|
31417
31462
|
if (this.language) {
|
|
31418
31463
|
dvI18n.changeLanguage(this.language);
|
|
@@ -31439,14 +31484,15 @@ const LsDocumentViewer$1 = /*@__PURE__*/ proxyCustomElement(class LsDocumentView
|
|
|
31439
31484
|
return false;
|
|
31440
31485
|
}
|
|
31441
31486
|
render() {
|
|
31442
|
-
return (h(Host, { key: '
|
|
31487
|
+
return (h(Host, { key: '1c9984bf147503f2979dc5591f140514f3a38d9f' }, h(h.Fragment, null, this.isLoading && (h(h.Fragment, null, h("div", { key: '7d33135c3fdf99a71d72f25b5c28e49ecc3867be', class: 'ls-dv-page-loader' }, h("ls-loading-logo", { key: '8990a520c84835b97b4d3cd4ea84a6f94968c45b', size: 200, colour: "var(--primary-60)" })), h("div", { key: '29641895ac2d52d69183a07123d27e6566c17d97', class: 'ls-dv-custom-loader-slot' }, h("slot", { key: '7bef6ef95e5d3e8792118288ad69d64ae6c883b3', name: "custom-loader" })), this.mode === 'compose' && h("ls-compose-loader", { key: '2c92baf059816aa925265f3a4c284d819ebb02e6' }))), this.error && (h("div", { key: 'ba8f19052b333c14077ba661b47141eedd751cc3', class: "ls-dv-error-state" }, h("div", { key: 'e7f5b45617ea473575c3999e610e8ac9d9a3e662', class: "ls-dv-error-card" }, h("ls-icon", { key: 'a0d262e3b0ac53362ff51476268a8046840b1069', name: "exclamation-circle-icon", size: 32, style: { color: 'var(--red-60, #dc2626)' } }), h("p", { key: 'e5b119fba5d291231791f9956d8304a3bebf3b05', class: "ls-dv-error-title" }, this.errorTitle), h("p", { key: 'e260583526bdc4ad7f7cb28601af606a50ee5037', class: "ls-dv-error-message" }, this.error)))), h("div", { key: 'ab6eae0fb397f32330b3bfb3c17f8297b0e14bdc', class: "ls-dv-page-header" }, h("div", { key: 'ac7d6391d6dc3e0c59550032c959ef10672f93e1', class: 'ls-dv-left-slot-wrapper' }, h("slot", { key: '3100fd24301ab2781ab3bbe63f3654d4475c4726', name: "left-button" })), h("div", { key: '3948a22df5ee5f8c1dde92645407ae6095a947c3', class: 'ls-dv-right-slot-wrapper' }, h("slot", { key: '06eb1fc89813e466a4752d355d21f55a3880c5f3', name: "right-button" })), this.mode === 'editor' && (h("div", { key: '7f3d54c519be843dcf5cd903ac85f8b5ff3017f5' }, h("span", { key: '626fef0097d482620b136eaba0f5a833d5e13ba5', class: "ls-dv-header-text-1" }, dvI18n.t('viewer.templatecreation')), h("span", { key: '53ea6ffbb0302a460980e332cee7e5540bed390d' }, "/"), h("span", { key: 'f2df918d17814b9ad977eb4865ac42b27ab67772', class: "ls-dv-header-text-2" }, this._template?.title))), this.mode === 'compose' && (h("div", { key: '8cdd65e6001ecb5b44a7b67849d44e358a7e5730', style: { display: 'flex', alignItems: 'center', gap: '0.25rem' } }, h("slot", { key: '40bb1ee712a356a4bfeac8da94e7fd8463a05285', name: "top-bar" })))), h("form", { key: '7f5299608155174f9db6625ca4d36678c8de4e62', id: "ls-editor-form" }, 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: () => {
|
|
31443
31488
|
this.unselect();
|
|
31444
31489
|
const toolbar = this.component.shadowRoot.getElementById('ls-toolbar');
|
|
31445
31490
|
if (toolbar)
|
|
31446
31491
|
toolbar.dataItem = [];
|
|
31447
|
-
} }, h("slot", { key: '
|
|
31492
|
+
} }, h("slot", { key: '0f1fa9523db6632cdd035684f091b8e45567bb83', name: "recipient-panel", slot: "recipient-panel" })), 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 }), h("div", { key: '886d632ca40c9bbecc176cf64e197c92cb1795ee', id: "ls-mid-area" }, h("div", { key: '5af07dd82b20bcc0e28e8c7e64a570b2cd5a0bf7', class: { 'ls-dv-document-frame-wrapper': true, 'ls-dv-document-frame-wrapper--preview': this.mode === 'preview' }, id: "document-frame-wrapper" }, h("div", { key: '3873b725f4a85956bd2191e92c18ce9f5c8d4756', id: "ls-document-frame" }, h("canvas", { key: 'ba49a53daecf0bba5dc836f6247059374656ed54', id: "pdf-canvas", class: this.displayTable || this.isLoading ? 'ls-dv-hidden' : '' }), h("ls-editor-table", { key: '6fdc6a2ddf91b8146689e708cffd70197f358d50', editor: this, class: this.displayTable ? '' : 'ls-dv-hidden' }), h("div", { key: '71247cc36b357ee37ebfb44c5e32bf63b0db9c75', id: "ls-box-selector" }), h("div", { key: '08a521f79281736b46a3a8f7fc5f56bfd7cae6f4', id: "ls-drag-selector" }), this.mode !== 'preview' && !this._template?.locked && !this.isLoading && this._template?.elementConnection?.templateElements?.length > 0 && (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 && (h("ls-select-menu", { key: 'b73febb91ce6ecb8b2bbdf7ebeac096819adc2f6', class: "ls-dv-select-menu-floating", selected: this.selected, pageNum: this.pageNum, editor: this, floating: true })))), h("ls-statusbar", { key: '823577c9cc7ec7b87dab69ae131afddc0ffb4de8', editor: this, page: this.pageNum, pageCount: this.pageCount, mode: this.mode, canUndo: canUndo(), canRedo: canRedo() }), this.mode === 'editor' && (h("div", { key: 'b0a35c6102836f109c99f786181cdecbbc7f3b7f', class: 'ls-dv-validation-tag-wrapper' }, h("ls-validation-tag", { key: '8fa7669d0451d5a1a6736a537d8c4544656d4198', validationErrors: this.validationErrors }), h("slot", { key: '217e3a0a9ffd3ea623181529c558773315fa02ab', name: "next-button" })))))), h("ls-tooltip", { key: '1932ad5cd7739438055a03b30398fc17045216df', tooltipId: "ls-dv-tooltip" })));
|
|
31448
31493
|
}
|
|
31449
31494
|
static get watchers() { return {
|
|
31495
|
+
"templateid": ["templateIdChanged"],
|
|
31450
31496
|
"language": ["languageChanged"],
|
|
31451
31497
|
"mode": ["modeHandler"],
|
|
31452
31498
|
"_template": ["templateLockedHandler"],
|
|
@@ -31493,6 +31539,7 @@ const LsDocumentViewer$1 = /*@__PURE__*/ proxyCustomElement(class LsDocumentView
|
|
|
31493
31539
|
"unselect": [64],
|
|
31494
31540
|
"setZoom": [64]
|
|
31495
31541
|
}, [[0, "mutate", "mutateHandler"], [0, "update", "updateHandler"], [0, "fieldTypeSelected", "handleFieldTypeSelected"], [0, "toolboxDragStart", "handleToolboxDragStart"], [0, "addParticipant", "addParticpantHandler"], [0, "changeSigner", "updateSigner"], [0, "selectFieldForPlacement", "selectFieldForPlacement"], [0, "selectFields", "selectFieldsHandler"], [0, "roleChange", "roleHandler"]], {
|
|
31542
|
+
"templateid": ["templateIdChanged"],
|
|
31496
31543
|
"language": ["languageChanged"],
|
|
31497
31544
|
"mode": ["modeHandler"],
|
|
31498
31545
|
"_template": ["templateLockedHandler"],
|