legalesign-document-viewer 0.2.6 → 0.2.7

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.
Files changed (90) hide show
  1. package/dist/cjs/loader.cjs.js +1 -1
  2. package/dist/cjs/ls-document-options_37.cjs.entry.js +62 -54
  3. package/dist/cjs/ls-document-options_37.cjs.entry.js.map +1 -1
  4. package/dist/cjs/ls-document-viewer.cjs.js +1 -1
  5. package/dist/collection/components/ls-document-viewer/defaultPalette.js +34 -20
  6. package/dist/collection/components/ls-document-viewer/defaultPalette.js.map +1 -1
  7. package/dist/collection/components/ls-document-viewer/ls-document-viewer.js +3 -27
  8. package/dist/collection/components/ls-document-viewer/ls-document-viewer.js.map +1 -1
  9. package/dist/collection/components/ls-editor-field/ls-editor-field.css +0 -244
  10. package/dist/collection/components/ls-editor-field/ls-editor-field.js +4 -23
  11. package/dist/collection/components/ls-editor-field/ls-editor-field.js.map +1 -1
  12. package/dist/collection/components/ls-participant-select/ls-participant-select.js +20 -20
  13. package/dist/collection/components/ls-participant-select/ls-participant-select.js.map +1 -1
  14. package/dist/collection/types/RoleColor.js.map +1 -1
  15. package/dist/components/ls-document-viewer.js +18 -24
  16. package/dist/components/ls-document-viewer.js.map +1 -1
  17. package/dist/components/ls-editor-field.js +1 -1
  18. package/dist/components/ls-field-properties-date.js +1 -1
  19. package/dist/components/ls-field-properties-email.js +1 -1
  20. package/dist/components/ls-field-properties-file.js +1 -1
  21. package/dist/components/ls-field-properties-general.js +1 -1
  22. package/dist/components/ls-field-properties-image.js +1 -1
  23. package/dist/components/ls-field-properties-multiple.js +1 -1
  24. package/dist/components/ls-field-properties-number.js +1 -1
  25. package/dist/components/ls-field-properties-signature.js +1 -1
  26. package/dist/components/ls-field-properties-text.js +1 -1
  27. package/dist/components/ls-field-properties.js +1 -1
  28. package/dist/components/ls-participant-manager.js +1 -1
  29. package/dist/components/ls-participant-select.js +1 -1
  30. package/dist/components/ls-toolbar.js +1 -1
  31. package/dist/components/{p-B7VyU7YH.js → p-7mvMkVRb.js} +3 -3
  32. package/dist/components/{p-B7VyU7YH.js.map → p-7mvMkVRb.js.map} +1 -1
  33. package/dist/components/{p-DzHh5tyo.js → p-B6Dqll_2.js} +3 -3
  34. package/dist/components/{p-DzHh5tyo.js.map → p-B6Dqll_2.js.map} +1 -1
  35. package/dist/components/{p-DEE854iZ.js → p-BYkgi-J_.js} +3 -3
  36. package/dist/components/{p-DEE854iZ.js.map → p-BYkgi-J_.js.map} +1 -1
  37. package/dist/components/{p-Bh-iiZW1.js → p-BedUS-Pi.js} +3 -3
  38. package/dist/components/{p-Bh-iiZW1.js.map → p-BedUS-Pi.js.map} +1 -1
  39. package/dist/components/{p-EsA1p6L3.js → p-Bj9FzNSh.js} +3 -3
  40. package/dist/components/{p-EsA1p6L3.js.map → p-Bj9FzNSh.js.map} +1 -1
  41. package/dist/components/{p-C6YMMVJ1.js → p-BjBJRt5-.js} +3 -3
  42. package/dist/components/{p-C6YMMVJ1.js.map → p-BjBJRt5-.js.map} +1 -1
  43. package/dist/components/{p-DCLBmOtj.js → p-CE67ypMe.js} +3 -3
  44. package/dist/components/{p-DCLBmOtj.js.map → p-CE67ypMe.js.map} +1 -1
  45. package/dist/components/{p-D4JCAjlc.js → p-CbUCAzmE.js} +23 -23
  46. package/dist/components/p-CbUCAzmE.js.map +1 -0
  47. package/dist/components/{p-ucaurEVy.js → p-CuxAfM9m.js} +3 -3
  48. package/dist/components/{p-ucaurEVy.js.map → p-CuxAfM9m.js.map} +1 -1
  49. package/dist/components/p-D1OQM-9f.js +40 -0
  50. package/dist/components/p-D1OQM-9f.js.map +1 -0
  51. package/dist/components/{p-rEZh-cMt.js → p-D4doNXE5.js} +3 -3
  52. package/dist/components/{p-rEZh-cMt.js.map → p-D4doNXE5.js.map} +1 -1
  53. package/dist/components/{p-D_ZsRxGa.js → p-DYZGkZmu.js} +3 -3
  54. package/dist/components/{p-D_ZsRxGa.js.map → p-DYZGkZmu.js.map} +1 -1
  55. package/dist/components/{p-1Ir9-yQU.js → p-DqToFDz3.js} +11 -11
  56. package/dist/components/{p-1Ir9-yQU.js.map → p-DqToFDz3.js.map} +1 -1
  57. package/dist/components/{p-BSN2cMdj.js → p-LFkQIFv6.js} +3 -3
  58. package/dist/components/{p-BSN2cMdj.js.map → p-LFkQIFv6.js.map} +1 -1
  59. package/dist/components/p-ynMP52Os.js +160 -0
  60. package/dist/components/p-ynMP52Os.js.map +1 -0
  61. package/dist/esm/loader.js +1 -1
  62. package/dist/esm/ls-document-options_37.entry.js +62 -54
  63. package/dist/esm/ls-document-options_37.entry.js.map +1 -1
  64. package/dist/esm/ls-document-viewer.js +1 -1
  65. package/dist/ls-document-viewer/ls-document-viewer.esm.js +1 -1
  66. package/dist/ls-document-viewer/{p-3e954354.entry.js → p-0ca48927.entry.js} +5 -5
  67. package/dist/ls-document-viewer/p-0ca48927.entry.js.map +1 -0
  68. package/dist/types/components/ls-document-viewer/defaultPalette.d.ts +2 -1
  69. package/dist/types/components/ls-document-viewer/ls-document-viewer.d.ts +0 -5
  70. package/dist/types/components/ls-editor-field/ls-editor-field.d.ts +1 -2
  71. package/dist/types/components/ls-field-properties-date/ls-field-properties-date.d.ts +1 -1
  72. package/dist/types/components/ls-field-properties-email/ls-field-properties-email.d.ts +1 -1
  73. package/dist/types/components/ls-field-properties-file/ls-field-properties-file.d.ts +1 -1
  74. package/dist/types/components/ls-field-properties-general/ls-field-properties-general.d.ts +1 -1
  75. package/dist/types/components/ls-field-properties-image/ls-field-properties-image.d.ts +1 -1
  76. package/dist/types/components/ls-field-properties-multiple/ls-field-properties-multiple.d.ts +1 -1
  77. package/dist/types/components/ls-field-properties-number/ls-field-properties-number.d.ts +1 -1
  78. package/dist/types/components/ls-field-properties-signature/ls-field-properties-signature.d.ts +1 -1
  79. package/dist/types/components/ls-field-properties-text/ls-field-properties-text.d.ts +1 -1
  80. package/dist/types/components/ls-participant-manager/ls-participant-manager.d.ts +1 -1
  81. package/dist/types/components/ls-participant-select/ls-participant-select.d.ts +1 -1
  82. package/dist/types/components.d.ts +0 -12
  83. package/dist/types/types/RoleColor.d.ts +6 -2
  84. package/package.json +1 -1
  85. package/dist/components/p-C00GqV9f.js +0 -26
  86. package/dist/components/p-C00GqV9f.js.map +0 -1
  87. package/dist/components/p-D4JCAjlc.js.map +0 -1
  88. package/dist/components/p-xCgJuAC2.js +0 -162
  89. package/dist/components/p-xCgJuAC2.js.map +0 -1
  90. package/dist/ls-document-viewer/p-3e954354.entry.js.map +0 -1
