legalesign-document-viewer 0.2.14 → 0.2.15
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/loader.cjs.js +1 -1
- package/dist/cjs/ls-document-options_44.cjs.entry.js +89 -87
- package/dist/cjs/ls-document-options_44.cjs.entry.js.map +1 -1
- package/dist/cjs/ls-document-viewer.cjs.js +1 -1
- package/dist/collection/components/ls-document-viewer/ls-document-viewer.js +38 -3
- package/dist/collection/components/ls-document-viewer/ls-document-viewer.js.map +1 -1
- package/dist/collection/components/ls-document-viewer/validator.js +22 -0
- package/dist/collection/components/ls-document-viewer/validator.js.map +1 -0
- package/dist/collection/components/ls-participant-manager/ls-participant-manager.js +26 -24
- package/dist/collection/components/ls-participant-manager/ls-participant-manager.js.map +1 -1
- package/dist/collection/components/ls-participant-select/ls-participant-select.js +37 -93
- package/dist/collection/components/ls-participant-select/ls-participant-select.js.map +1 -1
- package/dist/collection/components/ls-toolbar/ls-toolbar.js +26 -4
- package/dist/collection/components/ls-toolbar/ls-toolbar.js.map +1 -1
- package/dist/collection/components/ls-validation-tag/ls-validation-tag.js +30 -24
- package/dist/collection/components/ls-validation-tag/ls-validation-tag.js.map +1 -1
- package/dist/collection/types/LSApiRole.js.map +1 -1
- package/dist/collection/types/ValidationError.js +2 -0
- package/dist/collection/types/ValidationError.js.map +1 -0
- package/dist/components/ls-document-viewer.js +58 -8
- package/dist/components/ls-document-viewer.js.map +1 -1
- package/dist/components/ls-participant-manager.js +1 -1
- package/dist/components/ls-participant-select.js +1 -1
- package/dist/components/ls-toolbar.js +1 -1
- package/dist/components/ls-validation-tag.js +1 -1
- package/dist/components/{p-DNM7Lfws.js → p-BtPUPO2J.js} +7 -25
- package/dist/components/p-BtPUPO2J.js.map +1 -0
- package/dist/components/{p-BWUaoAUW.js → p-CCuQT_wR.js} +19 -50
- package/dist/components/p-CCuQT_wR.js.map +1 -0
- package/dist/components/{p-DDgdZW1H.js → p-D8LM7Ont.js} +15 -15
- package/dist/components/p-D8LM7Ont.js.map +1 -0
- package/dist/components/{p-CEmokO_x.js → p-Da9tAlUo.js} +11 -7
- package/dist/components/p-Da9tAlUo.js.map +1 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/ls-document-options_44.entry.js +89 -87
- package/dist/esm/ls-document-options_44.entry.js.map +1 -1
- package/dist/esm/ls-document-viewer.js +1 -1
- package/dist/ls-document-viewer/index.esm.js.map +1 -1
- package/dist/ls-document-viewer/ls-document-viewer.esm.js +1 -1
- package/dist/ls-document-viewer/ls-document-viewer.esm.js.map +1 -1
- package/dist/ls-document-viewer/{p-97ddb067.entry.js → p-436f10b8.entry.js} +5 -5
- package/dist/ls-document-viewer/p-436f10b8.entry.js.map +1 -0
- package/dist/types/components/ls-document-viewer/ls-document-viewer.d.ts +8 -0
- package/dist/types/components/ls-document-viewer/validator.d.ts +8 -0
- package/dist/types/components/ls-participant-manager/ls-participant-manager.d.ts +6 -3
- package/dist/types/components/ls-participant-select/ls-participant-select.d.ts +10 -9
- package/dist/types/components/ls-toolbar/ls-toolbar.d.ts +6 -1
- package/dist/types/components/ls-validation-tag/ls-validation-tag.d.ts +3 -2
- package/dist/types/components.d.ts +32 -22
- package/dist/types/types/LSApiRole.d.ts +1 -1
- package/dist/types/types/ValidationError.d.ts +7 -0
- package/package.json +1 -1
- package/dist/components/p-BWUaoAUW.js.map +0 -1
- package/dist/components/p-CEmokO_x.js.map +0 -1
- package/dist/components/p-DDgdZW1H.js.map +0 -1
- package/dist/components/p-DNM7Lfws.js.map +0 -1
- package/dist/ls-document-viewer/clsx-ChV9xqsO.js.map +0 -1
- package/dist/ls-document-viewer/defaultFieldIcons-Cp3IxvzK.js.map +0 -1
- package/dist/ls-document-viewer/defaultPalette-CwCWCxsI.js.map +0 -1
- package/dist/ls-document-viewer/editorUtils-Dh0dNla7.js.map +0 -1
- package/dist/ls-document-viewer/index-Db-CNFwu.js.map +0 -1
- package/dist/ls-document-viewer/p-97ddb067.entry.js.map +0 -1
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -5,7 +5,7 @@ var index = require('./index-DqDUg8D7.js');
|
|
|
5
5
|
const defineCustomElements = async (win, options) => {
|
|
6
6
|
if (typeof window === 'undefined') return undefined;
|
|
7
7
|
await index.globalScripts();
|
|
8
|
-
return index.bootstrapLazy([["ls-document-options_44.cjs",[[257,"ls-document-viewer",{"template":[1],"token":[1],"userpool":[1],"endpoint":[1],"templateid":[1],"zoom":[1026],"pageNum":[1026,"page-num"],"signer":[1026],"groupInfo":[1032,"group-info"],"mode":[1],"manager":[1025],"displayTable":[1028,"display-table"],"showtoolbox":[4],"showtoolbar":[4],"showstatusbar":[4],"showpagepreview":[4],"showrightpanel":[4],"expandfields":[4],"readonly":[4],"showtableview":[4],"toolboxFilter":[1,"toolbox-filter"],"_template":[32],"selected":[32],"pageNext":[64],"pagePrev":[64],"setZoom":[64]},[[0,"mutate","mutateHandler"],[0,"update","updateHandler"],[0,"selectFields","selectFieldsHandler"],[0,"roleChange","roleHandler"]],{"mode":["modeHandler"],"displayTable":["tableViewHandler"]}],[257,"ls-field-properties",{"dataItem":[16,"data-item"]}],[257,"ls-document-options",{"template":[16]},null,{"template":["selectedHandler"]}],[257,"ls-participant-manager",{"editor":[16],"template":[16]}],[257,"ls-toolbar",{"dataItem":[1040,"data-item"],"template":[16],"editor":[1040]}],[257,"ls-editor-field",{"dataItem":[1040,"data-item"],"selected":[4],"readonly":[4],"type":[1],"page":[16],"isEditing":[32],"heldEdge":[32],"isEdgeDragging":[32],"innerValue":[32]},[[0,"keydown","handleInput"],[3,"mousemove","handleMouseMove"],[2,"dblclick","handleDoubleClick"],[0,"dragstart","handleDragStart"]],{"selected":["watchSelectedHandler"]}],[257,"ls-feature-column",{"manager":[1025]}],[257,"ls-statusbar",{"zoom":[1026],"editor":[16]}],[257,"ls-toolbox-field",{"formElementType":[1,"form-element-type"],"elementType":[1,"element-type"],"validation":[2],"label":[1],"icon":[1],"defaultHeight":[2,"default-height"],"defaultWidth":[2,"default-width"],"signer":[2]},[[1,"dragstart","handleDragStart"],[0,"keydown","handleKeyDown"]]],[257,"ls-validation-tag",{"
|
|
8
|
+
return index.bootstrapLazy([["ls-document-options_44.cjs",[[257,"ls-document-viewer",{"template":[1],"token":[1],"userpool":[1],"endpoint":[1],"templateid":[1],"zoom":[1026],"pageNum":[1026,"page-num"],"signer":[1026],"groupInfo":[1032,"group-info"],"mode":[1],"manager":[1025],"displayTable":[1028,"display-table"],"showtoolbox":[4],"showtoolbar":[4],"showstatusbar":[4],"showpagepreview":[4],"showrightpanel":[4],"expandfields":[4],"readonly":[4],"showtableview":[4],"toolboxFilter":[1,"toolbox-filter"],"_template":[32],"validationErrors":[32],"status":[32],"selected":[32],"pageNext":[64],"pagePrev":[64],"setZoom":[64]},[[0,"mutate","mutateHandler"],[0,"update","updateHandler"],[0,"addParticipant","addParticpantHandler"],[0,"selectFields","selectFieldsHandler"],[0,"roleChange","roleHandler"]],{"mode":["modeHandler"],"displayTable":["tableViewHandler"]}],[257,"ls-field-properties",{"dataItem":[16,"data-item"]}],[257,"ls-document-options",{"template":[16]},null,{"template":["selectedHandler"]}],[257,"ls-participant-manager",{"editor":[16],"template":[16]}],[257,"ls-toolbar",{"dataItem":[1040,"data-item"],"groupInfo":[16,"group-info"],"template":[16],"editor":[1040]}],[257,"ls-editor-field",{"dataItem":[1040,"data-item"],"selected":[4],"readonly":[4],"type":[1],"page":[16],"isEditing":[32],"heldEdge":[32],"isEdgeDragging":[32],"innerValue":[32]},[[0,"keydown","handleInput"],[3,"mousemove","handleMouseMove"],[2,"dblclick","handleDoubleClick"],[0,"dragstart","handleDragStart"]],{"selected":["watchSelectedHandler"]}],[257,"ls-feature-column",{"manager":[1025]}],[257,"ls-statusbar",{"zoom":[1026],"editor":[16]}],[257,"ls-toolbox-field",{"formElementType":[1,"form-element-type"],"elementType":[1,"element-type"],"validation":[2],"label":[1],"icon":[1],"defaultHeight":[2,"default-height"],"defaultWidth":[2,"default-width"],"signer":[2]},[[1,"dragstart","handleDragStart"],[0,"keydown","handleKeyDown"]]],[257,"ls-validation-tag",{"status":[1025],"validationErrors":[1040,"validation-errors"],"isExpanded":[1028,"is-expanded"]}],[257,"ls-editor-table",{"editor":[16]}],[257,"ls-field-properties-date",{"dataItem":[16,"data-item"]}],[257,"ls-field-properties-email",{"dataItem":[16,"data-item"]}],[257,"ls-field-properties-file",{"dataItem":[16,"data-item"]}],[257,"ls-field-properties-general",{"dataItem":[16,"data-item"]}],[257,"ls-field-properties-image",{"dataItem":[16,"data-item"]}],[257,"ls-field-properties-number",{"dataItem":[16,"data-item"]}],[257,"ls-field-properties-signature",{"dataItem":[16,"data-item"]}],[257,"ls-field-properties-text",{"dataItem":[16,"data-item"]}],[257,"ls-field-properties-multiple",{"dataItem":[16,"data-item"]}],[260,"ls-formfield",{"name":[1],"fieldId":[1,"field-id"],"label":[1],"as":[1],"value":[1032],"placeholder":[1],"descriptionText":[1,"description-text"],"errorText":[1,"error-text"],"aria":[1],"inputRef":[1,"input-ref"],"infoTooltipText":[1,"info-tooltip-text"],"hoverTooltipText":[1,"hover-tooltip-text"],"disabled":[4],"extraLabel":[1,"extra-label"],"required":[4],"valid":[4],"dirty":[4],"count":[4],"countMax":[2,"count-max"],"buttonClick":[16,"button-click"],"buttonIcon":[1,"button-icon"],"labelIcon":[1,"label-icon"],"fieldIcon":[1,"field-icon"],"_value":[32]},null,{"value":["valueWatcher"]}],[257,"ls-field-properties-autosign",{"dataItem":[16,"data-item"]}],[257,"ls-participant-card",{"signer":[16],"index":[2],"editable":[1028],"template":[16]},null,{"editable":["modeHandler"]}],[257,"ls-field-format",{"dataItem":[1040,"data-item"]}],[257,"ls-participant-select",{"dataItem":[1040,"data-item"],"selected":[1025],"roles":[16],"selectedRole":[32],"isOpen":[32]}],[257,"ls-field-alignment",{"dataItem":[1040,"data-item"]}],[257,"ls-field-distribute",{"dataItem":[1040,"data-item"]}],[257,"ls-field-size",{"dataItem":[1040,"data-item"]}],[257,"ls-number-input",{"type":[1],"name":[1],"value":[1026],"placeholder":[1],"aria":[1],"inputRef":[1,"input-ref"],"disabled":[4],"required":[4],"valid":[4],"dirty":[4],"countMax":[2,"count-max"],"buttonClick":[8,"button-click"],"buttonIcon":[1,"button-icon"],"fieldIcon":[1,"field-icon"]}],[256,"ls-radio-input",{"radioId":[1,"radio-id"],"label":[1],"icon":[1],"name":[1],"checked":[4],"disabled":[4],"customStyle":[16,"custom-style"]}],[260,"ls-select-input",{"name":[1],"value":[1],"aria":[1],"inputRef":[1,"input-ref"],"disabled":[4],"displayOnly":[4,"display-only"],"required":[4],"valid":[4],"dirty":[4],"buttonClick":[8,"button-click"],"buttonIcon":[1,"button-icon"],"fieldIcon":[1,"field-icon"]}],[257,"ls-text-input",{"type":[1],"name":[1],"value":[1025],"placeholder":[1],"aria":[1],"inputRef":[1,"input-ref"],"disabled":[4],"required":[4],"valid":[4],"dirty":[4],"countMax":[2,"count-max"],"buttonClick":[8,"button-click"],"buttonIcon":[1,"button-icon"],"fieldIcon":[1,"field-icon"],"showPassword":[32]}],[257,"ls-textarea-input",{"name":[1],"value":[1],"placeholder":[1],"aria":[1],"inputRef":[1,"input-ref"],"disabled":[4],"displayOnly":[4,"display-only"],"required":[4],"valid":[4],"dirty":[4],"countMax":[2,"count-max"],"buttonClick":[8,"button-click"],"buttonIcon":[1,"button-icon"],"fieldIcon":[1,"field-icon"]}],[257,"ls-field-content",{"dataItem":[1040,"data-item"],"showValidationTypes":[4,"show-validation-types"]}],[257,"ls-field-properties-advanced",{"dataItem":[1040,"data-item"],"expanded":[1028]}],[257,"ls-field-placement",{"dataItem":[1040,"data-item"]}],[257,"ls-field-type-display",{"assignee":[2],"fieldType":[1,"field-type"]}],[257,"ls-field-properties-container",{"dataItem":[16,"data-item"],"tabs":[16],"selectedTab":[1,"selected-tab"]}],[257,"ls-field-dimensions",{"dataItem":[1040,"data-item"]}],[257,"ls-field-footer",{"dataItem":[1040,"data-item"]}],[257,"ls-input-wrapper",{"leadingIcon":[1,"leading-icon"],"select":[4]}],[257,"ls-props-section",{"sectionTitle":[1,"section-title"],"sectionDescription":[1,"section-description"],"row":[4]}],[260,"ls-toggle",{"checked":[1028]}],[257,"ls-icon",{"name":[1],"solid":[4],"size":[1],"customStyle":[16,"custom-style"]}]]]], options);
|
|
9
9
|
};
|
|
10
10
|
|
|
11
11
|
exports.setNonce = index.setNonce;
|
|
@@ -24701,6 +24701,28 @@ const getGroupData = (id) => {
|
|
|
24701
24701
|
`;
|
|
24702
24702
|
};
|
|
24703
24703
|
|
|
24704
|
+
/**
|
|
24705
|
+
* This module contains all the rules required to mark a template
|
|
24706
|
+
* as valid.
|
|
24707
|
+
*
|
|
24708
|
+
*/
|
|
24709
|
+
function validate(t) {
|
|
24710
|
+
var errors = [];
|
|
24711
|
+
console.log(t);
|
|
24712
|
+
// Check for missing signatures
|
|
24713
|
+
t.roles.forEach(tr => {
|
|
24714
|
+
if (t.elementConnection.templateElements.filter(e => e.formElementType === 'signature' && e.signer === tr.signerIndex).length === 0) {
|
|
24715
|
+
errors.push({
|
|
24716
|
+
id: tr.id,
|
|
24717
|
+
title: 'Missing signature.',
|
|
24718
|
+
description: `{tr.name} is missing a signature.`,
|
|
24719
|
+
role: tr
|
|
24720
|
+
});
|
|
24721
|
+
}
|
|
24722
|
+
});
|
|
24723
|
+
return errors;
|
|
24724
|
+
}
|
|
24725
|
+
|
|
24704
24726
|
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}#ls-mid-area{position:absolute;top:0;left:0;display:flex;flex-direction:column;align-items:center;width:100vw}.document-frame-wrapper{display:flex;flex-direction:column;justify-content:start;align-items:center;overflow:visible;max-height:100%;width:100vw;overflow:scroll}#ls-document-frame{position:relative;height:98vh}.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)}";
|
|
24705
24727
|
|
|
24706
24728
|
pdfExports.GlobalWorkerOptions.workerSrc = 'https://cdnjs.cloudflare.com/ajax/libs/pdf.js/2.5.207/pdf.worker.min.js';
|
|
@@ -24768,6 +24790,8 @@ const LsDocumentViewer = class {
|
|
|
24768
24790
|
pageNum = 1; // hardcoded to start at the page 1
|
|
24769
24791
|
signer = 0; // hardcoded to start at the page 1
|
|
24770
24792
|
_template;
|
|
24793
|
+
validationErrors = [];
|
|
24794
|
+
status;
|
|
24771
24795
|
groupInfo;
|
|
24772
24796
|
selected;
|
|
24773
24797
|
/**
|
|
@@ -24881,6 +24905,27 @@ const LsDocumentViewer = class {
|
|
|
24881
24905
|
if (event.detail)
|
|
24882
24906
|
event.detail.forEach(fx => this.syncChange(fx));
|
|
24883
24907
|
}
|
|
24908
|
+
// Updates are internal event between LS controls not to be confused with mutate
|
|
24909
|
+
addParticpantHandler(event) {
|
|
24910
|
+
const defaultExperience = this.groupInfo.experienceConnection.experiences.find(x => x.defaultExperience === true);
|
|
24911
|
+
const data = [
|
|
24912
|
+
{
|
|
24913
|
+
action: 'create',
|
|
24914
|
+
data: {
|
|
24915
|
+
id: btoa('rol' + crypto.randomUUID()),
|
|
24916
|
+
name: 'Signer ' + (this._template.roles.length + 1),
|
|
24917
|
+
roleType: event.detail.type,
|
|
24918
|
+
signerIndex: this._template.roles.length + 1,
|
|
24919
|
+
ordinal: this._template.roles.length,
|
|
24920
|
+
signerParent: event.detail.parent,
|
|
24921
|
+
experience: defaultExperience.id,
|
|
24922
|
+
templateId: this._template.id,
|
|
24923
|
+
},
|
|
24924
|
+
},
|
|
24925
|
+
];
|
|
24926
|
+
this.update.emit(data);
|
|
24927
|
+
this.mutate.emit(data);
|
|
24928
|
+
}
|
|
24884
24929
|
// Send selection changes to bars and panels if in use.
|
|
24885
24930
|
selectFieldsHandler(event) {
|
|
24886
24931
|
console.log(event.detail);
|
|
@@ -24890,6 +24935,8 @@ const LsDocumentViewer = class {
|
|
|
24890
24935
|
var propPanel = this.component.shadowRoot.getElementById('my-field-panel');
|
|
24891
24936
|
if (propPanel)
|
|
24892
24937
|
propPanel.dataItem = event.detail;
|
|
24938
|
+
//Revalidate
|
|
24939
|
+
this.validationErrors = validate.bind(this)(this._template);
|
|
24893
24940
|
}
|
|
24894
24941
|
// Send role selection changes to bars and panels
|
|
24895
24942
|
roleHandler(event) {
|
|
@@ -24973,7 +25020,6 @@ const LsDocumentViewer = class {
|
|
|
24973
25020
|
elementConnection: { ...newTemplate.elementConnection, templateElements: fields },
|
|
24974
25021
|
roles: preparedRoles,
|
|
24975
25022
|
};
|
|
24976
|
-
console.log(this._template);
|
|
24977
25023
|
}
|
|
24978
25024
|
/**
|
|
24979
25025
|
* Render the page based on pageNumber
|
|
@@ -25105,6 +25151,8 @@ const LsDocumentViewer = class {
|
|
|
25105
25151
|
const resultGroup = (await this.adapter.execute(this.token, getGroupData(this._template.groupId)));
|
|
25106
25152
|
this.groupInfo = resultGroup.group;
|
|
25107
25153
|
this.initViewer();
|
|
25154
|
+
//Revalidate
|
|
25155
|
+
this.validationErrors = validate.bind(this)(this._template);
|
|
25108
25156
|
}
|
|
25109
25157
|
catch (e) {
|
|
25110
25158
|
console.error('Your access token is invalid.', e);
|
|
@@ -25120,7 +25168,7 @@ const LsDocumentViewer = class {
|
|
|
25120
25168
|
box.scrollLeft = (box.scrollWidth - box.clientWidth) / 2;
|
|
25121
25169
|
}
|
|
25122
25170
|
render() {
|
|
25123
|
-
return (index.h(index.Host, { key: '
|
|
25171
|
+
return (index.h(index.Host, { key: '507862ca8ac9b4fb78e2171652d85f670efd7154' }, index.h(index.h.Fragment, null, index.h("div", { key: '2fc1ec028c5b5812adb0547d9e98f5ae3ca30389', class: 'validation-tag-wrapper' }, index.h("ls-validation-tag", { key: '966f14b697692e59d186be75a9ff42a5607e9197', validationErrors: this.validationErrors })), index.h("div", { key: 'e919a403e4aa9dc3d33aa8b8d158144ce6187f26', class: "page-header" }, index.h("p", { key: '5ca5551bb9d2a340db2295e9a051fd419509fe86', class: "header-text-1" }, "Template Creation"), index.h("p", { key: 'c0bad3a3c1df4bf9649b580bacd135a549047965' }, "/"), index.h("p", { key: '1fb838bea78bdac7716308cc99dc342791adf786', class: "header-text-2" }, this._template?.title)), index.h("form", { key: 'f1514a6d78dd8ce1416d00e6eca88cb39739a7af', id: "ls-editor-form" }, this.showtoolbox === true ? (index.h("div", { class: "leftBox" }, index.h("div", { class: !this.selected || this.selected.length === 0 ? 'left-box-inner' : 'hidden' }, index.h("ls-feature-column", { onManage: manager => {
|
|
25124
25172
|
if (manager.detail === 'document') {
|
|
25125
25173
|
var documentManager = this.component.shadowRoot.getElementById('ls-document-options');
|
|
25126
25174
|
documentManager.template = this._template;
|
|
@@ -25133,7 +25181,7 @@ const LsDocumentViewer = class {
|
|
|
25133
25181
|
} }), index.h("div", { id: "ls-toolbox", class: this.manager === 'toolbox' ? 'toolbox' : 'hidden' }, index.h("div", { class: "ls-editor-infobox" }, index.h("h2", { class: "toolbox-section-title" }, "Participant Fields"), index.h("p", { class: "toolbox-section-description" }, "Select and Click to place Signature fields where you\u2019d like on the Document.")), index.h("div", { class: "fields-box" }, this.signer > 0 ? (index.h("ls-toolbox-field", { elementType: "signature", formElementType: "signature", label: "Signature", defaultHeight: 27, defaultWidth: 120, validation: 0, icon: "signature", signer: this.signer })) : (index.h("ls-toolbox-field", { elementType: "auto sign", formElementType: "auto sign", label: "Auto Sign", defaultHeight: 27, defaultWidth: 120, validation: 3000, icon: "auto-sign", signer: this.signer })), index.h("ls-toolbox-field", { elementType: "initials", formElementType: "initials", label: "Initials", defaultHeight: 27, defaultWidth: 120, validation: 2000, icon: "initials", signer: this.signer }), index.h("ls-toolbox-field", { elementType: "date", formElementType: "date", label: "Date", defaultHeight: 27, defaultWidth: 80, validation: 2, icon: "calender", signer: this.signer }), index.h("ls-toolbox-field", { elementType: "signing date", formElementType: "signing date", label: "Signing Date", defaultHeight: 27, defaultWidth: 120, validation: 30, icon: "auto-date", signer: this.signer }), index.h("ls-toolbox-field", { elementType: "email", formElementType: "email", label: "Email", defaultHeight: 27, defaultWidth: 120, validation: 1, icon: "at-symbol", signer: this.signer }), index.h("ls-toolbox-field", { elementType: "text", formElementType: "text", label: "Text", defaultHeight: 27, defaultWidth: 100, validation: 0, icon: "text", signer: this.signer }), index.h("div", { class: 'expand-fields-row', onClick: () => (this.expandfields = !this.expandfields) }, index.h("ls-icon", { name: this.expandfields ? 'expand' : 'collapse', size: "20", solid: true }), index.h("p", null, "More Field Types")), this.expandfields && (index.h("div", { class: "fields-box" }, index.h("ls-toolbox-field", { elementType: "number", formElementType: "number", label: "Number", defaultHeight: 27, defaultWidth: 80, validation: 50, icon: "hashtag", signer: this.signer }), index.h("ls-toolbox-field", { elementType: "checkbox", formElementType: "checkbox", label: "Checkbox", defaultHeight: 27, defaultWidth: 27, validation: 25, icon: "check", signer: this.signer }), index.h("ls-toolbox-field", { elementType: "regex", formElementType: "regex", label: "Regex", defaultHeight: 27, defaultWidth: 120, validation: 93, icon: "code", signer: this.signer }), index.h("ls-toolbox-field", { elementType: "image", formElementType: "image", label: "Image", defaultHeight: 27, defaultWidth: 120, validation: 90, icon: "photograph", signer: this.signer }), index.h("ls-toolbox-field", { elementType: "file", formElementType: "file", label: "File", defaultHeight: 27, defaultWidth: 120, validation: 74, icon: "upload", signer: this.signer }))))), 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.showrightpanel && !this.displayTable && (index.h("div", { class: this.selected && 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 => {
|
|
25134
25182
|
this.selected = [];
|
|
25135
25183
|
e.preventDefault();
|
|
25136
|
-
} }, 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: '
|
|
25184
|
+
} }, 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: '48fd636a4f58a2d1cf69974df2ddd18cbab92470', id: "ls-toolbar", dataItem: this.selected ? this.selected.map(s => s.dataItem) : null, template: this._template, editor: this, groupInfo: this.groupInfo }), index.h("div", { key: 'f9bc9ea4748bffa5e0ff189292fa739c74b3d348', id: "ls-mid-area" }, index.h("div", { key: '01daa94f4b7c941a6a409b50dc13c353f3fc9110', class: 'document-frame-wrapper', id: "document-frame-wrapper" }, index.h("div", { key: '1cc60b24c260bbeea5a649b1190b3e2ce0303409', id: "ls-document-frame" }, index.h("canvas", { key: '90d2df545d6fd2e0e10980d16dcb5e7302c85cfa', id: "pdf-canvas", class: this.displayTable ? 'hidden' : '' }), index.h("ls-editor-table", { key: '36ecce266e1f0d3951cae62e64664fb19f5438f1', editor: this, class: this.displayTable ? '' : 'hidden' }), index.h("div", { key: 'c911b0de65321ff3af541833d88256981d76aef0', id: "ls-box-selector" }))), index.h("ls-statusbar", { key: 'b95ecec60b852b5a31554f8fdf53cb2394472dfb', editor: this }))))));
|
|
25137
25185
|
}
|
|
25138
25186
|
static get watchers() { return {
|
|
25139
25187
|
"mode": ["modeHandler"],
|
|
@@ -33606,10 +33654,11 @@ const LsParticipantManager = class {
|
|
|
33606
33654
|
index.registerInstance(this, hostRef);
|
|
33607
33655
|
this.mutate = index.createEvent(this, "mutate");
|
|
33608
33656
|
this.update = index.createEvent(this, "update");
|
|
33657
|
+
this.addParticipant = index.createEvent(this, "addParticipant");
|
|
33609
33658
|
}
|
|
33610
33659
|
get element() { return index.getElement(this); }
|
|
33611
33660
|
/**
|
|
33612
|
-
* The base
|
|
33661
|
+
* The base editor.
|
|
33613
33662
|
* {LSDocumentViewer}
|
|
33614
33663
|
*/
|
|
33615
33664
|
editor;
|
|
@@ -33620,6 +33669,7 @@ const LsParticipantManager = class {
|
|
|
33620
33669
|
template;
|
|
33621
33670
|
mutate;
|
|
33622
33671
|
update;
|
|
33672
|
+
addParticipant;
|
|
33623
33673
|
selectedHandler(_role) {
|
|
33624
33674
|
//console.log(role, 'participant manager')
|
|
33625
33675
|
}
|
|
@@ -33630,26 +33680,6 @@ const LsParticipantManager = class {
|
|
|
33630
33680
|
swapHandler(role1, role2) {
|
|
33631
33681
|
this.update.emit([{ action: 'swap', data: role1, data2: role2 }]);
|
|
33632
33682
|
}
|
|
33633
|
-
createHandler() {
|
|
33634
|
-
const defaultExperience = this.editor.groupInfo.experienceConnection.experiences.find(x => x.defaultExperience === true);
|
|
33635
|
-
const data = [
|
|
33636
|
-
{
|
|
33637
|
-
action: 'create',
|
|
33638
|
-
data: {
|
|
33639
|
-
id: btoa('rol' + crypto.randomUUID()),
|
|
33640
|
-
name: 'Signer ' + (this.template.roles.length + 1),
|
|
33641
|
-
roleType: 'SIGNER',
|
|
33642
|
-
signerIndex: this.template.roles.length + 1,
|
|
33643
|
-
ordinal: this.template.roles.length,
|
|
33644
|
-
signerParent: null,
|
|
33645
|
-
experience: defaultExperience.id,
|
|
33646
|
-
templateId: this.template.id,
|
|
33647
|
-
},
|
|
33648
|
-
},
|
|
33649
|
-
];
|
|
33650
|
-
this.update.emit(data);
|
|
33651
|
-
this.mutate.emit(data);
|
|
33652
|
-
}
|
|
33653
33683
|
handleOpened(event) {
|
|
33654
33684
|
const participants = this.element.shadowRoot.querySelectorAll('ls-participant-card');
|
|
33655
33685
|
participants.forEach(element => {
|
|
@@ -33658,12 +33688,12 @@ const LsParticipantManager = class {
|
|
|
33658
33688
|
});
|
|
33659
33689
|
}
|
|
33660
33690
|
render() {
|
|
33661
|
-
return (index.h(index.Host, { key: '
|
|
33691
|
+
return (index.h(index.Host, { key: 'fdec2cf424e6ac9bd8845c819644a4a694a4f037' }, index.h("div", { key: 'e481f226b431d469582a4a4e03ac7c0e085bc162', class: "ls-editor-infobox" }, index.h("h2", { key: 'a9af00c32fa3da719ee25dd39cd5283d10e5b5d7', class: "toolbox-section-title" }, "Participants"), index.h("p", { key: '967ed02d5b0da04bd7a79a1d75a1a31d7b8a187c', class: "toolbox-section-description" }, "Select and Click to place Signature fields where you\u2019d like on the Document.")), index.h("div", { key: 'f8a78a0232d44d34469d9e4d1f8dc3fabfbecb62', class: "participant-list" }, this.template &&
|
|
33662
33692
|
this.template?.roles.map((r, index$1) => {
|
|
33663
33693
|
return index.h("ls-participant-card", { signer: r, index: index$1, template: this.template, onOpened: (event) => {
|
|
33664
33694
|
this.handleOpened.bind(this)(event);
|
|
33665
33695
|
} });
|
|
33666
|
-
})), index.h("div", { key: '
|
|
33696
|
+
})), index.h("div", { key: 'db2941a9800fdfb14a8f54bdc927eeb9bdb9e081', class: 'add-participant-button' }, index.h("button", { key: 'b8b70b202cb71d3ebfdaec390b47a8d7e4042ea8', onClick: () => this.addParticipant.emit({ type: 'SIGNER' }) }, index.h("ls-icon", { key: '7f439f448ec683cba6d6a0c69d05ad514c2e0be3', name: "user-add", size: "20", color: "var(--gray-100, #45484D);" }), index.h("p", { key: 'd735648da424f22ed025bd634ca8834635ee4036' }, "Add Participant"))), index.h("slot", { key: '0492d74ebaca1e74bdc28395821f2faafe02b290' })));
|
|
33667
33697
|
}
|
|
33668
33698
|
};
|
|
33669
33699
|
LsParticipantManager.style = lsParticipantManagerCss;
|
|
@@ -33673,16 +33703,15 @@ const lsParticipantSelectCss = ":host{display:inline-block}*{margin:0}.dropdown{
|
|
|
33673
33703
|
const LsParticipantSelect = class {
|
|
33674
33704
|
constructor(hostRef) {
|
|
33675
33705
|
index.registerInstance(this, hostRef);
|
|
33676
|
-
this.mutate = index.createEvent(this, "mutate");
|
|
33677
|
-
this.update = index.createEvent(this, "update");
|
|
33678
33706
|
this.roleChange = index.createEvent(this, "roleChange");
|
|
33707
|
+
this.addParticipant = index.createEvent(this, "addParticipant");
|
|
33679
33708
|
}
|
|
33680
33709
|
dataItem;
|
|
33681
33710
|
/**
|
|
33682
|
-
|
|
33683
|
-
|
|
33684
|
-
|
|
33685
|
-
|
|
33711
|
+
* The id of the currently selected role.
|
|
33712
|
+
* {string}
|
|
33713
|
+
*/
|
|
33714
|
+
selected;
|
|
33686
33715
|
/**
|
|
33687
33716
|
* The currently selected role.
|
|
33688
33717
|
* {number}
|
|
@@ -33694,71 +33723,41 @@ const LsParticipantSelect = class {
|
|
|
33694
33723
|
*/
|
|
33695
33724
|
roles = [];
|
|
33696
33725
|
isOpen = false;
|
|
33697
|
-
mutate;
|
|
33698
|
-
update;
|
|
33699
|
-
// @Element() component: HTMLElement;
|
|
33700
|
-
// Send one or more mutations up the chain
|
|
33701
|
-
// The source of the chain fires the mutation
|
|
33702
|
-
alter(diff) {
|
|
33703
|
-
const diffs = this.dataItem.map(c => {
|
|
33704
|
-
return { action: 'update', data: { ...c, ...diff } };
|
|
33705
|
-
});
|
|
33706
|
-
this.dataItem = diffs.map(d => d.data);
|
|
33707
|
-
this.mutate.emit(diffs);
|
|
33708
|
-
this.update.emit(diffs);
|
|
33709
|
-
}
|
|
33710
33726
|
toggleDropdown = () => {
|
|
33711
33727
|
this.isOpen = !this.isOpen;
|
|
33712
33728
|
};
|
|
33713
33729
|
roleChange;
|
|
33730
|
+
addParticipant;
|
|
33714
33731
|
selectRole(role) {
|
|
33715
33732
|
this.selectedRole = role;
|
|
33716
33733
|
this.isOpen = false;
|
|
33717
33734
|
this.roleChange.emit(role.signerIndex);
|
|
33718
33735
|
}
|
|
33719
33736
|
createHandler() {
|
|
33720
|
-
|
|
33721
|
-
const defaultExperience = this.editor.groupInfo.experienceConnection.experiences.find(x => x.defaultExperience === true);
|
|
33722
|
-
const data = [
|
|
33723
|
-
{
|
|
33724
|
-
action: 'create',
|
|
33725
|
-
data: {
|
|
33726
|
-
id: btoa('rol' + crypto.randomUUID()),
|
|
33727
|
-
name: 'Signer ' + (this.editor._template.roles.length + 1),
|
|
33728
|
-
roleType: 'SIGNER',
|
|
33729
|
-
signerIndex: this.editor._template.roles.length + 1,
|
|
33730
|
-
ordinal: this.editor._template.roles.length,
|
|
33731
|
-
signerParent: null,
|
|
33732
|
-
experience: defaultExperience.id,
|
|
33733
|
-
templateId: this.editor._template.id,
|
|
33734
|
-
},
|
|
33735
|
-
},
|
|
33736
|
-
];
|
|
33737
|
-
this.update.emit(data);
|
|
33738
|
-
this.mutate.emit(data);
|
|
33737
|
+
this.addParticipant.emit({ type: 'SIGNER' });
|
|
33739
33738
|
}
|
|
33740
33739
|
render() {
|
|
33741
|
-
return (index.h(index.Host, { key: '
|
|
33740
|
+
return (index.h(index.Host, { key: 'a9194042094f1851b4a6826f9887fe5eed65d227' }, index.h("div", { key: '6af2f643542a982bdc0036d94acdc7bdea6641ae', class: "dropdown" }, index.h("div", { key: 'd37b58a2b4add18286e66e1a18d9470b5c34c03e', class: "dropdown-header", onClick: this.toggleDropdown }, index.h("svg", { key: 'a95d70fa2b887486746c8c8b525eb753128b3546', width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, index.h("path", { key: 'df3b852f41ef39022c50407439201f82f7270531', d: "M4 0.5H6.5C8.433 0.5 10 2.067 10 4V6.5C10 8.433 8.433 10 6.5 10H4C2.067 10 0.5 8.433 0.5 6.5V4C0.5 2.067 2.067 0.5 4 0.5Z", fill: "#78A3FA", stroke: "#F7F8FA" }), index.h("path", { key: '64ff2545b71aefc500e41f47bc194e9f11d73f98', d: "M13.5 0.5H16C17.933 0.5 19.5 2.067 19.5 4V6.5C19.5 8.433 17.933 10 16 10H13.5C11.567 10 10 8.433 10 6.5V4C10 2.067 11.567 0.5 13.5 0.5Z", fill: "#46DBAA", stroke: "#F7F8FA" }), index.h("path", { key: 'bf2a824f74ab5b473b7d938087ec0f4025bf74c4', d: "M4 10H6.5C8.433 10 10 11.567 10 13.5V16C10 17.933 8.433 19.5 6.5 19.5H4C2.067 19.5 0.5 17.933 0.5 16V13.5C0.5 11.567 2.067 10 4 10Z", fill: "#FAD232", stroke: "#F7F8FA" }), index.h("path", { key: '072da80c707d1350114e2b5c1b196561b98c9d43', d: "M14.75 12.125V14.75M14.75 14.75V17.375M14.75 14.75H17.375M14.75 14.75L12.125 14.75", stroke: "#939599", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" })), index.h("p", { key: '5e0b113113055f7a4e8f09e6b73e8b940c7fd25d', class: 'placing-fields-text' }, "Placing Fields for"), index.h("div", { key: '8f21db74ba5ba69170e4652f4d45ffb4195e3271', class: 'selected-role-label', style: {
|
|
33742
33741
|
background: defaultRolePalette[this.selectedRole?.signerIndex % 100].s20,
|
|
33743
33742
|
color: defaultRolePalette[this.selectedRole?.signerIndex % 100].s80,
|
|
33744
|
-
} }, index.h("ls-icon", { key: '
|
|
33743
|
+
} }, index.h("ls-icon", { key: '3c600d4b48273366e87ee1ae3d618cc33b663572', size: "18", name: this.selectedRole?.roleType === 'SENDER'
|
|
33745
33744
|
? 'user'
|
|
33746
33745
|
: this.selectedRole?.roleType === 'APPROVER'
|
|
33747
33746
|
? 'check-circle'
|
|
33748
33747
|
: this.selectedRole?.roleType === 'WITNESS'
|
|
33749
33748
|
? 'eye'
|
|
33750
33749
|
: 'signature' }), this.selectedRole.name ||
|
|
33751
|
-
(this.selectedRole.signerIndex > 100 ? `Participant ${this.selectedRole.signerIndex - 100} Witness` : `Participant ${this.selectedRole.signerIndex}`)), index.h("button", { key: '
|
|
33750
|
+
(this.selectedRole.signerIndex > 100 ? `Participant ${this.selectedRole.signerIndex - 100} Witness` : `Participant ${this.selectedRole.signerIndex}`)), index.h("button", { key: '0d0327aff5564669b775c1f5661a48a033eead35', class: 'tertiaryGrey expand-button', "aria-haspopup": "listbox", "aria-expanded": this.isOpen }, index.h("ls-icon", { key: 'c122f79923a199c1148bf67f760776a0bf9c6a26', name: "chevron-down" }))), this.isOpen && (index.h("div", { key: '50ab0050cc1d633360d68ef033ff36953867e0be', class: "dropdown-list" }, index.h("div", { key: '55051cfca0375705883963ea4de24e02b70abb02', class: this.selectedRole?.signerIndex === 0 ? 'dropdown-item selected' : 'dropdown-item', style: {
|
|
33752
33751
|
'--background-selected': defaultRolePalette[0].s10,
|
|
33753
33752
|
'--check-icon-selected': defaultRolePalette[0].s50,
|
|
33754
|
-
}, onClick: () => this.selectRole({ signerIndex: 0, name: 'Sender', roleType: 'SENDER' }), onMouseEnter: e => e.currentTarget.querySelector('.check-icon')?.setAttribute('name', 'check-circle'), onMouseLeave: e => e.currentTarget.querySelector('.check-icon')?.setAttribute('name', this.selectedRole?.signerIndex !== 0 ? 'base-circle' : 'check-circle') }, index.h("div", { key: '
|
|
33753
|
+
}, onClick: () => this.selectRole({ signerIndex: 0, name: 'Sender', roleType: 'SENDER' }), onMouseEnter: e => e.currentTarget.querySelector('.check-icon')?.setAttribute('name', 'check-circle'), onMouseLeave: e => e.currentTarget.querySelector('.check-icon')?.setAttribute('name', this.selectedRole?.signerIndex !== 0 ? 'base-circle' : 'check-circle') }, index.h("div", { key: 'e7dbad92c3c450ae8945e38813e161af34922709', class: 'role-icon', style: {
|
|
33755
33754
|
background: defaultRolePalette[0].s50,
|
|
33756
33755
|
color: defaultRolePalette[0].s80,
|
|
33757
|
-
} }, index.h("ls-icon", { key: '
|
|
33756
|
+
} }, index.h("ls-icon", { key: 'c452e6023dd90e16aeb5942e6f941ee8f1b31d41', name: "user" })), index.h("div", { key: '9a7158619df3fbe2a4566fd9cd3f9f0c1d74c71a', class: 'role-text' }, index.h("p", { key: 'ed48bcacc4651af9d40c880c2eda3a02f40f81a8', class: 'role-name', style: {
|
|
33758
33757
|
'--role-name-selected': defaultRolePalette[0].s80,
|
|
33759
|
-
} }, 'Sender'), index.h("p", { key: '
|
|
33758
|
+
} }, 'Sender'), index.h("p", { key: '7ff63fca05d7172b50bf49c48003e4f5cab14e7c', class: 'role-type', style: {
|
|
33760
33759
|
'--role-type-selected': defaultRolePalette[0].s80,
|
|
33761
|
-
} }, "You")), index.h("ls-icon", { key: '
|
|
33760
|
+
} }, "You")), index.h("ls-icon", { key: '31ca94a225ed030fcff70115e3b91295053f8713', class: 'check-icon', name: this.selectedRole?.signerIndex === 0 ? 'check-circle' : 'base-circle', solid: this.selectedRole?.signerIndex === 0 })), this.roles.map(r => (index.h("div", { class: r.signerIndex === this.selectedRole?.signerIndex ? 'dropdown-item selected' : 'dropdown-item', style: {
|
|
33762
33761
|
'--background-selected': defaultRolePalette[r?.signerIndex % 100].s10,
|
|
33763
33762
|
'--check-icon-selected': defaultRolePalette[r?.signerIndex % 100].s50,
|
|
33764
33763
|
}, onClick: () => this.selectRole(r), onMouseEnter: e => e.currentTarget.querySelector('.check-icon')?.setAttribute('name', 'check-circle'), onMouseLeave: e => e.currentTarget
|
|
@@ -33770,10 +33769,10 @@ const LsParticipantSelect = class {
|
|
|
33770
33769
|
'--role-name-selected': defaultRolePalette[r?.signerIndex % 100].s100,
|
|
33771
33770
|
} }, r.name || (r.signerIndex > 100 ? `Participant ${r.signerIndex - 100} Witness` : `Participant ${r.signerIndex}`)), index.h("p", { class: 'role-type', style: {
|
|
33772
33771
|
'--role-type-selected': defaultRolePalette[r?.signerIndex % 100].s80,
|
|
33773
|
-
} }, r.roleType === 'WITNESS' ? 'Witness' : r.roleType === 'APPROVER' ? 'Approver' : 'Signer')), index.h("ls-icon", { class: 'check-icon', name: r.signerIndex === this.selectedRole?.signerIndex ? 'check-circle' : 'base-circle', solid: r.signerIndex === this.selectedRole?.signerIndex })))), index.h("button", { key: '
|
|
33772
|
+
} }, r.roleType === 'WITNESS' ? 'Witness' : r.roleType === 'APPROVER' ? 'Approver' : 'Signer')), index.h("ls-icon", { class: 'check-icon', name: r.signerIndex === this.selectedRole?.signerIndex ? 'check-circle' : 'base-circle', solid: r.signerIndex === this.selectedRole?.signerIndex })))), index.h("button", { key: 'f9a3228f7545d55bdc923edf6189afccbcce5d42', onClick: () => this.createHandler(), class: 'add-participant-row', style: {
|
|
33774
33773
|
'--background-selected': defaultRolePalette[1].s10,
|
|
33775
33774
|
'--check-icon-selected': defaultRolePalette[1].s50,
|
|
33776
|
-
} }, index.h("div", { key: '
|
|
33775
|
+
} }, index.h("div", { key: '9f71dc813a5a0b2cff5570bc3706e53179c0cb88', class: 'add-participant-icon' }, index.h("ls-icon", { key: '8d08c6294038f852831c7d37d13aaf580faf5ae3', name: "user-add" })), index.h("div", { key: 'ae50fe55de6cf1c3138933daed493e96e5563808', class: 'role-text' }, index.h("p", { key: '920329e6bc79ab6f78b5231ce38e5f152ff9df10', class: 'role-name' }, "Add Participant"), index.h("p", { key: 'e221d8dbd281aa98db215a5f2ae945f976585c81', class: 'role-type' }, "Add a new Signer")), index.h("ls-icon", { key: 'b1bb7285d2b3c6738012287c0bc4ab8708c5b63a', class: 'plus-icon', name: "plus" }))))), index.h("slot", { key: '9e3190405ab4374c72af3b71a84d749bd43d7994' })));
|
|
33777
33776
|
}
|
|
33778
33777
|
};
|
|
33779
33778
|
LsParticipantSelect.style = lsParticipantSelectCss;
|
|
@@ -34015,11 +34014,17 @@ const LsToolbar = class {
|
|
|
34015
34014
|
this.mutate = index.createEvent(this, "mutate");
|
|
34016
34015
|
this.update = index.createEvent(this, "update");
|
|
34017
34016
|
}
|
|
34017
|
+
get component() { return index.getElement(this); }
|
|
34018
34018
|
/**
|
|
34019
34019
|
* The selected items information (as JSON).
|
|
34020
34020
|
* {LSApiElement[]}
|
|
34021
34021
|
*/
|
|
34022
34022
|
dataItem;
|
|
34023
|
+
/**
|
|
34024
|
+
* The group and experience information.
|
|
34025
|
+
* {object}
|
|
34026
|
+
*/
|
|
34027
|
+
groupInfo;
|
|
34023
34028
|
/**
|
|
34024
34029
|
* The base template information (as JSON).
|
|
34025
34030
|
* {LSApiTemplate}
|
|
@@ -34044,11 +34049,8 @@ const LsToolbar = class {
|
|
|
34044
34049
|
this.mutate.emit(diffs);
|
|
34045
34050
|
this.update.emit(diffs);
|
|
34046
34051
|
}
|
|
34047
|
-
componentDidLoad() {
|
|
34048
|
-
console.log(this.editor.groupInfo);
|
|
34049
|
-
}
|
|
34050
34052
|
render() {
|
|
34051
|
-
return (index.h(index.Host, { key: '
|
|
34053
|
+
return (index.h(index.Host, { key: '74a143b58b3a573ed20b2b88446a5eccb657c0a0' }, this.dataItem && this.dataItem.length > 1 ? (index.h("div", { class: 'rowbox' }, index.h("ls-field-format", { dataItem: this?.dataItem }))) : (index.h("div", { class: 'rowbox' }, index.h("ls-field-format", { dataItem: this?.dataItem, style: { visibility: this.dataItem && this.dataItem.length === 1 ? 'visible' : 'hidden' } }), index.h("ls-participant-select", { id: "ls-participant-select", roles: this.template?.roles, dataItem: this?.dataItem, style: { visibility: this.dataItem && this.dataItem.length === 1 ? 'hidden' : 'visible' } }))), index.h("slot", { key: '2893f9427ccfa30fe982fe3e1b72afe5fdcaa93a' })));
|
|
34052
34054
|
}
|
|
34053
34055
|
};
|
|
34054
34056
|
LsToolbar.style = lsToolbarCss;
|
|
@@ -34113,18 +34115,18 @@ const LsValidationTag = class {
|
|
|
34113
34115
|
constructor(hostRef) {
|
|
34114
34116
|
index.registerInstance(this, hostRef);
|
|
34115
34117
|
}
|
|
34116
|
-
|
|
34117
|
-
|
|
34118
|
+
status = 'Invalid';
|
|
34119
|
+
validationErrors = [];
|
|
34118
34120
|
isExpanded = false;
|
|
34119
34121
|
render() {
|
|
34120
|
-
return (index.h(index.Host, { key: '
|
|
34121
|
-
'--field-background': defaultRolePalette[field.
|
|
34122
|
-
'--field-border-color': defaultRolePalette[field.
|
|
34123
|
-
'--field-background-hover': defaultRolePalette[field.
|
|
34124
|
-
'--field-text-color': defaultRolePalette[field.
|
|
34125
|
-
'--field-text-color-hover': defaultRolePalette[field.
|
|
34126
|
-
'--field-border-color-hover': defaultRolePalette[field.
|
|
34127
|
-
} }, index.h("div", { class: 'required-field-items-left' }, index.h("div", { class: 'dot', style: { background: defaultRolePalette[field.
|
|
34122
|
+
return (index.h(index.Host, { key: '831f0d525df46dc73cdad43da4dc836ef7d5cda0' }, index.h("div", { key: '11768cd66d0f20bdd9c1dba7f75197ae36d4adca', class: `valid-label ${this.validationErrors.length === 0 ? 'valid' : 'invalid'}`, onClick: this.status !== 'Valid' && (() => (this.isExpanded = !this.isExpanded)) }, this.validationErrors.length === 0 ? 'Ready to Send' : `Requires Fields`, this.validationErrors.length > 0 && index.h("div", { key: '315f7789dac5367aaaecedb8f704aa5d24631563', class: 'field-counter' }, this.validationErrors.length), this.validationErrors.length > 0 && index.h("ls-icon", { key: 'fa4fb38503e8947c316dfe5425bdfd06e9771dc9', name: this.isExpanded ? 'chevron-up' : 'chevron-down', style: { cursor: 'pointer', scale: '0.60', margin: '0 -0.25rem' } })), this.isExpanded && (index.h("div", { key: '54023a5567a1f4c76a91035cf02606695900dc60', class: 'field-dropdown' }, index.h("div", { key: '4bf0754f860db5794dd49b47c17bbe6543d161ad', class: 'dropdown-header' }, index.h("h2", { key: '40c01887fff3d614faa1287bb4dbf1e4448c35b5' }, "Signature Fields Required"), index.h("p", { key: '311e124d50204efeabdb4e1350a2ab6dcbd659b6' }, this.validationErrors.length, " ", this.validationErrors.length === 1 ? 'Recipient needs a Signature Field' : 'Recipients need Signature Fields', " placed for them")), this.validationErrors.map((field, idx) => (index.h("div", { key: idx, class: 'required-field', style: {
|
|
34123
|
+
'--field-background': defaultRolePalette[field.role.signerIndex || 0].s10,
|
|
34124
|
+
'--field-border-color': defaultRolePalette[field.role.signerIndex || 0].s10,
|
|
34125
|
+
'--field-background-hover': defaultRolePalette[field.role.signerIndex || 0].s20,
|
|
34126
|
+
'--field-text-color': defaultRolePalette[field.role.signerIndex || 0].s70,
|
|
34127
|
+
'--field-text-color-hover': defaultRolePalette[field.role.signerIndex || 0].s80,
|
|
34128
|
+
'--field-border-color-hover': defaultRolePalette[field.role.signerIndex || 0].s60,
|
|
34129
|
+
} }, index.h("div", { class: 'required-field-items-left' }, index.h("div", { class: 'dot', style: { background: defaultRolePalette[field.role.signerIndex || 0].s60 } }), index.h("p", { style: { color: defaultRolePalette[field.role.signerIndex || 0].s80 } }, field.role?.name || `Signer ${field.role?.signerIndex + 1}`), index.h("div", { class: 'role-label', style: { background: defaultRolePalette[field.role.signerIndex || 0].s30, color: defaultRolePalette[field.role.signerIndex || 0].s70 } }, field.role?.roleType || `Signer ${field.role?.signerIndex + 1}`)), index.h("ls-icon", { name: "chevron-right" }))))))));
|
|
34128
34130
|
}
|
|
34129
34131
|
};
|
|
34130
34132
|
LsValidationTag.style = lsValidationTagCss;
|