legalesign-document-viewer 0.3.3 → 0.3.4
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/ls-document-options_40.cjs.entry.js +167 -173
- package/dist/cjs/ls-document-options_40.cjs.entry.js.map +1 -1
- package/dist/collection/components/ls-document-viewer/editorUtils.js +8 -3
- package/dist/collection/components/ls-document-viewer/editorUtils.js.map +1 -1
- package/dist/collection/components/ls-document-viewer/ls-document-viewer.js +10 -3
- package/dist/collection/components/ls-document-viewer/ls-document-viewer.js.map +1 -1
- package/dist/components/ls-document-viewer.js +71 -136
- 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-date.js +1 -1
- package/dist/components/ls-field-properties-dropdown.js +1 -1
- 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-image.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-statusbar.js +1 -1
- package/dist/components/{p-C4dJ_NrC.js → p-1wdCYLqw.js} +3 -3
- package/dist/components/{p-C4dJ_NrC.js.map → p-1wdCYLqw.js.map} +1 -1
- package/dist/components/{p-tfo7xItm.js → p-B0uVP8it.js} +3 -3
- package/dist/components/{p-tfo7xItm.js.map → p-B0uVP8it.js.map} +1 -1
- package/dist/components/{p-DE2r5IdM.js → p-BBuk6A32.js} +3 -3
- package/dist/components/{p-DE2r5IdM.js.map → p-BBuk6A32.js.map} +1 -1
- package/dist/components/{p-Ovur85Of.js → p-BMpnAxqv.js} +114 -55
- package/dist/components/p-BMpnAxqv.js.map +1 -0
- package/dist/components/{p-C45TaVTh.js → p-BOKGHQS9.js} +3 -3
- package/dist/components/{p-C45TaVTh.js.map → p-BOKGHQS9.js.map} +1 -1
- package/dist/components/{p-CCE9t160.js → p-BOz4DYOB.js} +3 -3
- package/dist/components/{p-CCE9t160.js.map → p-BOz4DYOB.js.map} +1 -1
- package/dist/components/{p-DY8RJZmx.js → p-C0t7MuwE.js} +3 -3
- package/dist/components/{p-DY8RJZmx.js.map → p-C0t7MuwE.js.map} +1 -1
- package/dist/components/{p-Da83lhqi.js → p-CktqjOO6.js} +3 -3
- package/dist/components/{p-Da83lhqi.js.map → p-CktqjOO6.js.map} +1 -1
- package/dist/components/{p-CZkgAbFI.js → p-CpYbd6qt.js} +3 -3
- package/dist/components/{p-CZkgAbFI.js.map → p-CpYbd6qt.js.map} +1 -1
- package/dist/components/{p-23iaNjGp.js → p-CvqT5MA7.js} +3 -3
- package/dist/components/{p-23iaNjGp.js.map → p-CvqT5MA7.js.map} +1 -1
- package/dist/components/{p-BKNIuWRw.js → p-DDWmD8TQ.js} +3 -3
- package/dist/components/{p-BKNIuWRw.js.map → p-DDWmD8TQ.js.map} +1 -1
- package/dist/components/{p-gEso0FtC.js → p-JFkSKN19.js} +3 -3
- package/dist/components/{p-gEso0FtC.js.map → p-JFkSKN19.js.map} +1 -1
- package/dist/components/{p-CHN41h9u.js → p-bNVYQ-ag.js} +3 -3
- package/dist/components/{p-CHN41h9u.js.map → p-bNVYQ-ag.js.map} +1 -1
- package/dist/components/{p-B-K24bnx.js → p-hUeqWmAs.js} +13 -13
- package/dist/components/{p-B-K24bnx.js.map → p-hUeqWmAs.js.map} +1 -1
- package/dist/components/{p-DqW1sDWy.js → p-ji6hTzlP.js} +3 -3
- package/dist/components/{p-DqW1sDWy.js.map → p-ji6hTzlP.js.map} +1 -1
- package/dist/esm/ls-document-options_40.entry.js +167 -173
- package/dist/esm/ls-document-options_40.entry.js.map +1 -1
- package/dist/ls-document-viewer/ls-document-viewer.esm.js +1 -1
- package/dist/ls-document-viewer/{p-e45016a5.entry.js → p-5c27684b.entry.js} +3 -3
- package/dist/ls-document-viewer/p-5c27684b.entry.js.map +1 -0
- package/dist/types/components/ls-document-viewer/ls-document-viewer.d.ts +1 -0
- package/package.json +1 -1
- package/dist/components/p-Ovur85Of.js.map +0 -1
- package/dist/ls-document-viewer/p-e45016a5.entry.js.map +0 -1
|
@@ -19960,60 +19960,40 @@ const recalculateCoordinates = (d) => {
|
|
|
19960
19960
|
};
|
|
19961
19961
|
|
|
19962
19962
|
// Add a role
|
|
19963
|
-
const
|
|
19964
|
-
const newParent = role?.signerParent ? `"${role.signerParent}"` : 'null';
|
|
19965
|
-
return `
|
|
19966
|
-
mutation LDVAddRole {
|
|
19967
|
-
createTemplateRole(input: {
|
|
19968
|
-
templateId: "${role.templateId}"
|
|
19969
|
-
signerIndex: ${role.signerIndex}
|
|
19970
|
-
signerParent: ${newParent}
|
|
19971
|
-
name: ${JSON.stringify(role.name)}
|
|
19972
|
-
ordinal: ${role.ordinal}
|
|
19973
|
-
roleType: ${role.roleType}
|
|
19974
|
-
experience: "${role.experience}"
|
|
19975
|
-
})
|
|
19976
|
-
}`;
|
|
19977
|
-
};
|
|
19978
|
-
// Remove a role
|
|
19979
|
-
const deleteRole = (role) => {
|
|
19980
|
-
return `
|
|
19981
|
-
mutation LDVremoveRole {
|
|
19982
|
-
deleteTemplateRole(input: {
|
|
19983
|
-
templateRoleId: "${role.id}"
|
|
19984
|
-
})
|
|
19985
|
-
}`;
|
|
19986
|
-
};
|
|
19987
|
-
// Save any changes to an role
|
|
19988
|
-
const updateRole = (role) => {
|
|
19989
|
-
const newParent = role?.signerParent ? `"${role.signerParent}"` : 'null';
|
|
19990
|
-
return `
|
|
19991
|
-
mutation LDVupdateRole {
|
|
19992
|
-
updateTemplateRole(input: {
|
|
19993
|
-
templateRoleId: "${role.id}"
|
|
19994
|
-
signerIndex: ${role.signerIndex}
|
|
19995
|
-
ordinal: ${role.ordinal}
|
|
19996
|
-
signerParent: ${newParent}
|
|
19997
|
-
name: ${JSON.stringify(role.name)}
|
|
19998
|
-
roleType: ${role.roleType}
|
|
19999
|
-
experience: "${role.experience}"
|
|
20000
|
-
})
|
|
20001
|
-
}`;
|
|
20002
|
-
};
|
|
20003
|
-
// swap two adjacent roles
|
|
20004
|
-
const swapRoles = (roleId1, roleId2) => {
|
|
19963
|
+
const updateTemplate = template => {
|
|
20005
19964
|
return `
|
|
20006
|
-
mutation
|
|
20007
|
-
|
|
20008
|
-
|
|
20009
|
-
|
|
20010
|
-
|
|
20011
|
-
|
|
19965
|
+
mutation LDVupdateTemplate {
|
|
19966
|
+
updateTemplate(input: {
|
|
19967
|
+
templateId: "${template.id}",
|
|
19968
|
+
title: "${template.title}",
|
|
19969
|
+
locked: ${template.locked},
|
|
19970
|
+
autoArchive: ${template.autoArchive},
|
|
19971
|
+
fixSignatureScale: ${template.fixSignatureScale ? template.fixSignatureScale : false}
|
|
19972
|
+
})
|
|
19973
|
+
}
|
|
19974
|
+
`;
|
|
20012
19975
|
};
|
|
20013
|
-
const
|
|
19976
|
+
const getTemplate = (id) => {
|
|
20014
19977
|
return `
|
|
20015
19978
|
query LDVGetTemplate {
|
|
20016
|
-
template(id: "${id}") {
|
|
19979
|
+
template(id: "${id}") {
|
|
19980
|
+
id
|
|
19981
|
+
title
|
|
19982
|
+
fileName
|
|
19983
|
+
pageDimensions
|
|
19984
|
+
pageCount
|
|
19985
|
+
modified
|
|
19986
|
+
link
|
|
19987
|
+
valid
|
|
19988
|
+
locked
|
|
19989
|
+
autoArchive
|
|
19990
|
+
archived
|
|
19991
|
+
tags
|
|
19992
|
+
created
|
|
19993
|
+
createdBy
|
|
19994
|
+
lastSent
|
|
19995
|
+
fixSignatureScale
|
|
19996
|
+
groupId
|
|
20017
19997
|
roles{
|
|
20018
19998
|
id
|
|
20019
19999
|
name
|
|
@@ -20023,11 +20003,86 @@ const getTemplateRoles = (id) => {
|
|
|
20023
20003
|
signerParent
|
|
20024
20004
|
experience
|
|
20025
20005
|
}
|
|
20006
|
+
elementConnection {
|
|
20007
|
+
templateElements {
|
|
20008
|
+
align
|
|
20009
|
+
ax
|
|
20010
|
+
ay
|
|
20011
|
+
bx
|
|
20012
|
+
by
|
|
20013
|
+
elementType
|
|
20014
|
+
formElementType
|
|
20015
|
+
fieldOrder
|
|
20016
|
+
fontName
|
|
20017
|
+
fontSize
|
|
20018
|
+
helpText
|
|
20019
|
+
hideBorder
|
|
20020
|
+
id
|
|
20021
|
+
label
|
|
20022
|
+
labelExtra
|
|
20023
|
+
logicAction
|
|
20024
|
+
logicGroup
|
|
20025
|
+
mapTo
|
|
20026
|
+
options
|
|
20027
|
+
optional
|
|
20028
|
+
page
|
|
20029
|
+
role
|
|
20030
|
+
signer
|
|
20031
|
+
substantive
|
|
20032
|
+
validation
|
|
20033
|
+
value
|
|
20034
|
+
}
|
|
20035
|
+
totalCount
|
|
20036
|
+
}
|
|
20037
|
+
userSignatureConnection {
|
|
20038
|
+
userSignatureElements {
|
|
20039
|
+
id
|
|
20040
|
+
userId
|
|
20041
|
+
ax
|
|
20042
|
+
ay
|
|
20043
|
+
bx
|
|
20044
|
+
by
|
|
20045
|
+
page
|
|
20046
|
+
link
|
|
20047
|
+
}
|
|
20048
|
+
}
|
|
20026
20049
|
}
|
|
20027
20050
|
}
|
|
20028
20051
|
`;
|
|
20029
20052
|
};
|
|
20030
20053
|
|
|
20054
|
+
/**
|
|
20055
|
+
* This module contains all the rules required to mark a template
|
|
20056
|
+
* as valid.
|
|
20057
|
+
*
|
|
20058
|
+
*/
|
|
20059
|
+
function validate(t) {
|
|
20060
|
+
var errors = [];
|
|
20061
|
+
// Check for missing signatures
|
|
20062
|
+
t.roles.forEach(tr => {
|
|
20063
|
+
if (t.elementConnection.templateElements.filter(e => e.formElementType === 'signature' && e.signer === tr.signerIndex && tr.roleType !== 'APPROVER').length === 0) {
|
|
20064
|
+
errors.push({
|
|
20065
|
+
id: tr.id,
|
|
20066
|
+
title: 'Missing signature.',
|
|
20067
|
+
description: `{tr.name} is missing a signature.`,
|
|
20068
|
+
role: tr,
|
|
20069
|
+
});
|
|
20070
|
+
}
|
|
20071
|
+
});
|
|
20072
|
+
// Check for missing multi-select options
|
|
20073
|
+
t.elementConnection.templateElements.forEach(element => {
|
|
20074
|
+
if (element.validation === 20 && (!element.options || element.options.length === 0)) {
|
|
20075
|
+
errors.push({
|
|
20076
|
+
id: element.id,
|
|
20077
|
+
title: 'Missing options',
|
|
20078
|
+
description: `Drop down field "${element.label}" is missing options.`,
|
|
20079
|
+
element: element,
|
|
20080
|
+
});
|
|
20081
|
+
}
|
|
20082
|
+
});
|
|
20083
|
+
return errors;
|
|
20084
|
+
}
|
|
20085
|
+
|
|
20031
20086
|
/**
|
|
20032
20087
|
* These utils are used to make document-viewer more readable
|
|
20033
20088
|
* but they must be called using the bind() function so that
|
|
@@ -20073,19 +20128,23 @@ function matchData(data) {
|
|
|
20073
20128
|
fi.setAttribute('id', 'ls-field-' + id);
|
|
20074
20129
|
fi.dataItem = { ...data.obj, id };
|
|
20075
20130
|
}
|
|
20131
|
+
this.validationErrors = validate.bind(this)(this._template);
|
|
20076
20132
|
}
|
|
20077
20133
|
if (prefix === 'rol') {
|
|
20078
20134
|
syncRoles.bind(this)();
|
|
20079
20135
|
}
|
|
20080
20136
|
if (prefix === 'tpl') {
|
|
20081
20137
|
this._template = { ...this._template, ...data.obj };
|
|
20138
|
+
this.validationErrors = validate.bind(this)(this._template);
|
|
20082
20139
|
}
|
|
20083
20140
|
}
|
|
20084
20141
|
async function syncRoles() {
|
|
20085
20142
|
var participantManager = this.component.shadowRoot.getElementById('ls-participant-manager');
|
|
20086
|
-
const
|
|
20087
|
-
this.
|
|
20143
|
+
const tresult = (await this.adapter.execute(this.token, getTemplate(this.templateid)));
|
|
20144
|
+
this.parseTemplate(JSON.stringify(tresult.template));
|
|
20088
20145
|
participantManager.template = this._template;
|
|
20146
|
+
this.generateFields();
|
|
20147
|
+
this.validationErrors = validate.bind(this)(this._template);
|
|
20089
20148
|
}
|
|
20090
20149
|
// Utility function which extracts the type from any API id
|
|
20091
20150
|
function getApiType(obj) {
|
|
@@ -24486,95 +24545,55 @@ const deleteElement = obj => {
|
|
|
24486
24545
|
};
|
|
24487
24546
|
|
|
24488
24547
|
// Add a role
|
|
24489
|
-
const
|
|
24548
|
+
const createRole = (role) => {
|
|
24549
|
+
const newParent = role?.signerParent ? `"${role.signerParent}"` : 'null';
|
|
24490
24550
|
return `
|
|
24491
|
-
|
|
24492
|
-
|
|
24493
|
-
|
|
24494
|
-
|
|
24495
|
-
|
|
24496
|
-
|
|
24497
|
-
|
|
24498
|
-
|
|
24499
|
-
|
|
24500
|
-
|
|
24551
|
+
mutation LDVAddRole {
|
|
24552
|
+
createTemplateRole(input: {
|
|
24553
|
+
templateId: "${role.templateId}"
|
|
24554
|
+
signerIndex: ${role.signerIndex}
|
|
24555
|
+
signerParent: ${newParent}
|
|
24556
|
+
name: ${JSON.stringify(role.name)}
|
|
24557
|
+
ordinal: ${role.ordinal}
|
|
24558
|
+
roleType: ${role.roleType}
|
|
24559
|
+
experience: "${role.experience}"
|
|
24560
|
+
})
|
|
24561
|
+
}`;
|
|
24501
24562
|
};
|
|
24502
|
-
|
|
24563
|
+
// Remove a role
|
|
24564
|
+
const deleteRole = (role) => {
|
|
24503
24565
|
return `
|
|
24504
|
-
|
|
24505
|
-
|
|
24506
|
-
|
|
24507
|
-
|
|
24508
|
-
|
|
24509
|
-
|
|
24510
|
-
|
|
24511
|
-
|
|
24512
|
-
|
|
24513
|
-
|
|
24514
|
-
|
|
24515
|
-
|
|
24516
|
-
|
|
24517
|
-
|
|
24518
|
-
|
|
24519
|
-
|
|
24520
|
-
|
|
24521
|
-
|
|
24522
|
-
|
|
24523
|
-
|
|
24524
|
-
|
|
24525
|
-
|
|
24526
|
-
|
|
24527
|
-
|
|
24528
|
-
|
|
24529
|
-
|
|
24530
|
-
|
|
24531
|
-
|
|
24532
|
-
|
|
24533
|
-
|
|
24534
|
-
|
|
24535
|
-
ax
|
|
24536
|
-
ay
|
|
24537
|
-
bx
|
|
24538
|
-
by
|
|
24539
|
-
elementType
|
|
24540
|
-
formElementType
|
|
24541
|
-
fieldOrder
|
|
24542
|
-
fontName
|
|
24543
|
-
fontSize
|
|
24544
|
-
helpText
|
|
24545
|
-
hideBorder
|
|
24546
|
-
id
|
|
24547
|
-
label
|
|
24548
|
-
labelExtra
|
|
24549
|
-
logicAction
|
|
24550
|
-
logicGroup
|
|
24551
|
-
mapTo
|
|
24552
|
-
options
|
|
24553
|
-
optional
|
|
24554
|
-
page
|
|
24555
|
-
role
|
|
24556
|
-
signer
|
|
24557
|
-
substantive
|
|
24558
|
-
validation
|
|
24559
|
-
value
|
|
24560
|
-
}
|
|
24561
|
-
totalCount
|
|
24562
|
-
}
|
|
24563
|
-
userSignatureConnection {
|
|
24564
|
-
userSignatureElements {
|
|
24565
|
-
id
|
|
24566
|
-
userId
|
|
24567
|
-
ax
|
|
24568
|
-
ay
|
|
24569
|
-
bx
|
|
24570
|
-
by
|
|
24571
|
-
page
|
|
24572
|
-
link
|
|
24573
|
-
}
|
|
24574
|
-
}
|
|
24575
|
-
}
|
|
24576
|
-
}
|
|
24577
|
-
`;
|
|
24566
|
+
mutation LDVremoveRole {
|
|
24567
|
+
deleteTemplateRole(input: {
|
|
24568
|
+
templateRoleId: "${role.id}"
|
|
24569
|
+
})
|
|
24570
|
+
}`;
|
|
24571
|
+
};
|
|
24572
|
+
// Save any changes to an role
|
|
24573
|
+
const updateRole = (role) => {
|
|
24574
|
+
const newParent = role?.signerParent ? `"${role.signerParent}"` : 'null';
|
|
24575
|
+
return `
|
|
24576
|
+
mutation LDVupdateRole {
|
|
24577
|
+
updateTemplateRole(input: {
|
|
24578
|
+
templateRoleId: "${role.id}"
|
|
24579
|
+
signerIndex: ${role.signerIndex}
|
|
24580
|
+
ordinal: ${role.ordinal}
|
|
24581
|
+
signerParent: ${newParent}
|
|
24582
|
+
name: ${JSON.stringify(role.name)}
|
|
24583
|
+
roleType: ${role.roleType}
|
|
24584
|
+
experience: "${role.experience}"
|
|
24585
|
+
})
|
|
24586
|
+
}`;
|
|
24587
|
+
};
|
|
24588
|
+
// swap two adjacent roles
|
|
24589
|
+
const swapRoles = (roleId1, roleId2) => {
|
|
24590
|
+
return `
|
|
24591
|
+
mutation LDVswapRole {
|
|
24592
|
+
swapRoles(input: {
|
|
24593
|
+
roleId1: "${roleId1.id}"
|
|
24594
|
+
roleId2: "${roleId2.id}"
|
|
24595
|
+
})
|
|
24596
|
+
}`;
|
|
24578
24597
|
};
|
|
24579
24598
|
|
|
24580
24599
|
class LsDocumentAdapter {
|
|
@@ -24755,38 +24774,6 @@ const getGroupData = (id) => {
|
|
|
24755
24774
|
`;
|
|
24756
24775
|
};
|
|
24757
24776
|
|
|
24758
|
-
/**
|
|
24759
|
-
* This module contains all the rules required to mark a template
|
|
24760
|
-
* as valid.
|
|
24761
|
-
*
|
|
24762
|
-
*/
|
|
24763
|
-
function validate(t) {
|
|
24764
|
-
var errors = [];
|
|
24765
|
-
// Check for missing signatures
|
|
24766
|
-
t.roles.forEach(tr => {
|
|
24767
|
-
if (t.elementConnection.templateElements.filter(e => e.formElementType === 'signature' && e.signer === tr.signerIndex && tr.roleType !== 'APPROVER').length === 0) {
|
|
24768
|
-
errors.push({
|
|
24769
|
-
id: tr.id,
|
|
24770
|
-
title: 'Missing signature.',
|
|
24771
|
-
description: `{tr.name} is missing a signature.`,
|
|
24772
|
-
role: tr,
|
|
24773
|
-
});
|
|
24774
|
-
}
|
|
24775
|
-
});
|
|
24776
|
-
// Check for missing multi-select options
|
|
24777
|
-
t.elementConnection.templateElements.forEach(element => {
|
|
24778
|
-
if (element.validation === 20 && (!element.options || element.options.length === 0)) {
|
|
24779
|
-
errors.push({
|
|
24780
|
-
id: element.id,
|
|
24781
|
-
title: 'Missing options',
|
|
24782
|
-
description: `Drop down field "${element.label}" is missing options.`,
|
|
24783
|
-
element: element,
|
|
24784
|
-
});
|
|
24785
|
-
}
|
|
24786
|
-
});
|
|
24787
|
-
return errors;
|
|
24788
|
-
}
|
|
24789
|
-
|
|
24790
24777
|
const lsDocumentViewerCss = "*,*::before,*::after{box-sizing:border-box}*{margin:0}@media (prefers-reduced-motion: no-preference){html{interpolate-size:allow-keywords}}body{line-height:1.5;-webkit-font-smoothing:antialiased}img,picture,video,canvas,svg{display:block;max-width:100%}input,button,textarea,select{font:inherit}p,h1,h2,h3,h4,h5,h6{overflow-wrap:break-word}p{text-wrap:pretty}h1,h2,h3,h4,h5,h6{text-wrap:balance}#root,#__next{isolation:isolate}:host{display:flex;flex-direction:row;width:100vw;height:100vh;margin:0px;padding:0px}.validation-tag-wrapper{position:fixed;top:0.375rem;right:0.375rem;z-index:2000}#my-field-panel{position:relative;height:calc(100% - 4.313rem)}.leftBox{position:relative;border-radius:16px;border:1px solid var(--gray-30, #edeff2);background:var(--white, #fff);box-shadow:0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);width:21.25rem;margin:1rem;min-width:21.25rem;max-height:100%;z-index:1000;left:0;top:0}.left-box-inner{position:relative;display:flex;height:100%;padding:0.75rem;gap:0.75rem}.rightBox{width:200px;border:1px gray solid;width:470px;min-width:390px;padding:4px;font-family:inherit}.toolbox{display:flex;flex-direction:column;width:100%;height:100%;border-radius:8px;border:1px solid var(--gray-30, #e0e2e5);background:var(--gray-10, #f7f8fa);padding:0.75rem;gap:1rem;overflow-y:auto}.ls-editor-infobox{padding:2px 8px 2px 8px}#pdf-canvas{top:0px;left:0px;width:100px;height:100px;box-shadow:0 8px 32px 0 rgba(0, 0, 0, 0.12)}#ls-mid-area{position:absolute;top:0;left:0;display:flex;flex-direction:column;align-items:center;width:100vw;height:100%}.document-frame-wrapper{display:flex;flex-direction:column;justify-content:start;align-items:start;overflow:visible;max-height:100%;width:100vw;overflow:scroll;padding:5rem 380px 2rem 380px}#ls-document-frame{position:relative;height:98vh;margin-right:auto;margin-left:auto}.prevButton{position:relative;bottom:30px}.nextButton{position:relative;bottom:30px}.fieldBox{z-index:1000}#ls-box-selector{position:absolute;visibility:hidden;background-color:transparent;border:1px rgba(71, 71, 71, 0.716) dashed}#ls-editor-form{display:flex;width:100vw;height:calc(100vh - 2.25rem);position:relative;background:var(--gray-10, #f7f8fa);box-shadow:0 2px 6px 0 rgba(0, 0, 0, 0.04) inset, 0 10px 15px 0 rgba(0, 0, 0, 0.04) inset}.hidden{visibility:hidden;display:none;width:0px}.toolbox-section-title{color:var(--gray-100, #45484d);font-size:1.125rem;font-style:normal;font-weight:500;line-height:1.75rem;}.toolbox-section-description{color:var(--gray-80, #5e6066);font-size:0.75rem;font-style:normal;font-weight:400;line-height:1rem}.fields-box{display:flex;flex-direction:column;gap:0.75rem}.page-header{display:flex;height:2.25rem;gap:0.5rem;padding:0.25rem 0.75rem;justify-content:center;align-items:center}.header-text-1{color:var(--gray-100, #45484d);font-size:0.875rem;font-style:normal;font-weight:500;line-height:1.25rem}.header-text-2{color:var(--gray-100, #45484d);font-size:0.875rem;font-style:normal;font-weight:400;line-height:1.25rem}.properties-header{display:flex;padding:1rem;gap:0.75rem;align-items:center;border-bottom:1px solid var(--gray-20, #edeff2)}.properties-header-title{color:var(--gray-100, #45484d);width:100%;font-size:1.5rem;font-style:normal;font-weight:500;line-height:2rem;}.properties-header-icon{display:flex;padding:0.5rem;border-radius:0.625rem;background:var(--primary-10, #eff4ff);color:var(--primary-60, #4456f6)}.expand-fields-row{display:flex;align-items:center;gap:0.5rem;padding:0.5rem;cursor:pointer;color:var(--gray-80, #6c6e73);font-size:0.875rem;font-style:normal;font-weight:500;line-height:1.25rem;}.expand-fields-row p{color:var(--gray-100, #45484d);font-size:1rem;font-style:normal;font-weight:500;line-height:1.5rem;}p{color:var(--gray-80, #6c6e73);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)}.button-link,.button-link:hover{all:unset}select{appearance:none;height:36px}.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, #6c6e73)}#selectLeadingIcon{position:absolute;top:50%;left:0.675rem;transform:translateY(-50%);pointer-events:none;color:var(--gray-80, #6c6e73)}.has-leading-icon{padding-left:2.5rem}input,select,textarea{border:1px solid var(--gray-40, #d8d9dc);box-shadow:0 1px 0.125rem rgba(0, 0, 0, 0.05);padding:0.5rem 0.75rem;font-family:var(--font-family);font-size:var(--text-sm);border-radius:0.5rem;color:var(--gray-100, #45484d);font-weight:400}input::placeholder,select::placeholder,textarea::placeholder{color:var(--gray-60, #afb0b2)}input:hover,select:hover,textarea:hover{border-color:var(--gray-50, #c8c9cc);background-color:var(--white, #fff)}input:focus,select:focus,textarea:focus{outline:none;box-shadow:0 0 0 0.25rem var(--primary-40, #79adfc);border-color:var(--primary-60, #4456f6);background-color:var(--white, #fff)}input:active,select:active,textarea:active{border-color:var(--primary-50, #5185ff)}input:disabled,select:disabled,textarea:disabled{cursor:not-allowed;background-color:var(--gray-10, #f7f8fa)}input[type='checkbox']{appearance:none;position:relative;height:1rem;width:1rem;padding:0.25rem;border-radius:var(--radius-sm);border:1px solid #d1d5db;background-color:#ffffff;cursor:pointer}input[type='checkbox']:checked,input[type='checkbox'].indeterminate{background-color:var(--primary-60, #4456f6);border:none}input[type='checkbox']:checked::after{content:'';position:absolute;top:45%;left:50%;transform:translate(-50%, -50%) rotate(-45deg) scale(-1, 1);width:0.5rem;height:0.25rem;border-bottom:0.125rem solid white;border-right:0.125rem solid white}input[type='checkbox'].indeterminate::after{content:'';position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);width:0.5rem;height:0.125rem;background-color:white}input[type='checkbox']:checked:hover,input[type='checkbox'].indeterminate:hover{background-color:var(--primary-70, #2134dc);border:none}input[type='checkbox']:hover{border:1px solid #9ca3af}input[type='checkbox']:focus,input[type='checkbox']:active{outline:none;box-shadow:0 0 0 0.25rem var(--primary-20, #c7ddff);background-color:#f0f4f8}input[type='checkbox']:disabled{background-color:#f3f4f6;outline:none;cursor:not-allowed}input[type='checkbox']:disabled:checked{background-color:#e5e7eb;border:none;outline:none;cursor:not-allowed}.checkbox-container{display:flex;gap:0.5rem;width:100%}.checkbox-label{color:var(--gray-100, #45484d);font-size:1rem;font-style:normal;font-weight:400;line-height:1rem}.form-label{color:var(--gray-100, #45484d);font-size:1rem;font-style:normal;font-weight:500;line-height:1.5rem}.form-field{display:flex;flex-direction:column;gap:0.25rem;width:100%}.field-properties-outer{position:relative;height:100%}.loading-box{display:flex;justify-content:center;align-items:center;width:100%;height:100vh;color:var(--primary-60, #0c7cba)}button{border:0;appearance:button;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;border-radius:var(--radius-lg);background-color:var(--primary-60, #4456f6);color:white;text-transform:capitalize;min-height:2.25rem;min-width:2.25rem}button.tertiaryGrey{border:1px solid var(--gray-40, #d8d9dc);background-color:white;color:var(--gray-80, #787a80)}button.tertiaryGrey:hover{border:1px solid var(--gray-50, #c8c9cc);background:var(--gray-10, #f7f8fa)}.button-group{display:flex;border-radius:0.5rem;border:1px solid var(--gray-30, #e0e2e5);background:var(--white, #ffffff);overflow:clip}.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, #6c6e73)}.button-group button:hover{background:var(--gray-10, #f7f8fa)}.button-group>:first-child{border-radius:0.5rem 0 0 0.5rem}.button-group>:last-child{border-radius:0 0.5rem 0.5rem 0}.button-group>:not(:first-child){border-left:1px solid var(--gray-30, #e0e2e5)}";
|
|
24791
24778
|
|
|
24792
24779
|
pdfExports.GlobalWorkerOptions.workerSrc = 'https://cdnjs.cloudflare.com/ajax/libs/pdf.js/2.5.207/pdf.worker.min.js';
|
|
@@ -25232,7 +25219,14 @@ const LsDocumentViewer = class {
|
|
|
25232
25219
|
event.preventDefault();
|
|
25233
25220
|
});
|
|
25234
25221
|
dropTarget.addEventListener('drop', mouseDrop.bind(this));
|
|
25235
|
-
|
|
25222
|
+
this.generateFields();
|
|
25223
|
+
}
|
|
25224
|
+
// Generate all the field HTML elements that are required (for every page)
|
|
25225
|
+
generateFields(clearExisting = true) {
|
|
25226
|
+
if (clearExisting) {
|
|
25227
|
+
const fields = this.component.shadowRoot.querySelectorAll('ls-editor-field');
|
|
25228
|
+
fields.forEach(fi => this.component.shadowRoot.getElementById('ls-document-frame').removeChild(fi));
|
|
25229
|
+
}
|
|
25236
25230
|
this._template.elementConnection.templateElements.forEach(te => {
|
|
25237
25231
|
addField.bind(this)(this.component.shadowRoot.getElementById('ls-document-frame'), this.prepareElement(te));
|
|
25238
25232
|
});
|
|
@@ -25275,7 +25269,7 @@ const LsDocumentViewer = class {
|
|
|
25275
25269
|
});
|
|
25276
25270
|
}
|
|
25277
25271
|
render() {
|
|
25278
|
-
return (index.h(index.Host, { key: '
|
|
25272
|
+
return (index.h(index.Host, { key: '81fb162f62eee08b7e9608ab01a662b8692ced19' }, index.h(index.h.Fragment, null, this.isLoading && index.h("ls-page-loader", { key: '8d72275abac9bf7b7c60dc0f3bf359b61da2bfa8' }), index.h("div", { key: '9403504084bfeee0569896524971a8b0b1e7a227', class: 'validation-tag-wrapper' }, index.h("ls-validation-tag", { key: '989610b8316de91ccbde6ad01c13e8159edc584c', validationErrors: this.validationErrors })), index.h("div", { key: 'f22196cecc91276d4df7c632b5c4a9412f2a53eb', class: "page-header" }, index.h("p", { key: '5bda0c223072135232f648d28e59bd79145fe349', class: "header-text-1" }, "Template Creation"), index.h("p", { key: '129f5a82ea8e5afb4a992687e121bde326908b97' }, "/"), index.h("p", { key: 'e1f00b84543a3e8a9baee098742c6519d7d2bcde', class: "header-text-2" }, this._template?.title)), index.h("form", { key: '38f0cbd650c8f45a4b415ee20b5fc2dd73345442', id: "ls-editor-form" }, this.showtoolbox === true ? (index.h("div", { id: "ls-left-box", class: "leftBox" }, index.h("div", { class: !this.selected || this.selected.length === 0 ? 'left-box-inner' : 'hidden' }, index.h("ls-feature-column", { onManage: manager => {
|
|
25279
25273
|
if (manager.detail === 'document') {
|
|
25280
25274
|
var documentManager = this.component.shadowRoot.getElementById('ls-document-options');
|
|
25281
25275
|
documentManager.template = this._template;
|
|
@@ -25314,7 +25308,7 @@ const LsDocumentViewer = class {
|
|
|
25314
25308
|
} })))), index.h("ls-participant-manager", { id: "ls-participant-manager", class: this.manager === 'participant' ? 'toolbox' : 'hidden', editor: this }), index.h("ls-document-options", { id: "ls-document-options", class: this.manager === 'document' ? 'toolbox' : 'hidden' })), !this.displayTable && (index.h("div", { class: this.selected.length > 0 ? 'field-properties-outer' : 'hidden' }, index.h("div", { class: 'properties-header' }, index.h("div", { class: 'properties-header-icon' }, index.h("ls-icon", { name: "pre-filled-content" })), index.h("h1", { class: 'properties-header-title' }, "Field Properties"), index.h("button", { class: 'tertiaryGrey', onClick: e => {
|
|
25315
25309
|
this.selected = [];
|
|
25316
25310
|
e.preventDefault();
|
|
25317
|
-
} }, index.h("ls-icon", { name: "x", size: "20" }))), index.h("ls-field-properties", { id: "my-field-panel" }), index.h("slot", null))))) : (index.h(index.h.Fragment, null)), index.h("ls-toolbar", { key: '
|
|
25311
|
+
} }, index.h("ls-icon", { name: "x", size: "20" }))), index.h("ls-field-properties", { id: "my-field-panel" }), index.h("slot", null))))) : (index.h(index.h.Fragment, null)), index.h("ls-toolbar", { key: 'f64bad623489b4f7b56c08d7c1e1fbd2264df854', id: "ls-toolbar", template: this._template, editor: this, groupInfo: this.groupInfo }), index.h("div", { key: 'b1d691f755d4ea7a913ab5bf3b6d22bcc02e9464', id: "ls-mid-area" }, index.h("div", { key: '985b96b3b721d206a0e099ffef062f502d633b32', class: 'document-frame-wrapper', id: "document-frame-wrapper" }, index.h("div", { key: '85db5a30105e084d55e962c1a9d74b267d2a332f', id: "ls-document-frame" }, index.h("canvas", { key: '39041d335b556218f7fb2718e26d018ec596afe7', id: "pdf-canvas", class: this.displayTable || this.isLoading ? 'hidden' : '' }), index.h("ls-editor-table", { key: '1580ed3da6d3fd5a5ca81b0da0fb733e6a6ced1f', editor: this, class: this.displayTable ? '' : 'hidden' }), index.h("div", { key: '6282c570b3d0051adcf46642999516694f3f7996', id: "ls-box-selector" }))), index.h("ls-statusbar", { key: '236c388bea733eb6eef71e3ae0f8e97e20822261', editor: this }))))));
|
|
25318
25312
|
}
|
|
25319
25313
|
static get watchers() { return {
|
|
25320
25314
|
"mode": ["modeHandler"],
|