@@ -0,0 +1,160 @@
1
+ import { p as proxyCustomElement, H, h, d as Host } from './p-DjfDnBZ1.js';
2
+ import { b as getInputType } from './p-DqJ_uIFZ.js';
3
+ import { d as defaultRolePalette } from './p-D1OQM-9f.js';
4
+
5
+ const lsEditorFieldCss = ":host{display:block;position:absolute;margin:0px;padding:0px 0px 0px 0px;isolation:isolate}.ls-editor-field-editable{display:block;font-family:inherit;font-size:inherit;overflow:hidden;white-space:nowrap;margin:0;padding:0px 0px 0px 0px;min-width:2em;height:100%;width:100%}.ls-editor-field{opacity:0.7}.ls-editor-field-editable:focus{outline:none}.ls-editor-field-draggable{display:block;font-family:inherit;font-size:inherit;overflow:hidden;white-space:nowrap;min-width:2px;height:98%;width:98%}.hidden-field{display:none}input{all:unset}.draggable-input{font-family:inherit;font-size:inherit;position:relative;height:95%;width:95%}.editing-input{caret-color:rgb(15 23 42);caret-shape:auto;height:100%;width:100%}";
6
+
7
+ const LsEditorField = /*@__PURE__*/ proxyCustomElement(class LsEditorField extends H {
8
+ constructor() {
9
+ super();
10
+ this.__registerHost();
11
+ this.__attachShadow();
12
+ }
13
+ get component() { return this; }
14
+ dataItem;
15
+ selected;
16
+ readonly;
17
+ type;
18
+ page;
19
+ isEditing = false;
20
+ heldEdge = null;
21
+ isEdgeDragging = false;
22
+ innerValue;
23
+ sizeObserver;
24
+ handleInput(e) {
25
+ if (e.code === 'Enter') {
26
+ this.isEditing = false;
27
+ this.sizeObserver.observe(this.component.shadowRoot.getElementById('field-info'));
28
+ }
29
+ }
30
+ handleMouseMove(e) {
31
+ if (this.readonly)
32
+ return;
33
+ if (!e.clientX)
34
+ return;
35
+ // Determine which edge is being moved over and what cursor to show.
36
+ if (Math.abs(e.offsetX) < 5) {
37
+ this.component.style.cursor = 'ew-resize';
38
+ }
39
+ else if (Math.abs(e.offsetX - this.component.clientWidth) < 5) {
40
+ this.component.style.cursor = 'ew-resize';
41
+ }
42
+ else if (Math.abs(e.offsetY) < 5) {
43
+ this.component.style.cursor = 'ns-resize';
44
+ }
45
+ else if (Math.abs(e.offsetY - this.component.clientHeight) < 5) {
46
+ this.component.style.cursor = 'ns-resize';
47
+ }
48
+ else {
49
+ this.component.style.cursor = 'move';
50
+ }
51
+ }
52
+ handleDoubleClick() {
53
+ if (this.readonly)
54
+ return;
55
+ this.isEditing = true;
56
+ this.heldEdge = null;
57
+ this.isEdgeDragging = false;
58
+ this.sizeObserver.disconnect();
59
+ this.innerValue = this.innerValue ? this.innerValue : this.dataItem?.value;
60
+ const editbox = this.component.shadowRoot.getElementById('editing-input');
61
+ console.log(editbox);
62
+ if (editbox) {
63
+ editbox.className = 'ls-editor-field-editable';
64
+ editbox.focus();
65
+ }
66
+ }
67
+ handleDragStart(event) {
68
+ console.log('dragstart ls-editor-field', event, this.type);
69
+ // Add the target element's id to the data transfer object
70
+ event.dataTransfer.setData('application/json', JSON.stringify({
71
+ type: this.type,
72
+ }));
73
+ event.dataTransfer.dropEffect = 'move';
74
+ }
75
+ watchSelectedHandler(_newValue, _oldValue) {
76
+ if (_newValue) {
77
+ this.component.style.background = `var(--${this.participantColor(this.dataItem?.signer)}-20)`;
78
+ this.component.style.opacity = '0.7';
79
+ this.component.style.boxShadow = '0 4px 6px -1px rgba(0, 0, 0, 0.10), 0 2px 4px -1px rgba(0, 0, 0, 0.06)';
80
+ }
81
+ else {
82
+ this.component.style.background = 'transparent';
83
+ this.component.style.boxShadow = 'none';
84
+ }
85
+ }
86
+ onInputChange(e) {
87
+ // console.log("INPUT CHANGE", e);
88
+ this.innerValue = e.target.value;
89
+ }
90
+ componentDidLoad() {
91
+ this.sizeObserver = new ResizeObserver(entries => {
92
+ for (const entry of entries) {
93
+ if (entry.contentRect) {
94
+ // const editbox = this.component.shadowRoot.getElementById('editing-input') as HTMLElement;
95
+ const movebox = this.component.shadowRoot.getElementById('field-info');
96
+ // console.log(editbox)
97
+ // editbox.style.height = entry.contentRect.height + "px"
98
+ // editbox.style.width = entry.contentRect.width + "px"
99
+ movebox.style.height = entry.contentRect.height + 'px';
100
+ movebox.style.width = entry.contentRect.width + 'px';
101
+ }
102
+ }
103
+ });
104
+ this.sizeObserver.observe(this.component);
105
+ // New dropped components automatically need selecting.
106
+ if (this.selected) {
107
+ this.component.style.background = this.participantColor(this.dataItem?.signer).s20;
108
+ this.component.style.opacity = '0.7';
109
+ this.component.style.boxShadow = '0 4px 6px -1px rgba(0, 0, 0, 0.10), 0 2px 4px -1px rgba(0, 0, 0, 0.06)';
110
+ }
111
+ else {
112
+ this.component.style.background = `transparent`;
113
+ this.component.style.boxShadow = 'none';
114
+ }
115
+ }
116
+ participantColor = (index) => {
117
+ return defaultRolePalette[index % 100] || defaultRolePalette[0];
118
+ };
119
+ render() {
120
+ return (h(Host, { key: '3c8441e53f90eed0e0b778924f9191342f504a65', style: { border: `1px ${this.participantColor(this.dataItem?.signer).s60} solid` } }, h("div", { key: 'b81189da32a8a824d19a90b452117a3e820798e5', class: {
121
+ 'ls-editor-field': true,
122
+ 'is-selected': this.selected,
123
+ } }, h("input", { key: 'e339642324a7180e435f4d04eaff8823288ab4bb', id: "editing-input", class: this.isEditing ? 'ls-editor-field-editable' : 'hidden-field', type: getInputType(this.dataItem.validation).inputType, value: this.dataItem?.value || this.innerValue, onChange: e => this.onInputChange(e) }), h("div", { key: 'af5b7435dab53aaf8b4ad0000b0e01116c97ef52', id: "field-info", class: this.isEditing ? 'hidden-field' : 'ls-editor-field-draggable' }, this.innerValue || this.dataItem?.label || this.dataItem?.formElementType))));
124
+ }
125
+ static get watchers() { return {
126
+ "selected": ["watchSelectedHandler"]
127
+ }; }
128
+ static get style() { return lsEditorFieldCss; }
129
+ }, [257, "ls-editor-field", {
130
+ "dataItem": [1040, "data-item"],
131
+ "selected": [4],
132
+ "readonly": [4],
133
+ "type": [1],
134
+ "page": [16],
135
+ "isEditing": [32],
136
+ "heldEdge": [32],
137
+ "isEdgeDragging": [32],
138
+ "innerValue": [32]
139
+ }, [[0, "keydown", "handleInput"], [3, "mousemove", "handleMouseMove"], [2, "dblclick", "handleDoubleClick"], [0, "dragstart", "handleDragStart"]], {
140
+ "selected": ["watchSelectedHandler"]
141
+ }]);
142
+ function defineCustomElement() {
143
+ if (typeof customElements === "undefined") {
144
+ return;
145
+ }
146
+ const components = ["ls-editor-field"];
147
+ components.forEach(tagName => { switch (tagName) {
148
+ case "ls-editor-field":
149
+ if (!customElements.get(tagName)) {
150
+ customElements.define(tagName, LsEditorField);
151
+ }
152
+ break;
153
+ } });
154
+ }
155
+ defineCustomElement();
156
+
157
+ export { LsEditorField as L, defineCustomElement as d };
158
+ //# sourceMappingURL=p-ynMP52Os.js.map
159
+
160
+ //# sourceMappingURL=p-ynMP52Os.js.map
@@ -0,0 +1 @@
1
+ {"file":"p-ynMP52Os.js","mappings":"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","names":["__stencil_proxyCustomElement","HTMLElement"],"sources":["src/components/ls-editor-field/ls-editor-field.css?tag=ls-editor-field&encapsulation=shadow","src/components/ls-editor-field/ls-editor-field.tsx"],"sourcesContent":[":host {\n display: block;\n position: absolute;\n margin: 0px;\n padding: 0px 0px 0px 0px;\n isolation: isolate;\n}\n\n.ls-editor-field-editable {\n display: block;\n font-family: inherit;\n font-size: inherit;\n overflow: hidden;\n\n /* no extra spaces */\n white-space: nowrap;\n margin: 0;\n padding: 0px 0px 0px 0px;\n /* default widths */\n min-width: 2em;\n height: 100%;\n width: 100%;\n}\n\n.ls-editor-field {\n opacity: 0.7;\n}\n\n.ls-editor-field-editable:focus {\n outline: none;\n}\n\n.ls-editor-field-draggable {\n display: block;\n font-family: inherit;\n font-size: inherit;\n overflow: hidden;\n\n /* no extra spaces */\n white-space: nowrap;\n\n /* default widths */\n min-width: 2px;\n height: 98%;\n width: 98%;\n}\n\n/* .is-selected {\n border: 1px dotted rgb(193, 26, 26);\n} */\n\n.hidden-field {\n display: none;\n}\n\ninput {\n all: unset;\n}\n\n.draggable-input {\n font-family: inherit;\n font-size: inherit;\n position: relative;\n height: 95%;\n width: 95%;\n}\n\n.editing-input {\n caret-color: rgb(15 23 42);\n caret-shape: auto;\n height: 100%;\n width: 100%;\n}","import { Component, Host, h, Element, State, Prop, Watch, Listen } from '@stencil/core';\nimport { LSApiElement } from '../../components';\nimport { getInputType } from '../ls-document-viewer/editorUtils';\nimport { defaultRolePalette } from '../ls-document-viewer/defaultPalette';\n\n@Component({\n tag: 'ls-editor-field',\n styleUrl: 'ls-editor-field.css',\n shadow: true,\n})\nexport class LsEditorField {\n @Element() component: HTMLElement;\n @Prop({ mutable: true }) dataItem: LSApiElement;\n @Prop() selected: boolean;\n @Prop() readonly: boolean;\n @Prop() type: 'text' | 'signature' | 'date' | 'regex' | 'file' | 'number' | 'autodate';\n @Prop() page: { height: number; width: number };\n @State() isEditing: boolean = false;\n @State() heldEdge: string = null;\n @State() isEdgeDragging: boolean = false;\n @State() innerValue: string;\n private sizeObserver: ResizeObserver;\n\n @Listen('keydown')\n handleInput(e: KeyboardEvent) {\n if (e.code === 'Enter') {\n this.isEditing = false;\n this.sizeObserver.observe(this.component.shadowRoot.getElementById('field-info'));\n }\n }\n\n @Listen('mousemove', { capture: true })\n handleMouseMove(e) {\n if (this.readonly) return;\n if (!e.clientX) return;\n\n // Determine which edge is being moved over and what cursor to show.\n if (Math.abs(e.offsetX) < 5) {\n this.component.style.cursor = 'ew-resize';\n } else if (Math.abs(e.offsetX - this.component.clientWidth) < 5) {\n this.component.style.cursor = 'ew-resize';\n } else if (Math.abs(e.offsetY) < 5) {\n this.component.style.cursor = 'ns-resize';\n } else if (Math.abs(e.offsetY - this.component.clientHeight) < 5) {\n this.component.style.cursor = 'ns-resize';\n } else {\n this.component.style.cursor = 'move';\n }\n }\n\n @Listen('dblclick', { capture: true })\n handleDoubleClick() {\n if (this.readonly) return;\n this.isEditing = true;\n this.heldEdge = null;\n this.isEdgeDragging = false;\n this.sizeObserver.disconnect();\n this.innerValue = this.innerValue ? this.innerValue : this.dataItem?.value;\n\n const editbox = this.component.shadowRoot.getElementById('editing-input') as HTMLInputElement;\n console.log(editbox);\n\n if (editbox) {\n editbox.className = 'ls-editor-field-editable';\n editbox.focus();\n }\n }\n\n @Listen('dragstart', { capture: false, passive: false })\n handleDragStart(event) {\n console.log('dragstart ls-editor-field', event, this.type);\n // Add the target element's id to the data transfer object\n event.dataTransfer.setData(\n 'application/json',\n JSON.stringify({\n type: this.type,\n }),\n );\n event.dataTransfer.dropEffect = 'move';\n }\n\n @Watch('selected')\n watchSelectedHandler(_newValue: boolean, _oldValue: boolean) {\n if (_newValue) {\n this.component.style.background = `var(--${this.participantColor(this.dataItem?.signer)}-20)`;\n this.component.style.opacity = '0.7';\n this.component.style.boxShadow = '0 4px 6px -1px rgba(0, 0, 0, 0.10), 0 2px 4px -1px rgba(0, 0, 0, 0.06)';\n } else {\n this.component.style.background = 'transparent';\n this.component.style.boxShadow = 'none';\n }\n }\n\n onInputChange(e) {\n // console.log(\"INPUT CHANGE\", e);\n this.innerValue = e.target.value;\n }\n\n componentDidLoad() {\n this.sizeObserver = new ResizeObserver(entries => {\n for (const entry of entries) {\n if (entry.contentRect) {\n // const editbox = this.component.shadowRoot.getElementById('editing-input') as HTMLElement;\n const movebox = this.component.shadowRoot.getElementById('field-info') as HTMLElement;\n // console.log(editbox)\n // editbox.style.height = entry.contentRect.height + \"px\"\n // editbox.style.width = entry.contentRect.width + \"px\"\n\n movebox.style.height = entry.contentRect.height + 'px';\n movebox.style.width = entry.contentRect.width + 'px';\n }\n }\n });\n\n this.sizeObserver.observe(this.component);\n\n // New dropped components automatically need selecting.\n if (this.selected) {\n this.component.style.background = this.participantColor(this.dataItem?.signer).s20;\n this.component.style.opacity = '0.7';\n this.component.style.boxShadow = '0 4px 6px -1px rgba(0, 0, 0, 0.10), 0 2px 4px -1px rgba(0, 0, 0, 0.06)';\n } else {\n this.component.style.background = `transparent`;\n this.component.style.boxShadow = 'none';\n }\n }\n\n participantColor = (index: number) => {\n return defaultRolePalette[index % 100] || defaultRolePalette[0];\n };\n\n render() {\n return (\n <Host style={{ border: `1px ${this.participantColor(this.dataItem?.signer).s60} solid` }}>\n <div\n class={{\n 'ls-editor-field': true,\n 'is-selected': this.selected,\n }}\n >\n <input\n id=\"editing-input\"\n class={this.isEditing ? 'ls-editor-field-editable' : 'hidden-field'}\n type={getInputType(this.dataItem.validation).inputType}\n value={this.dataItem?.value || this.innerValue}\n onChange={e => this.onInputChange(e)}\n />\n <div id=\"field-info\" class={this.isEditing ? 'hidden-field' : 'ls-editor-field-draggable'}>\n {this.innerValue || this.dataItem?.label || this.dataItem?.formElementType}\n </div>\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
@@ -4,7 +4,7 @@ export { s as setNonce } from './index-BwkWPcyG.js';
4
4
  const defineCustomElements = async (win, options) => {
5
5
  if (typeof window === 'undefined') return undefined;
6
6
  await globalScripts();
7
- return bootstrapLazy([["ls-document-options_37",[[257,"ls-document-viewer",{"template":[1],"token":[1],"templateid":[1],"zoom":[1026],"pageNum":[1026,"page-num"],"signer":[1026],"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"],"roleColors":[16,"role-colors"],"_template":[32],"_group":[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-toolbar",{"dataItem":[1040,"data-item"],"template":[16],"editor":[16]}],[257,"ls-feature-column",{"manager":[1025]}],[257,"ls-participant-manager",{"editor":[16],"template":[16]}],[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"],"color":[1]},[[1,"dragstart","handleDragStart"],[0,"keydown","handleKeyDown"]]],[257,"ls-editor-field",{"dataItem":[1040,"data-item"],"selected":[4],"readonly":[4],"palette":[16],"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-editor-table",{"editor":[16]}],[257,"ls-field-properties-multiple",{"dataItem":[16,"data-item"],"fieldSet":[1,"field-set"]}],[257,"ls-field-properties-date",{"dataItem":[16,"data-item"],"fieldSet":[1,"field-set"]}],[257,"ls-field-properties-email",{"dataItem":[16,"data-item"],"fieldSet":[1,"field-set"]}],[257,"ls-field-properties-general",{"dataItem":[16,"data-item"],"fieldSet":[1,"field-set"]}],[257,"ls-field-properties-image",{"dataItem":[16,"data-item"],"fieldSet":[1,"field-set"]}],[257,"ls-field-properties-number",{"dataItem":[16,"data-item"],"fieldSet":[1,"field-set"]}],[257,"ls-field-properties-signature",{"dataItem":[1040,"data-item"],"fieldSet":[1,"field-set"]}],[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-file",{"dataItem":[16,"data-item"],"fieldSet":[1,"field-set"]}],[257,"ls-field-properties-autosign",{"dataItem":[16,"data-item"]}],[257,"ls-field-properties-text",{"dataItem":[16,"data-item"],"fieldSet":[1,"field-set"]}],[257,"ls-field-format",{"dataItem":[1040,"data-item"]}],[257,"ls-participant-select",{"dataItem":[1040,"data-item"],"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-footer",{"dataItem":[1040,"data-item"]}],[257,"ls-field-properties-advanced",{"dataItem":[1040,"data-item"]}],[257,"ls-field-placement",{"dataItem":[1040,"data-item"]}],[257,"ls-field-dimensions",{"dataItem":[1040,"data-item"]}],[257,"ls-toggle"],[257,"ls-icon",{"name":[1],"solid":[4],"size":[1],"customStyle":[16,"custom-style"]}]]]], options);
7
+ return bootstrapLazy([["ls-document-options_37",[[257,"ls-document-viewer",{"template":[1],"token":[1],"templateid":[1],"zoom":[1026],"pageNum":[1026,"page-num"],"signer":[1026],"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],"_group":[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-toolbar",{"dataItem":[1040,"data-item"],"template":[16],"editor":[16]}],[257,"ls-feature-column",{"manager":[1025]}],[257,"ls-participant-manager",{"editor":[16],"template":[16]}],[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"],"color":[1]},[[1,"dragstart","handleDragStart"],[0,"keydown","handleKeyDown"]]],[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-editor-table",{"editor":[16]}],[257,"ls-field-properties-multiple",{"dataItem":[16,"data-item"],"fieldSet":[1,"field-set"]}],[257,"ls-field-properties-date",{"dataItem":[16,"data-item"],"fieldSet":[1,"field-set"]}],[257,"ls-field-properties-email",{"dataItem":[16,"data-item"],"fieldSet":[1,"field-set"]}],[257,"ls-field-properties-general",{"dataItem":[16,"data-item"],"fieldSet":[1,"field-set"]}],[257,"ls-field-properties-image",{"dataItem":[16,"data-item"],"fieldSet":[1,"field-set"]}],[257,"ls-field-properties-number",{"dataItem":[16,"data-item"],"fieldSet":[1,"field-set"]}],[257,"ls-field-properties-signature",{"dataItem":[1040,"data-item"],"fieldSet":[1,"field-set"]}],[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-file",{"dataItem":[16,"data-item"],"fieldSet":[1,"field-set"]}],[257,"ls-field-properties-autosign",{"dataItem":[16,"data-item"]}],[257,"ls-field-properties-text",{"dataItem":[16,"data-item"],"fieldSet":[1,"field-set"]}],[257,"ls-field-format",{"dataItem":[1040,"data-item"]}],[257,"ls-participant-select",{"dataItem":[1040,"data-item"],"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-footer",{"dataItem":[1040,"data-item"]}],[257,"ls-field-properties-advanced",{"dataItem":[1040,"data-item"]}],[257,"ls-field-placement",{"dataItem":[1040,"data-item"]}],[257,"ls-field-dimensions",{"dataItem":[1040,"data-item"]}],[257,"ls-toggle"],[257,"ls-icon",{"name":[1],"solid":[4],"size":[1],"customStyle":[16,"custom-style"]}]]]], options);
8
8
  };
9
9
 
10
10
  export { defineCustomElements };
@@ -19901,26 +19901,40 @@ const findDimensions = (frameContainer, sourceField, pageHeight, pageWidth, zoom
19901
19901
  };
19902
19902
 
19903
19903
  // import { RoleColor } from "../../types/RoleColor";
19904
- // export const defaultRolePalette: RoleColor[] = [
19905
- // {primary:'rgb(50, 124, 244)', faded: 'rgb(240, 246, 255)'},
19906
- // {primary:'rgb(70, 219, 170)', faded: 'rgb(239, 255, 249)'},
19907
- // {primary:'rgb(240, 182, 24)', faded: 'rgb(255, 252, 239)'},
19908
- // {primary:'rgb(238, 229, 255)', faded: 'rgb(244, 240, 255)'},
19909
- // {primary:'rgb(240, 86, 178)', faded: 'rgb(255, 240, 249)'},
19910
- // {primary:'rgb(189, 240, 86)', faded: 'rgb(250, 255, 240)'},
19911
- // {primary:'rgb(246, 74, 68)', faded: 'rgb(246, 190, 188)'},
19912
- // {primary:'rgb(58, 0, 166)', faded: 'rgb(188, 169, 240)'},
19913
- // {primary:'rgba(1, 179, 34, 0.69)', faded: 'rgb(135, 173, 158)'},
19914
- // {primary:'rgb(201, 204, 0)', faded: 'rgba(246, 247, 203, 0.77)'},
19915
- // {primary:'rgb(249, 55, 129)', faded: 'rgb(255, 237, 244)'},
19916
- // {primary:'rgb(0, 14, 166)', faded: 'rgb(209, 212, 243)'},
19917
- // {primary:'rgb(135, 173, 158)', faded: 'rgb(205, 244, 228)'} ,
19918
- // {primary:'rgb(86, 199, 240)', faded: 'rgb(202, 236, 248)'},
19919
- // {primary:'rgb(246, 205, 68)', faded: 'rgb(244, 240, 255)'},
19920
- // {primary:'rgb(0, 94, 166)', faded: 'rgb(188, 169, 240)'},
19921
- // {primary:'rgba(179, 1, 63, 0.69)', faded: 'rgb(135, 173, 158)'}
19922
- // ]
19923
- const defaultRolePalette = ['gray', 'blue', 'green', 'yellow', 'purple', 'teal', 'pink', 'lime', 'red', 'lightblue', 'aubergine', 'burnt', 'trueGreen', 'indigo', 'cyan'];
19904
+ const defaultRolePalette = [
19905
+ { s60: '#afb0b2', s80: '#6f7176', s50: '#c8c9cc', s10: '#f7f8fa', s20: '#edeff2', description: 'gray' },
19906
+ { s60: '#5684f0', s80: '#2d4dcc', s50: '#78a3fa', s10: '#f0f6ff', s20: '#e0ecff', description: 'blue' },
19907
+ { s60: '#46dbaa', s80: '#15946a', s50: '#57e5b1', s10: '#effff9', s20: '#c5fde8', description: 'green' },
19908
+ { s60: '#f0b618', s80: '#9e5913', s50: '#fad232', s10: '#fffcef', s20: '#fff3c2', description: 'yellow' },
19909
+ { s60: '#9956f0', s80: '#', s50: '#', s10: '#', s20: '#eee5ff', description: 'purple' },
19910
+ { s60: '#46dbbd', s80: '#', s50: '#', s10: '#', s20: '#c5fcf1', description: 'teal' },
19911
+ { s60: '#f056b2', s80: '#', s50: '#', s10: '#', s20: '#ffe5f5', description: 'pink' },
19912
+ { s60: '#bdf056', s80: '#', s50: '#', s10: '#', s20: '#f6ffe5', description: 'lime' },
19913
+ { s60: '#f64a44', s80: '#', s50: '#', s10: '#', s20: '#ffe1e0', description: 'red' },
19914
+ { s60: '#48c5f0', s80: '#', s50: '#', s10: '#', s20: '#c7f1ff', description: 'lightblue' },
19915
+ { s60: '#d156f0', s80: '#', s50: '#', s10: '#', s20: '#fae5ff', description: 'aubergine' },
19916
+ { s60: '#f09456', s80: '#', s50: '#', s10: '#', s20: '#fff0e5', description: 'burnt' },
19917
+ { s60: '#56f056', s80: '#', s50: '#', s10: '#', s20: '#e5ffe5', description: 'truegreen' },
19918
+ { s60: '#6b56f0', s80: '#', s50: '#', s10: '#', s20: '#e9e5ff', description: 'indigo' },
19919
+ { s60: '#46dbdb', s80: '#', s50: '#', s10: '#', s20: '#c5fcfc', description: 'cyan' },
19920
+ { s60: 'rgb(70, 219, 170)', s80: '#', s50: '#', s10: '#', s20: 'rgb(239, 255, 249)', description: 'overflowcolor' },
19921
+ { s60: 'rgb(240, 182, 24)', s80: '#', s50: '#', s10: '#', s20: 'rgb(255, 252, 239)', description: 'overflowcolor' },
19922
+ { s60: 'rgb(238, 229, 255)', s80: '#', s50: '#', s10: '#', s20: 'rgb(244, 240, 255)', description: 'overflowcolor' },
19923
+ { s60: 'rgb(240, 86, 178)', s80: '#', s50: '#', s10: '#', s20: 'rgb(255, 240, 249)', description: 'overflowcolor' },
19924
+ { s60: 'rgb(189, 240, 86)', s80: '#', s50: '#', s10: '#', s20: 'rgb(250, 255, 240)', description: 'overflowcolor' },
19925
+ { s60: 'rgb(246, 74, 68)', s80: '#', s50: '#', s10: '#', s20: 'rgb(246, 190, 188)', description: 'overflowcolor' },
19926
+ { s60: 'rgb(58, 0, 166)', s80: '#', s50: '#', s10: '#', s20: 'rgb(188, 169, 240)', description: 'overflowcolor' },
19927
+ { s60: 'rgba(1, 179, 34, 0.69)', s80: '#', s50: '#', s10: '#', s20: 'rgb(135, 173, 158)', description: 'overflowcolor' },
19928
+ { s60: 'rgb(201, 204, 0)', s80: '#', s50: '#', s10: '#', s20: 'rgba(246, 247, 203, 0.77)', description: 'overflowcolor' },
19929
+ { s60: 'rgb(249, 55, 129)', s80: '#', s50: '#', s10: '#', s20: 'rgb(255, 237, 244)', description: 'overflowcolor' },
19930
+ { s60: 'rgb(0, 14, 166)', s80: '#', s50: '#', s10: '#', s20: 'rgb(209, 212, 243)', description: 'overflowcolor' },
19931
+ { s60: 'rgb(135, 173, 158)', s80: '#', s50: '#', s10: '#', s20: 'rgb(205, 244, 228)', description: 'overflowcolor' },
19932
+ { s60: 'rgb(86, 199, 240)', s80: '#', s50: '#', s10: '#', s20: 'rgb(202, 236, 248)', description: 'overflowcolor' },
19933
+ { s60: 'rgb(246, 205, 68)', s80: '#', s50: '#', s10: '#', s20: 'rgb(244, 240, 255)', description: 'overflowcolor' },
19934
+ { s60: 'rgb(0, 94, 166)', s80: '#', s50: '#', s10: '#', s20: 'rgb(188, 169, 240)', description: 'overflowcolor' },
19935
+ { s60: 'rgba(179, 1, 63, 0.69)', s80: '#', s50: '#', s10: '#', s20: 'rgb(135, 173, 158)', description: 'overflowcolor' },
19936
+ ];
19937
+ // export const defaultRolePalette: string[] = ['gray', 'blue', 'green', 'yellow', 'purple', 'teal', 'pink', 'lime', 'red', 'lightblue', 'aubergine', 'burnt', 'trueGreen', 'indigo', 'cyan'];
19924
19938
 
19925
19939
  /**
19926
19940
  * These utils are used to make document-viewer more readable
@@ -24776,11 +24790,6 @@ const LsDocumentViewer = class {
24776
24790
  * {boolean}
24777
24791
  */
24778
24792
  toolboxFilter = null;
24779
- /**
24780
- * Allows you to change the colours used for each role in the template.
24781
- * {SignerColor[]}
24782
- */
24783
- roleColors = defaultRolePalette;
24784
24793
  //
24785
24794
  // --- Event Emitters --- //
24786
24795
  //
@@ -25032,10 +25041,10 @@ const LsDocumentViewer = class {
25032
25041
  this.load();
25033
25042
  }
25034
25043
  signerColor = (index) => {
25035
- return index > 200 ? defaultRolePalette[index - 200] : index > 100 ? defaultRolePalette[index - 100] : defaultRolePalette[index] || defaultRolePalette[0];
25044
+ return defaultRolePalette[index % 100].s60 || defaultRolePalette[0].s60;
25036
25045
  };
25037
25046
  render() {
25038
- return (h(Host, { key: 'f0fc2b823aa34e9602080b6f43fa3d6a17644905' }, h(h.Fragment, null, h("div", { key: '9df7db9dd181820cc6c192edc1a93984a8a027a7', class: "page-header" }, h("p", { key: '43e253591b967eff115f0e95f39c42dda5370f65', class: "header-text-1" }, "Template Creation"), h("p", { key: '27a2c45ef973ed2a39a88506dd4a3e36748fa861' }, "/"), h("p", { key: 'a31c7b901fe689d11208fc7dccc76838fbb126d0', class: "header-text-2" }, "Template Name")), h("form", { key: '7bad0edc525c32943bea2a39eca6de3515287263', id: "ls-editor-form" }, this.showtoolbox === true ? (h("div", { class: "leftBox" }, h("div", { class: !this.selected || this.selected.length === 0 ? 'left-box-inner' : 'hidden' }, h("ls-feature-column", { onManage: manager => {
25047
+ return (h(Host, { key: '859d2cc0c98f729ebacb16f36cee16dd28af7c2d' }, h(h.Fragment, null, h("div", { key: '4be8fb9ad4c7d583b474e3b23b1f1006ba1c2d08', class: "page-header" }, h("p", { key: '2cc24d403cc217a4e2f5b2ef109412a6396f2c4a', class: "header-text-1" }, "Template Creation"), h("p", { key: '3cc17aa5ef734022e85ef1e8501c9f1b22a8d5e9' }, "/"), h("p", { key: '5524c9eb62a096563eaad2f09af00c41df806ac7', class: "header-text-2" }, "Template Name")), h("form", { key: '3bc3f5317106ea2c4cabe42a70451906e0f13ac3', id: "ls-editor-form" }, this.showtoolbox === true ? (h("div", { class: "leftBox" }, h("div", { class: !this.selected || this.selected.length === 0 ? 'left-box-inner' : 'hidden' }, h("ls-feature-column", { onManage: manager => {
25039
25048
  if (manager.detail === 'document') {
25040
25049
  var documentManager = this.component.shadowRoot.getElementById('ls-document-options');
25041
25050
  documentManager.template = this._template;
@@ -25048,7 +25057,7 @@ const LsDocumentViewer = class {
25048
25057
  } }), h("div", { id: "ls-toolbox", class: this.manager === 'toolbox' ? 'toolbox' : 'hidden' }, h("div", { class: "ls-editor-infobox" }, h("h2", { class: "toolbox-section-title" }, "Participant Fields"), h("p", { class: "toolbox-section-description" }, "Select and Click to place Signature fields where you\u2019d like on the Document.")), h("div", { class: "fields-box" }, this.signer > 0 ? (h("ls-toolbox-field", { elementType: "signature", formElementType: "signature", label: "Signature", defaultHeight: 27, defaultWidth: 120, validation: 0, icon: "signature", color: this.signerColor(this.signer) })) : (h("ls-toolbox-field", { elementType: "auto sign", formElementType: "auto sign", label: "Auto Sign", defaultHeight: 27, defaultWidth: 120, validation: 3000, icon: "auto-sign", color: this.signerColor(this.signer) })), h("ls-toolbox-field", { elementType: "initials", formElementType: "initials", label: "Initials", defaultHeight: 27, defaultWidth: 120, validation: 2000, icon: "initials", color: this.signerColor(this.signer) }), h("ls-toolbox-field", { elementType: "date", formElementType: "date", label: "Date", defaultHeight: 27, defaultWidth: 80, validation: 2, icon: "calender", color: this.signerColor(this.signer) }), h("ls-toolbox-field", { elementType: "signing date", formElementType: "signing date", label: "Signing Date", defaultHeight: 27, defaultWidth: 120, validation: 30, icon: "auto-date", color: this.signerColor(this.signer) }), h("ls-toolbox-field", { elementType: "email", formElementType: "email", label: "Email", defaultHeight: 27, defaultWidth: 120, validation: 1, icon: "at-symbol", color: this.signerColor(this.signer) }), h("ls-toolbox-field", { elementType: "text", formElementType: "text", label: "Text", defaultHeight: 27, defaultWidth: 100, validation: 0, icon: "text", color: this.signerColor(this.signer) }), h("div", { class: 'expand-fields-row', onClick: () => (this.expandfields = !this.expandfields) }, h("ls-icon", { name: this.expandfields ? 'expand' : 'collapse', size: "20", solid: true }), h("p", null, "More Field Types")), this.expandfields && (h("div", { class: "fields-box" }, h("ls-toolbox-field", { elementType: "number", formElementType: "number", label: "Number", defaultHeight: 27, defaultWidth: 80, validation: 50, icon: "hashtag", color: this.signerColor(this.signer) }), h("ls-toolbox-field", { elementType: "checkbox", formElementType: "checkbox", label: "Checkbox", defaultHeight: 27, defaultWidth: 27, validation: 25, icon: "check", color: this.signerColor(this.signer) }), h("ls-toolbox-field", { elementType: "regex", formElementType: "regex", label: "Regex", defaultHeight: 27, defaultWidth: 120, validation: 93, icon: "code", color: this.signerColor(this.signer) }), h("ls-toolbox-field", { elementType: "image", formElementType: "image", label: "Image", defaultHeight: 27, defaultWidth: 120, validation: 90, icon: "photograph", color: this.signerColor(this.signer) }), h("ls-toolbox-field", { elementType: "file", formElementType: "file", label: "File", defaultHeight: 27, defaultWidth: 120, validation: 74, icon: "upload", color: this.signerColor(this.signer) }))))), h("ls-participant-manager", { id: "ls-participant-manager", class: this.manager === 'participant' ? 'toolbox' : 'hidden', editor: this }), h("ls-document-options", { id: "ls-document-options", class: this.manager === 'document' ? 'toolbox' : 'hidden' })), this.showrightpanel && !this.displayTable && (h("div", { class: this.selected && this.selected.length > 0 ? 'field-properties-outer' : 'hidden' }, h("div", { class: 'properties-header' }, h("div", { class: 'properties-header-icon' }, h("ls-icon", { name: "pre-filled-content" })), h("h1", { class: 'properties-header-title' }, "Field Properties"), h("button", { class: 'tertiaryGrey', onClick: e => {
25049
25058
  this.selected = [];
25050
25059
  e.preventDefault();
25051
- } }, h("ls-icon", { name: "x", size: "20" }))), h("ls-field-properties", { id: "my-field-panel" }), h("slot", null))))) : (h(h.Fragment, null)), h("div", { key: '776dff168c249752f400db7b80e740f3e2684e60', id: "ls-mid-area" }, h("ls-toolbar", { key: '7084a21f22f891d6fb33c1642b6167dbe674268f', id: "ls-toolbar", dataItem: this.selected ? this.selected.map(s => s.dataItem) : null, template: this._template }), h("div", { key: '8276d3e37a4171b82ab9d5d9913447a23e583d91', class: 'document-frame-wrapper' }, h("div", { key: '746d82daa6ebdd758c12f343d88ee7d8cc6742a6', class: 'spacer' }), h("div", { key: '4f5c297f03666429ad49331c768413b48a5ec397', id: "ls-document-frame" }, h("canvas", { key: 'f3042a35c1f9b9b91973cb87e11019a2488687a3', id: "pdf-canvas", class: this.displayTable ? 'hidden' : '' }), h("ls-editor-table", { key: '9005b00b5e5b56c568a26ee79be8636c8280bb93', editor: this, class: this.displayTable ? '' : 'hidden' }), h("div", { key: '88ba70e9e18d000cca60eaaa77bf976e0e019fa6', id: "ls-box-selector" }))), h("ls-statusbar", { key: '634e045de512429e15fff2680def5ce870bf2142', editor: this }))))));
25060
+ } }, h("ls-icon", { name: "x", size: "20" }))), h("ls-field-properties", { id: "my-field-panel" }), h("slot", null))))) : (h(h.Fragment, null)), h("div", { key: '396f65ae8dfd571d289bfc42816c040828e8fb88', id: "ls-mid-area" }, h("ls-toolbar", { key: '1a621e6b7c8dad1f0a4178f94ba9d069fb129a1d', id: "ls-toolbar", dataItem: this.selected ? this.selected.map(s => s.dataItem) : null, template: this._template }), h("div", { key: 'eae5daf190f5e3bdd39823a97cec71cfb2a0fea9', class: 'document-frame-wrapper' }, h("div", { key: 'c97bb669bffc774f5b3eb9a3a30d73929c08e3a5', class: 'spacer' }), h("div", { key: 'd0c6f96d9a08ae6c0c792e2dc0ef36ef3a631b77', id: "ls-document-frame" }, h("canvas", { key: 'efcdc3c09c8336e3be0e51afa560b3755519e308', id: "pdf-canvas", class: this.displayTable ? 'hidden' : '' }), h("ls-editor-table", { key: '298a8c1c28d7965e3a622006d2dd8de7005ba7b7', editor: this, class: this.displayTable ? '' : 'hidden' }), h("div", { key: '844cda3669af25400cc2b41094c3344c5cd60264', id: "ls-box-selector" }))), h("ls-statusbar", { key: 'a170950405cde15290542c96fcdfc0609f81a552', editor: this }))))));
25052
25061
  }
25053
25062
  static get watchers() { return {
25054
25063
  "mode": ["modeHandler"],
@@ -25057,7 +25066,7 @@ const LsDocumentViewer = class {
25057
25066
  };
25058
25067
  LsDocumentViewer.style = lsDocumentViewerCss;
25059
25068
 
25060
- const lsEditorFieldCss = ":host{--font-family:'IBM Plex Sans', sans-serif;--text-xs:0.75rem;--text-xs-line-height:1rem;--text-sm:0.875rem;--text-sm-line-height:1.25rem;--text-base:1rem;--text-base-line-height:1.5rem;--text-lg:1.125rem;--text-lg-line-height:1.75rem;--text-xl:1.25rem;--text-xl-line-height:1.75rem;--text-2xl:1.5rem;--text-2xl-line-height:2rem;--text-3xl:1.875rem;--text-3xl-line-height:2.25rem;--text-4xl:2.25rem;--text-4xl-line-height:2.5rem;--text-5xl:3rem;--text-5xl-line-height:1;--text-6xl:3.75rem;--text-6xl-line-height:1;--text-7xl:4.5rem;--text-7xl-line-height:1;--text-9xl:8rem;--text-9xl-line-height:1;--font-weight-light:300;--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--font-weight-black:900;--radius-xs:0.125rem;--radius-sm:0.25rem;--radius-md:0.375rem;--radius-lg:0.5rem;--radius-xl:0.75rem;--radius-2xl:1rem;--white:#ffffff;--black:#000000;--pink-10:#fff0f9;--pink-20:#ffe5f5;--pink-30:#fabee2;--pink-40:#f5a2d4;--pink-50:#fa78c6;--pink-60:#f056b2;--pink-70:#e043a2;--pink-80:#cc2d8c;--pink-90:#ad2376;--pink-100:#7a1451;--red-10:#fff0f0;--red-20:#ffe1e0;--red-30:#ffc9c7;--red-40:#ffa19e;--red-50:#ff706b;--red-60:#f64a44;--red-70:#dc2721;--red-80:#c1140e;--red-90:#990500;--red-100:#7a1714;--yellow-10:#fffcef;--yellow-20:#fff3c2;--yellow-30:#fcec9d;--yellow-40:#ffe561;--yellow-50:#fad232;--yellow-60:#f0b618;--yellow-70:#cc8904;--yellow-80:#9e5913;--yellow-90:#8a3f0e;--yellow-100:#70350d;--green-10:#effff9;--green-20:#c5fde8;--green-30:#9df5d4;--green-40:#72f0c2;--green-50:#57e5b1;--green-60:#46dbaa;--green-70:#33b88c;--green-80:#15946a;--green-90:#177559;--green-100:#125241;--teal-10:#effffc;--teal-20:#c5fcf1;--teal-30:#a5fae9;--teal-40:#76f5db;--teal-50:#54ebcd;--teal-60:#46dbbd;--teal-70:#33b8a2;--teal-80:#148f7e;--teal-90:#17756c;--teal-100:#15524c;--cyan-10:#efffff;--cyan-20:#c5fcfc;--cyan-30:#a0fafa;--cyan-40:#76f5f5;--cyan-50:#54ebeb;--cyan-60:#46dbdb;--cyan-70:#33b3b8;--cyan-80:#11868f;--cyan-90:#166a70;--cyan-100:#11474d;--lightblue-10:#effbff;--lightblue-20:#c7f1ff;--lightblue-30:#9de4fc;--lightblue-40:#79dbfc;--lightblue-50:#51d3ff;--lightblue-60:#48c5f0;--lightblue-70:#20a6d6;--lightblue-80:#0b80b2;--lightblue-90:#19648a;--lightblue-100:#0c3e57;--blue-10:#f0f6ff;--blue-20:#e0ecff;--blue-30:#bed4fa;--blue-40:#a2bdf5;--blue-50:#78a3fa;--blue-60:#5684f0;--blue-70:#4368e0;--blue-80:#2d4dcc;--blue-90:#233ead;--blue-100:#14287a;--purple-10:#f4f0ff;--purple-20:#eee5ff;--purple-30:#d6befa;--purple-40:#c6a2f5;--purple-50:#b078fa;--purple-60:#9956f0;--purple-70:#8743e0;--purple-80:#722dcc;--purple-90:#5f23ad;--purple-100:#40147a;--primary-10:#eff4ff;--primary-20:#c7ddff;--primary-30:#9dc3fc;--primary-40:#79adfc;--primary-50:#5185ff;--primary-60:#4456f6;--primary-70:#2134dc;--primary-80:#0e20c1;--primary-90:#000f99;--primary-100:#0c1457;--gray-10:#f7f8fa;--gray-20:#edeff2;--gray-30:#e0e2e5;--gray-40:#d8d9dc;--gray-50:#c8c9cc;--gray-60:#afb0b2;--gray-70:#939599;--gray-80:#6f7176;--gray-90:#5e6066;--gray-100:#45484d;--gray-110:#292c33;--gray-120:#151923;--gray-130:#0c1019;--gray-140:#05080d;--aubergine-10:#fcf0ff;--aubergine-20:#fae5ff;--aubergine-30:#eebefa;--aubergine-40:#e4a2f5;--aubergine-50:#e078fa;--aubergine-60:#d156f0;--aubergine-70:#c143e0;--aubergine-80:#ac2dcc;--aubergine-90:#9223ad;--aubergine-100:#66147a;--indigo-10:#f2f0ff;--indigo-20:#e9e5ff;--indigo-30:#c6befa;--indigo-40:#ada2f5;--indigo-50:#8978fa;--indigo-60:#6b56f0;--indigo-70:#5843e0;--indigo-80:#422dcc;--indigo-90:#3523ad;--indigo-100:#21147a;--lime-10:#fafff0;--lime-20:#f6ffe5;--lime-30:#e6fabe;--lime-40:#d9f5a2;--lime-50:#cffa78;--lime-60:#bdf056;--lime-70:#ace043;--lime-80:#97cc2d;--lime-90:#7fad23;--lime-100:#587a14;--trueGreen-10:#f0fff0;--trueGreen-20:#e5ffe5;--trueGreen-30:#befabe;--trueGreen-40:#a2f5a2;--trueGreen-50:#78fa78;--trueGreen-60:#56f056;--trueGreen-70:#43e043;--trueGreen-80:#2dcc2d;--trueGreen-90:#23ad23;--trueGreen-100:#147a14;--burnt-10:#fff6f0;--burnt-20:#fff0e5;--burnt-30:#fad6be;--burnt-40:#f5c3a2;--burnt-50:#faac78;--burnt-60:#f09456;--burnt-70:#e08243;--burnt-80:#cc6d2d;--burnt-90:#ad5a23;--burnt-100:#7a3d14;--shadow-base:0px 1px 2px rgba(0, 0, 0, 0.06), 0px 1px 3px rgba(0, 0, 0, 0.1);--shadow-lg:0px 10px 15px -3px rgba(0, 0, 0, 0.1), 0px 4px 6px -2px rgba(0, 0, 0, 0.05);--active:0px 1px 3px rgba(0, 15, 153, 0.25), 0px 1px 2px rgba(0, 15, 153, 0.06), 0px 0px 0px 4px #9dc3fc;display:block;position:absolute;margin:0px;padding:0px 0px 0px 0px;isolation:isolate}.ls-editor-field-editable{display:block;font-family:inherit;font-size:inherit;overflow:hidden;white-space:nowrap;margin:0;padding:0px 0px 0px 0px;min-width:2em;height:100%;width:100%}.ls-editor-field{opacity:0.7}.ls-editor-field-editable:focus{outline:none}.ls-editor-field-draggable{display:block;font-family:inherit;font-size:inherit;overflow:hidden;white-space:nowrap;min-width:2px;height:98%;width:98%}.hidden-field{display:none}input{all:unset}.draggable-input{font-family:inherit;font-size:inherit;position:relative;height:95%;width:95%}.editing-input{caret-color:rgb(15 23 42);caret-shape:auto;height:100%;width:100%}";
25069
+ const lsEditorFieldCss = ":host{display:block;position:absolute;margin:0px;padding:0px 0px 0px 0px;isolation:isolate}.ls-editor-field-editable{display:block;font-family:inherit;font-size:inherit;overflow:hidden;white-space:nowrap;margin:0;padding:0px 0px 0px 0px;min-width:2em;height:100%;width:100%}.ls-editor-field{opacity:0.7}.ls-editor-field-editable:focus{outline:none}.ls-editor-field-draggable{display:block;font-family:inherit;font-size:inherit;overflow:hidden;white-space:nowrap;min-width:2px;height:98%;width:98%}.hidden-field{display:none}input{all:unset}.draggable-input{font-family:inherit;font-size:inherit;position:relative;height:95%;width:95%}.editing-input{caret-color:rgb(15 23 42);caret-shape:auto;height:100%;width:100%}";
25061
25070
 
25062
25071
  const LsEditorField = class {
25063
25072
  constructor(hostRef) {
@@ -25067,7 +25076,6 @@ const LsEditorField = class {
25067
25076
  dataItem;
25068
25077
  selected;
25069
25078
  readonly;
25070
- palette;
25071
25079
  type;
25072
25080
  page;
25073
25081
  isEditing = false;
@@ -25158,7 +25166,7 @@ const LsEditorField = class {
25158
25166
  this.sizeObserver.observe(this.component);
25159
25167
  // New dropped components automatically need selecting.
25160
25168
  if (this.selected) {
25161
- this.component.style.background = `var(--${this.participantColor(this.dataItem?.signer)}-20)`;
25169
+ this.component.style.background = this.participantColor(this.dataItem?.signer).s20;
25162
25170
  this.component.style.opacity = '0.7';
25163
25171
  this.component.style.boxShadow = '0 4px 6px -1px rgba(0, 0, 0, 0.10), 0 2px 4px -1px rgba(0, 0, 0, 0.06)';
25164
25172
  }
@@ -25168,13 +25176,13 @@ const LsEditorField = class {
25168
25176
  }
25169
25177
  }
25170
25178
  participantColor = (index) => {
25171
- return index > 200 ? defaultRolePalette[index - 200] : index > 100 ? defaultRolePalette[index - 100] : defaultRolePalette[index] || defaultRolePalette[0];
25179
+ return defaultRolePalette[index % 100] || defaultRolePalette[0];
25172
25180
  };
25173
25181
  render() {
25174
- return (h(Host, { key: 'f4ab6bc46e4cdbd1b2bd3b18d08703369af685b9', style: { border: `2px solid var(--${this.participantColor(this.dataItem?.signer)}-60)` } }, h("div", { key: '8b8a45c0acdc4342f95abf5884b60064408c2562', class: {
25182
+ return (h(Host, { key: '3c8441e53f90eed0e0b778924f9191342f504a65', style: { border: `1px ${this.participantColor(this.dataItem?.signer).s60} solid` } }, h("div", { key: 'b81189da32a8a824d19a90b452117a3e820798e5', class: {
25175
25183
  'ls-editor-field': true,
25176
25184
  'is-selected': this.selected,
25177
- } }, h("input", { key: '18d0df23d55da5ca5e9a1ead1bf32797b21c8e70', id: "editing-input", class: this.isEditing ? 'ls-editor-field-editable' : 'hidden-field', type: getInputType(this.dataItem.validation).inputType, value: this.dataItem?.value || this.innerValue, onChange: e => this.onInputChange(e) }), h("div", { key: '1756931604edf30a6e30b055f56b70e07dd077a8', id: "field-info", class: this.isEditing ? 'hidden-field' : 'ls-editor-field-draggable' }, this.innerValue || this.dataItem?.label || this.dataItem?.formElementType))));
25185
+ } }, h("input", { key: 'e339642324a7180e435f4d04eaff8823288ab4bb', id: "editing-input", class: this.isEditing ? 'ls-editor-field-editable' : 'hidden-field', type: getInputType(this.dataItem.validation).inputType, value: this.dataItem?.value || this.innerValue, onChange: e => this.onInputChange(e) }), h("div", { key: 'af5b7435dab53aaf8b4ad0000b0e01116c97ef52', id: "field-info", class: this.isEditing ? 'hidden-field' : 'ls-editor-field-draggable' }, this.innerValue || this.dataItem?.label || this.dataItem?.formElementType))));
25178
25186
  }
25179
25187
  static get watchers() { return {
25180
25188
  "selected": ["watchSelectedHandler"]
@@ -33277,37 +33285,37 @@ const LsParticipantSelect = class {
33277
33285
  console.log('Selected role:', this.selectedRole);
33278
33286
  }
33279
33287
  participantColor = (index) => {
33280
- return index > 200 ? defaultRolePalette[index - 200] : index > 100 ? defaultRolePalette[index - 100] : defaultRolePalette[index] || defaultRolePalette[0];
33288
+ return defaultRolePalette[index % 100] || defaultRolePalette[0];
33281
33289
  };
33282
33290
  render() {
33283
33291
  console.log(this.selectedRole);
33284
- return (h(Host, { key: 'ac8313459c9ae066ed40e81bb05e3d14261cffda' }, h("div", { key: '8203fe316fbbb5cd0ebf6396e7572006c64b10c9', class: "dropdown" }, h("div", { key: '365e40765ba17f4d23642b90249eed7d5b9f6081', class: "dropdown-header", onClick: this.toggleDropdown }, h("svg", { key: '48ac4df4b56bf90ed8d8a03b01340c1ba414362e', width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("path", { key: 'd5071886581872c9b4c3d360a10ee19d86ca02a6', 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" }), h("path", { key: 'fdee95b45ee528b1c5f561b70ef81a6cc1872d7a', 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" }), h("path", { key: 'ebba43ebbadfa87164184d156f3146a2b8d47b17', 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" }), h("path", { key: 'e5491d46f94c9594e4eb6466442b50233ee8758a', 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" })), h("p", { key: '3d118bf5aceafd26c2e7bb93445a0cb5af79beb5', class: 'placing-fields-text' }, "Placing Fields for"), h("div", { key: 'a83ea944e4ae65e746266cd4a337c0300328e932', class: 'selected-role-label', style: {
33285
- background: `var(--${this.participantColor(this.selectedRole?.signerIndex)}-20)`,
33286
- color: `var(--${this.participantColor(this.selectedRole?.signerIndex)}-90)`,
33287
- } }, h("ls-icon", { key: 'ca3b2327d2a749dc146fe92bbe510998cbe3e3f7', size: "18", name: this.selectedRole?.roleType === 'SENDER' ? 'user' : this.selectedRole?.roleType === 'APPROVER' ? 'check-circle' : this.selectedRole?.roleType === 'WITNESS' ? 'eye' : 'signature' }), this.selectedRole.name ||
33288
- (this.selectedRole.signerIndex > 100 ? `Participant ${this.selectedRole.signerIndex - 100} Witness` : `Participant ${this.selectedRole.signerIndex}`)), h("button", { key: '53d0a139fae7d8a8eda65d1ca5f499eefca3c864', class: 'tertiaryGrey expand-button', "aria-haspopup": "listbox", "aria-expanded": this.isOpen }, h("ls-icon", { key: '7a7ea57794f3b7d22ab0c308ba91da6eb7b879da', name: "chevron-down" }))), this.isOpen && (h("div", { key: '18e980a31aa8a8a2f5d27a065ec7f6a92550c78b', class: "dropdown-list" }, h("div", { key: '31924def19a1db92cc8f8d5e08bbca8469d66ccc', class: this.selectedRole?.signerIndex === 0 ? 'dropdown-item selected' : 'dropdown-item', style: {
33289
- '--background-selected': `var(--${defaultRolePalette[0]}-10)`,
33290
- '--check-icon-selected': `var(--${defaultRolePalette[0]}-50)`,
33291
- }, 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') }, h("div", { key: 'bfc669a9f81fb9d6c77bb4f7c1bb8d6b5b9034d7', class: 'role-icon', style: {
33292
- background: `var(--${defaultRolePalette[0]}-40)`,
33293
- color: `var(--${defaultRolePalette[0]}-80)`,
33294
- } }, h("ls-icon", { key: 'e2aad499e826cbd6320771df672eb9ff8e7cce06', name: "user" })), h("div", { key: 'c78dc9065fab3b8ff98923542ce232e2cc07e9e8', class: 'role-text' }, h("p", { key: '7ece02f690e2d7c53628f6e3e3726b430f364f02', class: 'role-name', style: {
33295
- '--role-name-selected': `var(--${defaultRolePalette[0]}-100)`,
33296
- } }, 'Sender'), h("p", { key: '29ec9f8c6039ad54eb41b34d4be4dc59d561ac7f', class: 'role-type', style: {
33297
- '--role-type-selected': `var(--${defaultRolePalette[0]}-80)`,
33298
- } }, "You")), h("ls-icon", { key: 'd1aa6fe64c918563eb94d1079deb90680aef69a9', class: 'check-icon', name: this.selectedRole?.signerIndex === 0 ? 'check-circle' : 'base-circle', solid: this.selectedRole?.signerIndex === 0 })), this.roles.map(r => (h("div", { class: r.signerIndex === this.selectedRole?.signerIndex ? 'dropdown-item selected' : 'dropdown-item', style: {
33299
- '--background-selected': `var(--${this.participantColor(r?.signerIndex)}-10)`,
33300
- '--check-icon-selected': `var(--${this.participantColor(r?.signerIndex)}-50)`,
33292
+ return (h(Host, { key: '376dc00f9ed35a608669050a14c3a6ec77222ae1' }, h("div", { key: 'bffe48d89c04e6d38de5a34d721fc62875233b8c', class: "dropdown" }, h("div", { key: '291784e958e45a72305fbdbbd220a3237e829e3b', class: "dropdown-header", onClick: this.toggleDropdown }, h("svg", { key: 'c4ae298b8fc164af5b3823952165885ece44a628', width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("path", { key: 'f18b791336b7901257dae3215ed0ef4128928e1d', 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" }), h("path", { key: '6334dacce4604c2b2a8208232e5e3e2dfbeda08d', 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" }), h("path", { key: 'a00c1daded99250cea5638c25fde7449cea1fb3f', 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" }), h("path", { key: '72c04a47d2856141e4d3083864f00c1ce2bc62ce', 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" })), h("p", { key: 'f44c6d982de08655cdd15a03145b3a711d045df6', class: 'placing-fields-text' }, "Placing Fields for"), h("div", { key: 'd83960f9c8999046c6e3e1137865e1036c651e85', class: 'selected-role-label', style: {
33293
+ background: this.participantColor(this.selectedRole?.signerIndex).s20,
33294
+ color: this.participantColor(this.selectedRole?.signerIndex).s80,
33295
+ } }, h("ls-icon", { key: '733e9f601506e58fecd83f1a5062561ef68efb01', size: "18", name: this.selectedRole?.roleType === 'SENDER' ? 'user' : this.selectedRole?.roleType === 'APPROVER' ? 'check-circle' : this.selectedRole?.roleType === 'WITNESS' ? 'eye' : 'signature' }), this.selectedRole.name ||
33296
+ (this.selectedRole.signerIndex > 100 ? `Participant ${this.selectedRole.signerIndex - 100} Witness` : `Participant ${this.selectedRole.signerIndex}`)), h("button", { key: 'c5f307779432fdde633d661b19d213a8e0fbfdc3', class: 'tertiaryGrey expand-button', "aria-haspopup": "listbox", "aria-expanded": this.isOpen }, h("ls-icon", { key: '5da68fd1dade4668364d2e328a6a404a772092eb', name: "chevron-down" }))), this.isOpen && (h("div", { key: '6545db8c8c0094cd863037f2e7c94c87e8a34f5b', class: "dropdown-list" }, h("div", { key: '4b4b466b9d9f553afb2dcbe4d1e1c623be4c3aa3', class: this.selectedRole?.signerIndex === 0 ? 'dropdown-item selected' : 'dropdown-item', style: {
33297
+ '--background-selected': defaultRolePalette[0].s10,
33298
+ '--check-icon-selected': defaultRolePalette[0].s50,
33299
+ }, 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') }, h("div", { key: '9f4035308fc39587e417cf0a1e088a4175c118f9', class: 'role-icon', style: {
33300
+ background: defaultRolePalette[0].s50,
33301
+ color: defaultRolePalette[0].s80,
33302
+ } }, h("ls-icon", { key: '282c618109165a412bf12d6d9eb17216f1136b0d', name: "user" })), h("div", { key: '1e45e9c7405abc4e230a28eb793d984a9a71434b', class: 'role-text' }, h("p", { key: '0971c5ec3fac86c604a27a9b258d1edc75116308', class: 'role-name', style: {
33303
+ '--role-name-selected': defaultRolePalette[0].s80,
33304
+ } }, 'Sender'), h("p", { key: '94047f15d4dd4046343924e7c553eb947c07e363', class: 'role-type', style: {
33305
+ '--role-type-selected': defaultRolePalette[0].s80,
33306
+ } }, "You")), h("ls-icon", { key: 'ec8d3927cd65ac9a2ed789c67f43c2556645cc7f', class: 'check-icon', name: this.selectedRole?.signerIndex === 0 ? 'check-circle' : 'base-circle', solid: this.selectedRole?.signerIndex === 0 })), this.roles.map(r => (h("div", { class: r.signerIndex === this.selectedRole?.signerIndex ? 'dropdown-item selected' : 'dropdown-item', style: {
33307
+ '--background-selected': this.participantColor(r?.signerIndex).s10,
33308
+ '--check-icon-selected': this.participantColor(r?.signerIndex).s50,
33301
33309
  }, onClick: () => this.selectRole(r), onMouseEnter: e => e.currentTarget.querySelector('.check-icon')?.setAttribute('name', 'check-circle'), onMouseLeave: e => e.currentTarget
33302
33310
  .querySelector('.check-icon')
33303
33311
  ?.setAttribute('name', r.signerIndex !== this.selectedRole?.signerIndex ? 'base-circle' : 'check-circle') }, h("div", { class: 'role-icon', style: {
33304
- background: r.signerIndex > 100 ? `var(--${this.participantColor(r?.signerIndex)}-30)` : `var(--${this.participantColor(r?.signerIndex)}-40)`,
33312
+ background: r.signerIndex > 100 ? this.participantColor(r?.signerIndex).s20 : this.participantColor(r?.signerIndex).s50,
33305
33313
  color: `var(--${this.participantColor(r?.signerIndex)}-90)`,
33306
33314
  } }, h("ls-icon", { name: r.roleType === 'WITNESS' ? 'eye' : r.roleType === 'APPROVER' ? 'check-circle' : 'signature' })), h("div", { class: 'role-text' }, h("p", { class: 'role-name', style: {
33307
33315
  '--role-name-selected': `var(--${this.participantColor(r?.signerIndex)}-100)`,
33308
33316
  } }, r.name || r.signerIndex > 100 ? `Participant ${r.signerIndex - 100} Witness` : `Participant ${r.signerIndex}`), h("p", { class: 'role-type', style: {
33309
33317
  '--role-type-selected': `var(--${this.participantColor(r?.signerIndex)}-80)`,
33310
- } }, r.roleType === 'WITNESS' ? 'Witness' : r.roleType === 'APPROVER' ? 'Approver' : 'Signer')), h("ls-icon", { class: 'check-icon', name: r.signerIndex === this.selectedRole?.signerIndex ? 'check-circle' : 'base-circle', solid: r.signerIndex === this.selectedRole?.signerIndex }))))))), h("slot", { key: '7322ac85f9aa04b6e7eff1a57cd2570122274517' })));
33318
+ } }, r.roleType === 'WITNESS' ? 'Witness' : r.roleType === 'APPROVER' ? 'Approver' : 'Signer')), h("ls-icon", { class: 'check-icon', name: r.signerIndex === this.selectedRole?.signerIndex ? 'check-circle' : 'base-circle', solid: r.signerIndex === this.selectedRole?.signerIndex }))))))), h("slot", { key: 'b2f3b76d52dab109697f7edb8d81085c7237128f' })));
33311
33319
  }
33312
33320
  };
33313
33321
  LsParticipantSelect.style = lsParticipantSelectCss;