legalesign-document-viewer 0.4.9 → 0.5.0

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 (432) hide show
  1. package/dist/cjs/{index-C4ibYtjE.js → index-Czv4Oowx.js} +83 -47
  2. package/dist/cjs/index-Czv4Oowx.js.map +1 -0
  3. package/dist/cjs/loader.cjs.js +2 -2
  4. package/dist/cjs/loader.cjs.js.map +1 -1
  5. package/dist/cjs/ls-compose-manager.cjs.entry.js +3 -5
  6. package/dist/cjs/ls-document-options_46.cjs.entry.js +35222 -19916
  7. package/dist/cjs/ls-document-viewer.cjs.js +3 -3
  8. package/dist/cjs/ls-document-viewer.cjs.js.map +1 -1
  9. package/dist/cjs/ls-field-properties-dropdown.cjs.entry.js +3 -5
  10. package/dist/cjs/ls-formfield.cjs.entry.js +101 -5
  11. package/dist/cjs/ls-number-input_5.cjs.entry.js +938 -13
  12. package/dist/collection/collection-manifest.json +2 -2
  13. package/dist/collection/components/ls-compose-manager/ls-compose-manager.js +0 -1
  14. package/dist/collection/components/ls-compose-manager/ls-compose-manager.js.map +1 -1
  15. package/dist/collection/components/ls-document-options/ls-document-options.js +0 -2
  16. package/dist/collection/components/ls-document-options/ls-document-options.js.map +1 -1
  17. package/dist/collection/components/ls-document-viewer/editorCalculator.js +4 -6
  18. package/dist/collection/components/ls-document-viewer/editorCalculator.js.map +1 -1
  19. package/dist/collection/components/ls-document-viewer/editorUtils.js +1 -2
  20. package/dist/collection/components/ls-document-viewer/editorUtils.js.map +1 -1
  21. package/dist/collection/components/ls-document-viewer/keyHandlers.js +0 -5
  22. package/dist/collection/components/ls-document-viewer/keyHandlers.js.map +1 -1
  23. package/dist/collection/components/ls-document-viewer/ls-document-viewer.js +62 -77
  24. package/dist/collection/components/ls-document-viewer/ls-document-viewer.js.map +1 -1
  25. package/dist/collection/components/ls-document-viewer/mouseHandlers.js +27 -6
  26. package/dist/collection/components/ls-document-viewer/mouseHandlers.js.map +1 -1
  27. package/dist/collection/components/ls-editor-field/ls-editor-field.js +21 -22
  28. package/dist/collection/components/ls-editor-field/ls-editor-field.js.map +1 -1
  29. package/dist/collection/components/ls-editor-table/ls-editor-table.js +0 -1
  30. package/dist/collection/components/ls-editor-table/ls-editor-table.js.map +1 -1
  31. package/dist/collection/components/ls-feature-column/ls-feature-column.js +2 -2
  32. package/dist/collection/components/ls-field-alignment/ls-field-alignment.js +2 -8
  33. package/dist/collection/components/ls-field-alignment/ls-field-alignment.js.map +1 -1
  34. package/dist/collection/components/ls-field-content/ls-field-content.js +3 -5
  35. package/dist/collection/components/ls-field-content/ls-field-content.js.map +1 -1
  36. package/dist/collection/components/ls-field-dimensions/ls-field-dimensions.js +19 -4
  37. package/dist/collection/components/ls-field-dimensions/ls-field-dimensions.js.map +1 -1
  38. package/dist/collection/components/ls-field-distribute/ls-field-distribute.js +42 -68
  39. package/dist/collection/components/ls-field-distribute/ls-field-distribute.js.map +1 -1
  40. package/dist/collection/components/ls-field-footer/ls-field-footer.js +24 -14
  41. package/dist/collection/components/ls-field-footer/ls-field-footer.js.map +1 -1
  42. package/dist/collection/components/ls-field-format/ls-field-format.js +11 -35
  43. package/dist/collection/components/ls-field-format/ls-field-format.js.map +1 -1
  44. package/dist/collection/components/ls-field-placement/ls-field-placement.js +1 -26
  45. package/dist/collection/components/ls-field-placement/ls-field-placement.js.map +1 -1
  46. package/dist/collection/components/ls-field-properties/ls-field-properties.js +0 -1
  47. package/dist/collection/components/ls-field-properties/ls-field-properties.js.map +1 -1
  48. package/dist/collection/components/ls-field-properties-advanced/ls-field-properties-advanced.js +3 -28
  49. package/dist/collection/components/ls-field-properties-advanced/ls-field-properties-advanced.js.map +1 -1
  50. package/dist/collection/components/ls-field-properties-autosign/ls-field-properties-autosign.js +0 -1
  51. package/dist/collection/components/ls-field-properties-autosign/ls-field-properties-autosign.js.map +1 -1
  52. package/dist/collection/components/ls-field-properties-container/ls-field-properties-container.js +2 -4
  53. package/dist/collection/components/ls-field-properties-container/ls-field-properties-container.js.map +1 -1
  54. package/dist/collection/components/ls-field-properties-date/ls-field-properties-date.js +0 -1
  55. package/dist/collection/components/ls-field-properties-date/ls-field-properties-date.js.map +1 -1
  56. package/dist/collection/components/ls-field-properties-dropdown/ls-field-properties-dropdown.js +0 -1
  57. package/dist/collection/components/ls-field-properties-dropdown/ls-field-properties-dropdown.js.map +1 -1
  58. package/dist/collection/components/ls-field-properties-email/ls-field-properties-email.js +0 -1
  59. package/dist/collection/components/ls-field-properties-email/ls-field-properties-email.js.map +1 -1
  60. package/dist/collection/components/ls-field-properties-file/ls-field-properties-file.js +0 -1
  61. package/dist/collection/components/ls-field-properties-file/ls-field-properties-file.js.map +1 -1
  62. package/dist/collection/components/ls-field-properties-general/ls-field-properties-general.js +0 -1
  63. package/dist/collection/components/ls-field-properties-general/ls-field-properties-general.js.map +1 -1
  64. package/dist/collection/components/ls-field-properties-image/ls-field-properties-image.js +0 -1
  65. package/dist/collection/components/ls-field-properties-image/ls-field-properties-image.js.map +1 -1
  66. package/dist/collection/components/ls-field-properties-multiple/ls-field-properties-multiple.js +1 -2
  67. package/dist/collection/components/ls-field-properties-multiple/ls-field-properties-multiple.js.map +1 -1
  68. package/dist/collection/components/ls-field-properties-number/ls-field-properties-number.js +0 -1
  69. package/dist/collection/components/ls-field-properties-number/ls-field-properties-number.js.map +1 -1
  70. package/dist/collection/components/ls-field-properties-signature/ls-field-properties-signature.js +0 -1
  71. package/dist/collection/components/ls-field-properties-signature/ls-field-properties-signature.js.map +1 -1
  72. package/dist/collection/components/ls-field-properties-text/ls-field-properties-text.js +0 -1
  73. package/dist/collection/components/ls-field-properties-text/ls-field-properties-text.js.map +1 -1
  74. package/dist/collection/components/ls-field-size/ls-field-size.js +1 -25
  75. package/dist/collection/components/ls-field-size/ls-field-size.js.map +1 -1
  76. package/dist/collection/components/ls-field-type-display/ls-field-type-display.js +3 -3
  77. package/dist/collection/components/ls-formfield/inputs/ls-number-input/ls-number-input.js +26 -26
  78. package/dist/collection/components/ls-formfield/inputs/ls-radio-input/ls-radio-input.js +9 -10
  79. package/dist/collection/components/ls-formfield/inputs/ls-radio-input/ls-radio-input.js.map +1 -1
  80. package/dist/collection/components/ls-formfield/inputs/ls-select-input/ls-select-input.js +24 -24
  81. package/dist/collection/components/ls-formfield/inputs/ls-text-input/ls-text-input.js +27 -27
  82. package/dist/collection/components/ls-formfield/inputs/ls-textarea-input/ls-textarea-input.js +28 -28
  83. package/dist/collection/components/ls-formfield/ls-formfield.js +42 -43
  84. package/dist/collection/components/ls-formfield/ls-formfield.js.map +1 -1
  85. package/dist/collection/components/ls-helper-bar/ls-helper-bar.js +1 -1
  86. package/dist/collection/components/ls-icon/ls-icon.js +5 -6
  87. package/dist/collection/components/ls-icon/ls-icon.js.map +1 -1
  88. package/dist/collection/components/ls-input-wrapper/ls-input-wrapper.js +3 -3
  89. package/dist/collection/components/ls-keyboard-shortcuts/ls-keyboard-shortcuts.js +0 -1
  90. package/dist/collection/components/ls-keyboard-shortcuts/ls-keyboard-shortcuts.js.map +1 -1
  91. package/dist/collection/components/ls-participant-card/ls-participant-card.js +11 -38
  92. package/dist/collection/components/ls-participant-card/ls-participant-card.js.map +1 -1
  93. package/dist/collection/components/ls-participant-manager/ls-participant-manager.js +0 -2
  94. package/dist/collection/components/ls-participant-manager/ls-participant-manager.js.map +1 -1
  95. package/dist/collection/components/ls-participant-select/ls-participant-select.js +2 -3
  96. package/dist/collection/components/ls-participant-select/ls-participant-select.js.map +1 -1
  97. package/dist/collection/components/ls-props-section/ls-props-section.js +5 -5
  98. package/dist/collection/components/ls-recipient-card/ls-recipient-card.js +3 -7
  99. package/dist/collection/components/ls-recipient-card/ls-recipient-card.js.map +1 -1
  100. package/dist/collection/components/ls-statusbar/ls-statusbar.js +11 -12
  101. package/dist/collection/components/ls-statusbar/ls-statusbar.js.map +1 -1
  102. package/dist/collection/components/ls-title-input/ls-title-input.js +1 -25
  103. package/dist/collection/components/ls-title-input/ls-title-input.js.map +1 -1
  104. package/dist/collection/components/ls-toggle/ls-toggle.js +4 -4
  105. package/dist/collection/components/ls-toolbar/ls-toolbar.js +1 -6
  106. package/dist/collection/components/ls-toolbar/ls-toolbar.js.map +1 -1
  107. package/dist/collection/components/ls-toolbox-field/ls-toolbox-field.js +19 -19
  108. package/dist/collection/components/ls-tooltip/ls-tooltip.js +6 -7
  109. package/dist/collection/components/ls-tooltip/ls-tooltip.js.map +1 -1
  110. package/dist/collection/components/ls-validation-manager/ls-validation-manager.js +0 -1
  111. package/dist/collection/components/ls-validation-manager/ls-validation-manager.js.map +1 -1
  112. package/dist/collection/components/ls-validation-tag/ls-validation-tag.js +4 -5
  113. package/dist/collection/components/ls-validation-tag/ls-validation-tag.js.map +1 -1
  114. package/dist/components/index.js +1 -1
  115. package/dist/components/ls-compose-manager.js +10 -8
  116. package/dist/components/ls-compose-manager.js.map +1 -1
  117. package/dist/components/ls-document-options.js +1 -1
  118. package/dist/components/ls-document-viewer.js +34998 -20051
  119. package/dist/components/ls-document-viewer.js.map +1 -1
  120. package/dist/components/ls-editor-field.js +1 -1
  121. package/dist/components/ls-editor-table.js +1 -1
  122. package/dist/components/ls-feature-column.js +1 -1
  123. package/dist/components/ls-field-alignment.js +1 -1
  124. package/dist/components/ls-field-content.js +1 -1
  125. package/dist/components/ls-field-dimensions.js +1 -1
  126. package/dist/components/ls-field-distribute.js +1 -1
  127. package/dist/components/ls-field-footer.js +1 -1
  128. package/dist/components/ls-field-format.js +1 -1
  129. package/dist/components/ls-field-placement.js +1 -1
  130. package/dist/components/ls-field-properties-advanced.js +1 -1
  131. package/dist/components/ls-field-properties-autosign.js +1 -1
  132. package/dist/components/ls-field-properties-container.js +1 -1
  133. package/dist/components/ls-field-properties-date.js +1 -1
  134. package/dist/components/ls-field-properties-dropdown.js +37 -35
  135. package/dist/components/ls-field-properties-dropdown.js.map +1 -1
  136. package/dist/components/ls-field-properties-email.js +1 -1
  137. package/dist/components/ls-field-properties-file.js +1 -1
  138. package/dist/components/ls-field-properties-general.js +1 -1
  139. package/dist/components/ls-field-properties-image.js +1 -1
  140. package/dist/components/ls-field-properties-multiple.js +1 -1
  141. package/dist/components/ls-field-properties-number.js +1 -1
  142. package/dist/components/ls-field-properties-signature.js +1 -1
  143. package/dist/components/ls-field-properties-text.js +1 -1
  144. package/dist/components/ls-field-properties.js +1 -1
  145. package/dist/components/ls-field-size.js +1 -1
  146. package/dist/components/ls-field-type-display.js +1 -1
  147. package/dist/components/ls-formfield.js +121 -21
  148. package/dist/components/ls-formfield.js.map +1 -1
  149. package/dist/components/ls-helper-bar.js +1 -1
  150. package/dist/components/ls-icon.js +1 -1
  151. package/dist/components/ls-input-wrapper.js +1 -1
  152. package/dist/components/ls-keyboard-shortcuts.js +1 -1
  153. package/dist/components/ls-number-input.js +1 -1
  154. package/dist/components/ls-page-loader.js +1 -1
  155. package/dist/components/ls-participant-card.js +1 -1
  156. package/dist/components/ls-participant-manager.js +1 -1
  157. package/dist/components/ls-participant-select.js +1 -1
  158. package/dist/components/ls-props-section.js +1 -1
  159. package/dist/components/ls-radio-input.js +1 -1
  160. package/dist/components/ls-recipient-card.js +1 -1
  161. package/dist/components/ls-recipient-manager.js +1 -1
  162. package/dist/components/ls-select-input.js +1 -1
  163. package/dist/components/ls-statusbar.js +1 -1
  164. package/dist/components/ls-text-input.js +1 -1
  165. package/dist/components/ls-textarea-input.js +1 -1
  166. package/dist/components/ls-title-input.js +1 -1
  167. package/dist/components/ls-toggle.js +1 -1
  168. package/dist/components/ls-toolbar.js +1 -1
  169. package/dist/components/ls-toolbox-field.js +1 -1
  170. package/dist/components/ls-tooltip.js +1 -1
  171. package/dist/components/ls-validation-manager.js +1 -1
  172. package/dist/components/ls-validation-tag.js +1 -1
  173. package/dist/components/{p-CEARE5Dy.js → p-BCPpSevg.js} +16 -14
  174. package/dist/components/p-BCPpSevg.js.map +1 -0
  175. package/dist/components/{p-CwCWCxsI.js → p-BKrsDBDB.js} +2 -3
  176. package/dist/components/{p-CwCWCxsI.js.map → p-BKrsDBDB.js.map} +1 -1
  177. package/dist/components/p-BQZBAjo_.js +48 -0
  178. package/dist/components/p-BQZBAjo_.js.map +1 -0
  179. package/dist/components/p-BbRzNkJ-.js +363 -0
  180. package/dist/components/p-BbRzNkJ-.js.map +1 -0
  181. package/dist/components/{p-8ubyIwnl.js → p-BcSJFRsU.js} +15 -13
  182. package/dist/components/p-BcSJFRsU.js.map +1 -0
  183. package/dist/components/{p-BnGihP6t.js → p-BhZ5Udbm.js} +64 -43
  184. package/dist/components/p-BhZ5Udbm.js.map +1 -0
  185. package/dist/components/{p-DpEeDtkU.js → p-Bi1Fu2dm.js} +15 -13
  186. package/dist/components/p-Bi1Fu2dm.js.map +1 -0
  187. package/dist/components/{p-DYw5-WDF.js → p-BjENvp2j.js} +15 -13
  188. package/dist/components/p-BjENvp2j.js.map +1 -0
  189. package/dist/components/{p-CpKruuk0.js → p-BucYpLs3.js} +21 -19
  190. package/dist/components/p-BucYpLs3.js.map +1 -0
  191. package/dist/components/p-BxPfWmRj.js +572 -0
  192. package/dist/components/p-BxPfWmRj.js.map +1 -0
  193. package/dist/components/p-C6TaBByt.js +117 -0
  194. package/dist/components/p-C6TaBByt.js.map +1 -0
  195. package/dist/components/p-C9CUft6J.js +106 -0
  196. package/dist/components/p-C9CUft6J.js.map +1 -0
  197. package/dist/components/p-CDGosSW8.js +117 -0
  198. package/dist/components/{p-BdTy5xDV.js.map → p-CDGosSW8.js.map} +1 -1
  199. package/dist/components/p-CDgBo5Zz.js +117 -0
  200. package/dist/components/p-CDgBo5Zz.js.map +1 -0
  201. package/dist/components/{p-DNojPpNK.js → p-CEB07hOR.js} +11 -9
  202. package/dist/components/p-CEB07hOR.js.map +1 -0
  203. package/dist/components/p-CGQK3l8F.js +80 -0
  204. package/dist/components/p-CGQK3l8F.js.map +1 -0
  205. package/dist/components/{p-C3Qs4SL0.js → p-CJSY3-Q3.js} +12 -10
  206. package/dist/components/p-CJSY3-Q3.js.map +1 -0
  207. package/dist/components/p-CPZtW_1V.js +124 -0
  208. package/dist/components/p-CPZtW_1V.js.map +1 -0
  209. package/dist/components/p-C_uR3x8J.js +117 -0
  210. package/dist/components/p-C_uR3x8J.js.map +1 -0
  211. package/dist/components/{p-DuLbniAl.js → p-CazTGpgq.js} +11 -9
  212. package/dist/components/p-CazTGpgq.js.map +1 -0
  213. package/dist/components/p-CgKvhxXq.js +120 -0
  214. package/dist/components/p-CgKvhxXq.js.map +1 -0
  215. package/dist/components/p-Cie27m-1.js +73 -0
  216. package/dist/components/p-Cie27m-1.js.map +1 -0
  217. package/dist/components/p-Co-Giqfy.js +124 -0
  218. package/dist/components/p-Co-Giqfy.js.map +1 -0
  219. package/dist/components/{p-DMtkP3At.js → p-CvKjrahQ.js} +13 -11
  220. package/dist/components/p-CvKjrahQ.js.map +1 -0
  221. package/dist/components/p-Czz58vGf.js +117 -0
  222. package/dist/components/p-Czz58vGf.js.map +1 -0
  223. package/dist/components/{p-C0vy7fEN.js → p-D0cZaxkO.js} +16 -14
  224. package/dist/components/p-D0cZaxkO.js.map +1 -0
  225. package/dist/components/p-D836X_cy.js +317 -0
  226. package/dist/components/p-D836X_cy.js.map +1 -0
  227. package/dist/components/{p-95nSEls8.js → p-D95fiMAP.js} +11 -9
  228. package/dist/components/p-D95fiMAP.js.map +1 -0
  229. package/dist/components/{p-6l08SdGl.js → p-DFVuN2lH.js} +18 -16
  230. package/dist/components/p-DFVuN2lH.js.map +1 -0
  231. package/dist/components/p-DGiUKXDO.js +231 -0
  232. package/dist/components/p-DGiUKXDO.js.map +1 -0
  233. package/dist/components/p-DKaEsQyk.js +47 -0
  234. package/dist/components/p-DKaEsQyk.js.map +1 -0
  235. package/dist/components/p-DMZN9Rei.js +117 -0
  236. package/dist/components/p-DMZN9Rei.js.map +1 -0
  237. package/dist/components/p-DYQekJvr.js +101 -0
  238. package/dist/components/p-DYQekJvr.js.map +1 -0
  239. package/dist/components/p-D_mOmvQA.js +114 -0
  240. package/dist/components/p-D_mOmvQA.js.map +1 -0
  241. package/dist/components/p-DoAxt8ZN.js +67 -0
  242. package/dist/components/p-DoAxt8ZN.js.map +1 -0
  243. package/dist/components/{p-CwVY532N.js → p-DoQc-O0l.js} +13 -11
  244. package/dist/components/p-DoQc-O0l.js.map +1 -0
  245. package/dist/components/p-DpHCeHja.js +100 -0
  246. package/dist/components/p-DpHCeHja.js.map +1 -0
  247. package/dist/components/{p-CB6w78IO.js → p-DsR1ud4V.js} +33 -33
  248. package/dist/components/p-DsR1ud4V.js.map +1 -0
  249. package/dist/components/p-DskHTNiF.js +163 -0
  250. package/dist/components/p-DskHTNiF.js.map +1 -0
  251. package/dist/components/{p-Myru1I0U.js → p-Du60SSaA.js} +14 -12
  252. package/dist/components/p-Du60SSaA.js.map +1 -0
  253. package/dist/components/{p-CB2IouRT.js → p-Dz_jxFKX.js} +12 -10
  254. package/dist/components/p-Dz_jxFKX.js.map +1 -0
  255. package/dist/components/p-HpepQ3-E.js +117 -0
  256. package/dist/components/p-HpepQ3-E.js.map +1 -0
  257. package/dist/components/p-JIZHOmMy.js +76 -0
  258. package/dist/components/p-JIZHOmMy.js.map +1 -0
  259. package/dist/components/p-KMRQyALr.js +101 -0
  260. package/dist/components/p-KMRQyALr.js.map +1 -0
  261. package/dist/components/p-YcP4tU0u.js +168 -0
  262. package/dist/components/p-YcP4tU0u.js.map +1 -0
  263. package/dist/components/p-aA8RuwY_.js +104 -0
  264. package/dist/components/p-aA8RuwY_.js.map +1 -0
  265. package/dist/components/p-aDB_kHQ9.js +290 -0
  266. package/dist/components/p-aDB_kHQ9.js.map +1 -0
  267. package/dist/components/p-hah4tKwY.js +147 -0
  268. package/dist/components/p-hah4tKwY.js.map +1 -0
  269. package/dist/components/p-iIvOyhST.js +75 -0
  270. package/dist/components/p-iIvOyhST.js.map +1 -0
  271. package/dist/components/p-mRzg677Y.js +308 -0
  272. package/dist/components/p-mRzg677Y.js.map +1 -0
  273. package/dist/components/p-w39shV-b.js +117 -0
  274. package/dist/components/{p-B8NAATla.js.map → p-w39shV-b.js.map} +1 -1
  275. package/dist/components/p-w7mOEBr4.js +162 -0
  276. package/dist/components/p-w7mOEBr4.js.map +1 -0
  277. package/dist/esm/{index-o0lmYfXA.js → index-BwdJ-HOC.js} +83 -47
  278. package/dist/esm/index-BwdJ-HOC.js.map +1 -0
  279. package/dist/esm/loader.js +3 -3
  280. package/dist/esm/ls-compose-manager.entry.js +3 -5
  281. package/dist/esm/ls-compose-manager.entry.js.map +1 -1
  282. package/dist/esm/ls-document-options_46.entry.js +35221 -19916
  283. package/dist/esm/ls-document-viewer.js +4 -4
  284. package/dist/esm/ls-document-viewer.js.map +1 -1
  285. package/dist/esm/ls-field-properties-dropdown.entry.js +3 -5
  286. package/dist/esm/ls-field-properties-dropdown.entry.js.map +1 -1
  287. package/dist/esm/ls-formfield.entry.js +101 -5
  288. package/dist/esm/ls-formfield.entry.js.map +1 -1
  289. package/dist/esm/ls-number-input_5.entry.js +938 -13
  290. package/dist/ls-document-viewer/ls-document-viewer.esm.js +1 -1
  291. package/dist/ls-document-viewer/ls-document-viewer.esm.js.map +1 -1
  292. package/dist/ls-document-viewer/p-1442f973.entry.js +2 -0
  293. package/dist/ls-document-viewer/p-1442f973.entry.js.map +1 -0
  294. package/dist/ls-document-viewer/p-20b9c119.entry.js +4922 -0
  295. package/dist/ls-document-viewer/p-20b9c119.entry.js.map +1 -0
  296. package/dist/ls-document-viewer/p-31f8c44a.entry.js +2 -0
  297. package/dist/ls-document-viewer/p-31f8c44a.entry.js.map +1 -0
  298. package/dist/ls-document-viewer/p-BwdJ-HOC.js +3 -0
  299. package/dist/ls-document-viewer/p-BwdJ-HOC.js.map +1 -0
  300. package/dist/ls-document-viewer/p-caa89c6c.entry.js +2 -0
  301. package/dist/ls-document-viewer/p-caa89c6c.entry.js.map +1 -0
  302. package/dist/ls-document-viewer/p-d223d66a.entry.js +2 -0
  303. package/dist/ls-document-viewer/p-d223d66a.entry.js.map +1 -0
  304. package/dist/types/components/ls-document-viewer/ls-document-viewer.d.ts +8 -3
  305. package/dist/types/components/ls-document-viewer/mouseHandlers.d.ts +1 -0
  306. package/dist/types/components/ls-editor-field/ls-editor-field.d.ts +1 -1
  307. package/dist/types/components/ls-field-dimensions/ls-field-dimensions.d.ts +1 -0
  308. package/dist/types/components/ls-field-distribute/ls-field-distribute.d.ts +0 -1
  309. package/dist/types/components/ls-field-footer/ls-field-footer.d.ts +4 -1
  310. package/dist/types/components/ls-field-format/ls-field-format.d.ts +0 -1
  311. package/dist/types/components/ls-field-placement/ls-field-placement.d.ts +0 -1
  312. package/dist/types/components/ls-field-properties-advanced/ls-field-properties-advanced.d.ts +0 -1
  313. package/dist/types/components/ls-field-size/ls-field-size.d.ts +0 -1
  314. package/dist/types/components/ls-participant-card/ls-participant-card.d.ts +0 -1
  315. package/dist/types/components/ls-title-input/ls-title-input.d.ts +0 -1
  316. package/dist/types/components.d.ts +2 -18
  317. package/dist/types/stencil-public-runtime.d.ts +92 -2
  318. package/package.json +1 -1
  319. package/readme.md +9 -9
  320. package/dist/cjs/index-C4ibYtjE.js.map +0 -1
  321. package/dist/cjs/ls-compose-manager.cjs.entry.js.map +0 -1
  322. package/dist/cjs/ls-compose-manager.entry.cjs.js.map +0 -1
  323. package/dist/cjs/ls-document-options_46.cjs.entry.js.map +0 -1
  324. package/dist/cjs/ls-field-properties-dropdown.cjs.entry.js.map +0 -1
  325. package/dist/cjs/ls-field-properties-dropdown.entry.cjs.js.map +0 -1
  326. package/dist/cjs/ls-formfield.cjs.entry.js.map +0 -1
  327. package/dist/cjs/ls-formfield.entry.cjs.js.map +0 -1
  328. package/dist/cjs/ls-number-input.ls-radio-input.ls-select-input.ls-text-input.ls-textarea-input.entry.cjs.js.map +0 -1
  329. package/dist/cjs/ls-number-input_5.cjs.entry.js.map +0 -1
  330. package/dist/components/p-2R-Lmtr0.js +0 -145
  331. package/dist/components/p-2R-Lmtr0.js.map +0 -1
  332. package/dist/components/p-4zazHXkZ.js +0 -108
  333. package/dist/components/p-4zazHXkZ.js.map +0 -1
  334. package/dist/components/p-6l08SdGl.js.map +0 -1
  335. package/dist/components/p-8ubyIwnl.js.map +0 -1
  336. package/dist/components/p-95nSEls8.js.map +0 -1
  337. package/dist/components/p-B28ZaK_Y.js +0 -112
  338. package/dist/components/p-B28ZaK_Y.js.map +0 -1
  339. package/dist/components/p-B8NAATla.js +0 -115
  340. package/dist/components/p-BArB45ep.js +0 -115
  341. package/dist/components/p-BArB45ep.js.map +0 -1
  342. package/dist/components/p-BHTy08Q0.js +0 -83
  343. package/dist/components/p-BHTy08Q0.js.map +0 -1
  344. package/dist/components/p-BSoZFh0I.js +0 -46
  345. package/dist/components/p-BSoZFh0I.js.map +0 -1
  346. package/dist/components/p-BXjDp97T.js +0 -229
  347. package/dist/components/p-BXjDp97T.js.map +0 -1
  348. package/dist/components/p-BdTy5xDV.js +0 -115
  349. package/dist/components/p-BnGihP6t.js.map +0 -1
  350. package/dist/components/p-BzEEnXM3.js +0 -99
  351. package/dist/components/p-BzEEnXM3.js.map +0 -1
  352. package/dist/components/p-C0vy7fEN.js.map +0 -1
  353. package/dist/components/p-C3Qs4SL0.js.map +0 -1
  354. package/dist/components/p-CB2IouRT.js.map +0 -1
  355. package/dist/components/p-CB6w78IO.js.map +0 -1
  356. package/dist/components/p-CEARE5Dy.js.map +0 -1
  357. package/dist/components/p-CMrBTV-g.js +0 -45
  358. package/dist/components/p-CMrBTV-g.js.map +0 -1
  359. package/dist/components/p-COuOscFT.js +0 -68
  360. package/dist/components/p-COuOscFT.js.map +0 -1
  361. package/dist/components/p-CRf3zadK.js +0 -71
  362. package/dist/components/p-CRf3zadK.js.map +0 -1
  363. package/dist/components/p-CYeSt5Fo.js +0 -67
  364. package/dist/components/p-CYeSt5Fo.js.map +0 -1
  365. package/dist/components/p-Ca9OGLvH.js +0 -115
  366. package/dist/components/p-Ca9OGLvH.js.map +0 -1
  367. package/dist/components/p-CcmgTlbG.js +0 -78
  368. package/dist/components/p-CcmgTlbG.js.map +0 -1
  369. package/dist/components/p-Ce_FwQKY.js +0 -125
  370. package/dist/components/p-Ce_FwQKY.js.map +0 -1
  371. package/dist/components/p-CnLhdSVD.js +0 -115
  372. package/dist/components/p-CnLhdSVD.js.map +0 -1
  373. package/dist/components/p-CpKruuk0.js.map +0 -1
  374. package/dist/components/p-CqvHgqQi.js +0 -201
  375. package/dist/components/p-CqvHgqQi.js.map +0 -1
  376. package/dist/components/p-CwVY532N.js.map +0 -1
  377. package/dist/components/p-D0oqtZ7v.js +0 -161
  378. package/dist/components/p-D0oqtZ7v.js.map +0 -1
  379. package/dist/components/p-D5Lt75HV.js +0 -103
  380. package/dist/components/p-D5Lt75HV.js.map +0 -1
  381. package/dist/components/p-DMtkP3At.js.map +0 -1
  382. package/dist/components/p-DNojPpNK.js.map +0 -1
  383. package/dist/components/p-DVcM3j89.js +0 -97
  384. package/dist/components/p-DVcM3j89.js.map +0 -1
  385. package/dist/components/p-DXAEPHmo.js +0 -115
  386. package/dist/components/p-DXAEPHmo.js.map +0 -1
  387. package/dist/components/p-DYw5-WDF.js.map +0 -1
  388. package/dist/components/p-DhQKM6mo.js +0 -115
  389. package/dist/components/p-DhQKM6mo.js.map +0 -1
  390. package/dist/components/p-DjunXuAM.js +0 -115
  391. package/dist/components/p-DjunXuAM.js.map +0 -1
  392. package/dist/components/p-DpEeDtkU.js.map +0 -1
  393. package/dist/components/p-Dp_6qCVD.js +0 -165
  394. package/dist/components/p-Dp_6qCVD.js.map +0 -1
  395. package/dist/components/p-Dt8uznTD.js +0 -118
  396. package/dist/components/p-Dt8uznTD.js.map +0 -1
  397. package/dist/components/p-DtfgidTY.js +0 -123
  398. package/dist/components/p-DtfgidTY.js.map +0 -1
  399. package/dist/components/p-DuLbniAl.js.map +0 -1
  400. package/dist/components/p-Myru1I0U.js.map +0 -1
  401. package/dist/components/p-SymuFFwR.js +0 -171
  402. package/dist/components/p-SymuFFwR.js.map +0 -1
  403. package/dist/components/p-bm-gsw1C.js +0 -77
  404. package/dist/components/p-bm-gsw1C.js.map +0 -1
  405. package/dist/components/p-hgs41zT_.js +0 -103
  406. package/dist/components/p-hgs41zT_.js.map +0 -1
  407. package/dist/components/p-lCZRXn_O.js +0 -88
  408. package/dist/components/p-lCZRXn_O.js.map +0 -1
  409. package/dist/components/p-mtgdqmoW.js +0 -73
  410. package/dist/components/p-mtgdqmoW.js.map +0 -1
  411. package/dist/components/p-zhtYmA1Q.js +0 -80
  412. package/dist/components/p-zhtYmA1Q.js.map +0 -1
  413. package/dist/esm/index-o0lmYfXA.js.map +0 -1
  414. package/dist/esm/ls-document-options_46.entry.js.map +0 -1
  415. package/dist/esm/ls-number-input.ls-radio-input.ls-select-input.ls-text-input.ls-textarea-input.entry.js.map +0 -1
  416. package/dist/esm/ls-number-input_5.entry.js.map +0 -1
  417. package/dist/ls-document-viewer/ls-compose-manager.entry.esm.js.map +0 -1
  418. package/dist/ls-document-viewer/ls-field-properties-dropdown.entry.esm.js.map +0 -1
  419. package/dist/ls-document-viewer/ls-formfield.entry.esm.js.map +0 -1
  420. package/dist/ls-document-viewer/ls-number-input.ls-radio-input.ls-select-input.ls-text-input.ls-textarea-input.entry.esm.js.map +0 -1
  421. package/dist/ls-document-viewer/p-0f4af1a9.entry.js +0 -2
  422. package/dist/ls-document-viewer/p-0f4af1a9.entry.js.map +0 -1
  423. package/dist/ls-document-viewer/p-3ed8b266.entry.js +0 -2
  424. package/dist/ls-document-viewer/p-3ed8b266.entry.js.map +0 -1
  425. package/dist/ls-document-viewer/p-b1237a47.entry.js +0 -2
  426. package/dist/ls-document-viewer/p-b1237a47.entry.js.map +0 -1
  427. package/dist/ls-document-viewer/p-c59111e1.entry.js +0 -4922
  428. package/dist/ls-document-viewer/p-c59111e1.entry.js.map +0 -1
  429. package/dist/ls-document-viewer/p-f8d4e7a2.entry.js +0 -2
  430. package/dist/ls-document-viewer/p-f8d4e7a2.entry.js.map +0 -1
  431. package/dist/ls-document-viewer/p-o0lmYfXA.js +0 -3
  432. package/dist/ls-document-viewer/p-o0lmYfXA.js.map +0 -1
@@ -34,6 +34,7 @@ export class LsEditorField {
34
34
  this.isEditing = false;
35
35
  this.sizeObserver.observe(this.component.shadowRoot.getElementById('field-info'));
36
36
  }
37
+ e.stopPropagation();
37
38
  }
38
39
  handleMouseMove(e) {
39
40
  if (this.readonly)
@@ -57,8 +58,8 @@ export class LsEditorField {
57
58
  this.component.style.cursor = 'move';
58
59
  }
59
60
  }
60
- handleDoubleClick() {
61
- if (this.readonly)
61
+ handleDoubleClick(e) {
62
+ if (this.readonly || this.dataItem.formElementType === 'signature' || this.dataItem.formElementType === 'initials')
62
63
  return;
63
64
  this.isEditing = true;
64
65
  this.heldEdge = null;
@@ -71,6 +72,8 @@ export class LsEditorField {
71
72
  editbox.className = 'ls-editor-field-editable';
72
73
  editbox.focus();
73
74
  }
75
+ e.preventDefault();
76
+ e.stopPropagation();
74
77
  }
75
78
  handleDragStart(event) {
76
79
  // Add the target element's id to the data transfer object
@@ -128,7 +131,6 @@ export class LsEditorField {
128
131
  this.labeltimer = setTimeout(() => {
129
132
  const diffs = [{ action: 'update', data }];
130
133
  this.mutate.emit(diffs);
131
- this.update.emit(diffs);
132
134
  }, delay);
133
135
  }
134
136
  hexToRgba(hex, alpha) {
@@ -143,11 +145,10 @@ export class LsEditorField {
143
145
  ? { border: `2px ${defaultRolePalette[this.dataItem?.signer % 100].s60} solid`, boxShadow: '0 4px 6px -1px rgba(0, 0, 0, 0.10), 0 2px 4px -1px rgba(0, 0, 0, 0.06)' }
144
146
  : { border: `2px ${defaultRolePalette[this.dataItem?.signer % 100].s60} solid` };
145
147
  const zoomValue = parseFloat(this.zoom) || 1;
146
- console.log('Zoom value in field:', zoomValue);
147
- return (h(Host, { key: 'a4f5875c197571704825a994065e5c11f5138a1e', id: this.dataItem ? 'ls-field-' + this.dataItem.id : undefined, style: hostStyle, onMouseEnter: this.handleMouseEnter, onMouseLeave: this.handleMouseLeave }, h("div", { key: '8385e522e50335d6c5ab517bbf782f964683ca6b', class: {
148
+ return (h(Host, { key: '89a2f93e5353a2660bb262af4830b6911bd7ee64', id: this.dataItem ? 'ls-field-' + this.dataItem.id : undefined, style: hostStyle, onMouseEnter: this.handleMouseEnter, onMouseLeave: this.handleMouseLeave }, h("div", { key: '95decbf8fee094a5ac8e7f3e7314374b659b6579', class: {
148
149
  'ls-editor-field': true,
149
150
  'is-selected': this.selected,
150
- } }, !this.dataItem?.optional && h("ls-icon", { key: '902e5a17e75945c13b06eab2c003488f2e9a90fe', name: "required", size: `${0.75 * zoomValue}rem`, class: "required-icon", customStyle: { position: 'absolute', verticalAlign: 'top', top: `${0.125 * zoomValue}rem`, right: `${0.125 * zoomValue}rem` } }), h("input", { key: 'f4ee949c3c00671241433f80244a502cabf404bf', id: "editing-input", class: this.isEditing ? 'ls-editor-field-editable' : 'hidden-field', type: getInputType(this.dataItem.validation).inputType, value: this.dataItem?.value, checked: this.dataItem?.value ? true : false, onInput: e => this.alter({ value: e.target.value }) }), h("div", { key: '680784b3c815ae5a3a53d291466dd58d3d9045cf', id: "field-info", class: this.isEditing ? 'hidden-field' : 'ls-editor-field-draggable', style: { color: `${defaultRolePalette[this.dataItem?.signer % 100].s100}` } }, (this.dataItem.value.length && this.dataItem.value) || this.dataItem?.formElementType), (this.floatingActive || this.selected) && this.dataItem?.label && (h("div", { key: '1a597889f65850e1b0437f1cc259e3aa965888c0', style: {
151
+ } }, !this.dataItem?.optional && h("ls-icon", { key: '14b5c38881517f955428bf35d31f4282aae1e286', name: "required", size: `${0.75 * zoomValue}rem`, class: "required-icon", customStyle: { position: 'absolute', verticalAlign: 'top', top: `${0.125 * zoomValue}rem`, right: `${0.125 * zoomValue}rem` } }), h("input", { key: '404b2803acd1c74cfd8a8853623dad2c3ca74b20', id: "editing-input", class: this.isEditing ? 'ls-editor-field-editable' : 'hidden-field', type: getInputType(this.dataItem.validation).inputType, value: this.dataItem?.value, checked: this.dataItem?.value ? true : false, onInput: e => this.alter({ value: e.target.value }) }), h("div", { key: 'bb8c8de6ac5c3bce79b6bbf7df9a86da5084c572', id: "field-info", class: this.isEditing ? 'hidden-field' : 'ls-editor-field-draggable', style: { color: `${defaultRolePalette[this.dataItem?.signer % 100].s100}` } }, (this.dataItem.value.length && this.dataItem.value) || this.dataItem?.formElementType), (this.floatingActive || this.selected) && this.dataItem?.label && (h("div", { key: '21ebed73fd616a3655d55c10e3625592bdc6de64', style: {
151
152
  position: 'absolute',
152
153
  background: `${defaultRolePalette[this.dataItem?.signer % 100].s20}`,
153
154
  color: `${defaultRolePalette[this.dataItem?.signer % 100].s80}`,
@@ -158,7 +159,7 @@ export class LsEditorField {
158
159
  left: `-${2 * zoomValue}px`,
159
160
  whiteSpace: 'nowrap',
160
161
  width: 'fit-content',
161
- } }, this.dataItem?.label)), (this.floatingActive || this.selected) && (h("p", { key: '3ffbb7becbcb267715b0f1e9ac3dbf10c1be53ef', style: {
162
+ } }, this.dataItem?.label)), (this.floatingActive || this.selected) && (h("p", { key: 'e14e6cce83af912df7de7464dca48f8a55c2867f', style: {
162
163
  position: 'absolute',
163
164
  color: 'var(--gray-80, #3a3a3a)',
164
165
  bottom: `-${1.75 * zoomValue}rem`,
@@ -166,9 +167,9 @@ export class LsEditorField {
166
167
  left: '0',
167
168
  whiteSpace: 'nowrap',
168
169
  width: 'fit-content',
169
- } }, "Assigned to: ", this.assignee)), this.floatingActive && (h("button", { key: '9e9d0eb0e0f6addcab70db80f94e49fb0cc768e2', class: 'x-button', style: {
170
+ } }, "Assigned to: ", this.assignee)), this.floatingActive && (h("button", { key: '5e4ed8ed5bd08c555f203708544d24ac6a847f2d', class: 'x-button', style: {
170
171
  padding: `${0.125 * zoomValue}rem`,
171
- }, onClick: () => this.deleteField() }, h("ls-icon", { key: '0df2ef57c7cdf417e98810d673d3e8f42df43d3c', name: "x", size: `${0.625 * zoomValue}rem` }))))));
172
+ }, onClick: () => this.deleteField() }, h("ls-icon", { key: 'c63cbfd8a4c71b8dfc6693a5bdd339e37414774a', name: "x", size: `${0.625 * zoomValue}rem` }))))));
172
173
  }
173
174
  static get is() { return "ls-editor-field"; }
174
175
  static get encapsulation() { return "shadow"; }
@@ -186,7 +187,6 @@ export class LsEditorField {
186
187
  return {
187
188
  "assignee": {
188
189
  "type": "string",
189
- "attribute": "assignee",
190
190
  "mutable": false,
191
191
  "complexType": {
192
192
  "original": "string",
@@ -201,11 +201,11 @@ export class LsEditorField {
201
201
  },
202
202
  "getter": false,
203
203
  "setter": false,
204
- "reflect": false
204
+ "reflect": false,
205
+ "attribute": "assignee"
205
206
  },
206
207
  "dataItem": {
207
208
  "type": "unknown",
208
- "attribute": "data-item",
209
209
  "mutable": true,
210
210
  "complexType": {
211
211
  "original": "LSApiElement",
@@ -229,7 +229,6 @@ export class LsEditorField {
229
229
  },
230
230
  "selected": {
231
231
  "type": "boolean",
232
- "attribute": "selected",
233
232
  "mutable": false,
234
233
  "complexType": {
235
234
  "original": "boolean",
@@ -245,11 +244,11 @@ export class LsEditorField {
245
244
  "getter": false,
246
245
  "setter": false,
247
246
  "reflect": false,
247
+ "attribute": "selected",
248
248
  "defaultValue": "false"
249
249
  },
250
250
  "readonly": {
251
251
  "type": "boolean",
252
- "attribute": "readonly",
253
252
  "mutable": false,
254
253
  "complexType": {
255
254
  "original": "boolean",
@@ -264,11 +263,11 @@ export class LsEditorField {
264
263
  },
265
264
  "getter": false,
266
265
  "setter": false,
267
- "reflect": false
266
+ "reflect": false,
267
+ "attribute": "readonly"
268
268
  },
269
269
  "type": {
270
270
  "type": "string",
271
- "attribute": "type",
272
271
  "mutable": false,
273
272
  "complexType": {
274
273
  "original": "'text' | 'signature' | 'date' | 'regex' | 'file' | 'number' | 'autodate'",
@@ -283,11 +282,11 @@ export class LsEditorField {
283
282
  },
284
283
  "getter": false,
285
284
  "setter": false,
286
- "reflect": false
285
+ "reflect": false,
286
+ "attribute": "type"
287
287
  },
288
288
  "page": {
289
289
  "type": "unknown",
290
- "attribute": "page",
291
290
  "mutable": false,
292
291
  "complexType": {
293
292
  "original": "{ height: number; width: number }",
@@ -305,7 +304,6 @@ export class LsEditorField {
305
304
  },
306
305
  "fixedAspect": {
307
306
  "type": "number",
308
- "attribute": "fixed-aspect",
309
307
  "mutable": false,
310
308
  "complexType": {
311
309
  "original": "number | null",
@@ -321,11 +319,11 @@ export class LsEditorField {
321
319
  "getter": false,
322
320
  "setter": false,
323
321
  "reflect": false,
322
+ "attribute": "fixed-aspect",
324
323
  "defaultValue": "null"
325
324
  },
326
325
  "zoom": {
327
326
  "type": "string",
328
- "attribute": "zoom",
329
327
  "mutable": false,
330
328
  "complexType": {
331
329
  "original": "string",
@@ -340,11 +338,11 @@ export class LsEditorField {
340
338
  },
341
339
  "getter": false,
342
340
  "setter": false,
343
- "reflect": false
341
+ "reflect": false,
342
+ "attribute": "zoom"
344
343
  },
345
344
  "floatingActive": {
346
345
  "type": "boolean",
347
- "attribute": "floating-active",
348
346
  "mutable": true,
349
347
  "complexType": {
350
348
  "original": "boolean",
@@ -360,6 +358,7 @@ export class LsEditorField {
360
358
  "getter": false,
361
359
  "setter": false,
362
360
  "reflect": true,
361
+ "attribute": "floating-active",
363
362
  "defaultValue": "false"
364
363
  }
365
364
  };
@@ -1 +1 @@
1
- {"version":3,"file":"ls-editor-field.js","sourceRoot":"","sources":["../../../src/components/ls-editor-field/ls-editor-field.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAgB,MAAM,eAAe,CAAC;AAG7G,OAAO,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAC;AACjE,OAAO,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAO1E,MAAM,OAAO,aAAa;IACb,SAAS,CAAc;IAC1B,QAAQ,CAAS;IACA,QAAQ,CAAe;IACxC,QAAQ,GAAY,KAAK,CAAC;IAC1B,QAAQ,CAAU;IAClB,IA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AAE;wBACL,QAAQ,EAAE,UAAU;wBACpB,KAAK,EAAE,yBAAyB;wBAChC,MAAM,EAAE,IAAI,IAAI,GAAG,SAAS,KAAK;wBACjC,QAAQ,EAAE,GAAG,KAAK,GAAG,SAAS,KAAK;wBACnC,IAAI,EAAE,GAAG;wBACT,UAAU,EAAE,QAAQ;wBACpB,KAAK,EAAE,aAAa;qBACrB;;oBAEa,IAAI,CAAC,QAAQ,CACzB,CACL;gBACA,IAAI,CAAC,cAAc,IAAI,CACtB,+DACE,KAAK,EAAE,UAAU,EACjB,KAAK,EAAE;wBACL,OAAO,EAAE,GAAG,KAAK,GAAG,SAAS,KAAK;qBACnC,EACD,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,WAAW,EAAE;oBAEjC,gEAAS,IAAI,EAAC,GAAG,EAAC,IAAI,EAAE,GAAG,KAAK,GAAG,SAAS,KAAK,GAAI,CAC9C,CACV,CACG,CACD,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Host, h, Element, State, Prop, Watch, Listen, Event, EventEmitter } from '@stencil/core';\nimport { LSApiElement } from '../../components';\nimport { LSMutateEvent } from '../../types/LSMutateEvent';\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() assignee: string;\n @Prop({ mutable: true }) dataItem: LSApiElement;\n @Prop() selected: boolean = false;\n @Prop() readonly: boolean;\n @Prop() type: 'text' | 'signature' | 'date' | 'regex' | 'file' | 'number' | 'autodate';\n @Prop() page: { height: number; width: number };\n @Prop() fixedAspect: number | null = null;\n @State() isEditing: boolean = false;\n @State() heldEdge: string = null;\n @State() isEdgeDragging: boolean = false;\n @State() innerValue: string;\n @Prop() zoom: string;\n \n private sizeObserver: ResizeObserver;\n\n @Event({\n bubbles: true,\n cancelable: false,\n composed: true,\n })\n mutate: EventEmitter<LSMutateEvent[]>;\n\n @Event({\n bubbles: true,\n cancelable: false,\n composed: true,\n })\n update: EventEmitter<LSMutateEvent[]>;\n\n /**\n * Controls whether floating elements are visible. Set by mouse enter/leave events.\n */\n @Prop({ mutable: true, reflect: true }) floatingActive: boolean = false;\n\n // Set floatingActive true on mouse enter, false on mouse leave\n private handleMouseEnter = () => {\n this.floatingActive = true;\n };\n\n private handleMouseLeave = () => {\n this.floatingActive = false;\n };\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(this.dataItem);\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 // 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 = this.hexToRgba(defaultRolePalette[this.dataItem?.signer % 100].s20, 0.5);\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 = 'rgba(255,255,255,0.5)';\n this.component.style.boxShadow = 'none';\n }\n }\n\n deleteField = () => {\n this.mutate.emit([{ action: 'delete', data: this.dataItem }]);\n this.update.emit([{ action: 'delete', data: this.dataItem }]);\n };\n\n componentDidLoad() {\n this.sizeObserver = new ResizeObserver(entries => {\n for (const entry of entries) {\n if (entry.contentRect) {\n const movebox = this.component.shadowRoot.getElementById('field-info') as HTMLElement;\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.hexToRgba(defaultRolePalette[this.dataItem?.signer % 100].s20, 0.5);\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 = this.hexToRgba('ffffff', 0.7);\n this.component.style.boxShadow = 'none';\n }\n }\n\n // Send one or more mutations up the chain\n // The source of the chain fires the mutation\n // NOTE this alter is debounced to account for typing\n alter(diff: object) {\n this.dataItem = { ...this.dataItem, ...diff };\n this.debounce(this.dataItem, 900);\n }\n\n private labeltimer;\n\n debounce(data, delay) {\n if (this.labeltimer) clearTimeout(this.labeltimer);\n\n this.labeltimer = setTimeout(() => {\n const diffs: LSMutateEvent[] = [{ action: 'update', data }];\n this.mutate.emit(diffs);\n this.update.emit(diffs);\n }, delay);\n }\n\n hexToRgba(hex: string, alpha: number): string {\n hex = hex.replace('#', '');\n const r = parseInt(hex.substring(0, 2), 16);\n const g = parseInt(hex.substring(2, 4), 16);\n const b = parseInt(hex.substring(4, 6), 16);\n return `rgba(${r},${g},${b},${alpha})`;\n }\n\n render() {\n const hostStyle = this.floatingActive\n ? { border: `2px ${defaultRolePalette[this.dataItem?.signer % 100].s60} solid`, boxShadow: '0 4px 6px -1px rgba(0, 0, 0, 0.10), 0 2px 4px -1px rgba(0, 0, 0, 0.06)' }\n : { border: `2px ${defaultRolePalette[this.dataItem?.signer % 100].s60} solid` };\n\n const zoomValue = parseFloat(this.zoom) || 1;\n console.log('Zoom value in field:', zoomValue);\n\n return (\n <Host id={this.dataItem ? 'ls-field-' + this.dataItem.id : undefined} style={hostStyle} onMouseEnter={this.handleMouseEnter} onMouseLeave={this.handleMouseLeave}>\n <div\n class={{\n 'ls-editor-field': true,\n 'is-selected': this.selected,\n }}\n >\n {!this.dataItem?.optional && <ls-icon name=\"required\" size={`${0.75 * zoomValue}rem`} class=\"required-icon\" customStyle={{ position: 'absolute', verticalAlign: 'top', top: `${0.125 * zoomValue}rem`, right: `${0.125 * zoomValue}rem` }} />}\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}\n checked={this.dataItem?.value ? true : false}\n onInput={e => this.alter({ value: (e.target as HTMLInputElement).value })}\n />\n\n <div id=\"field-info\" class={this.isEditing ? 'hidden-field' : 'ls-editor-field-draggable'} style={{ color: `${defaultRolePalette[this.dataItem?.signer % 100].s100}` }}>\n {(this.dataItem.value.length && this.dataItem.value) || this.dataItem?.formElementType}\n </div>\n {(this.floatingActive || this.selected) && this.dataItem?.label && (\n <div\n style={{\n position: 'absolute',\n background: `${defaultRolePalette[this.dataItem?.signer % 100].s20}`,\n color: `${defaultRolePalette[this.dataItem?.signer % 100].s80}`,\n borderRadius: `${0.25 * zoomValue}rem`,\n padding: `${0.125 * zoomValue}rem ${0.25 * zoomValue}rem`,\n top: `-${1.375 * zoomValue}rem`,\n fontWeight: '500',\n left: `-${2 * zoomValue}px`,\n whiteSpace: 'nowrap',\n width: 'fit-content',\n }}\n >\n {this.dataItem?.label}\n </div>\n )}\n {(this.floatingActive || this.selected) && (\n <p\n style={{\n position: 'absolute',\n color: 'var(--gray-80, #3a3a3a)',\n bottom: `-${1.75 * zoomValue}rem`,\n fontSize: `${0.625 * zoomValue}rem`,\n left: '0',\n whiteSpace: 'nowrap',\n width: 'fit-content',\n }}\n >\n Assigned to: {this.assignee}\n </p>\n )}\n {this.floatingActive && (\n <button\n class={'x-button'}\n style={{\n padding: `${0.125 * zoomValue}rem`,\n }}\n onClick={() => this.deleteField()}\n >\n <ls-icon name=\"x\" size={`${0.625 * zoomValue}rem`} />\n </button>\n )}\n </div>\n </Host>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"ls-editor-field.js","sourceRoot":"","sources":["../../../src/components/ls-editor-field/ls-editor-field.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAgB,MAAM,eAAe,CAAC;AAG7G,OAAO,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAC;AACjE,OAAO,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAO1E,MAAM,OAAO,aAAa;IACb,SAAS,CAAc;IAC1B,QAAQ,CAAS;IACA,QAAQ,CAAe;IACxC,QAAQ,GAAY,KAAK,CAAC;IAC1B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AC,QAAQ,EAAE,KAAK,CACjB,CACP;gBACA,CAAC,IAAI,CAAC,cAAc,IAAI,IAAI,CAAC,QAAQ,CAAC,IAAI,CACzC,0DACE,KAAK,EAAE;wBACL,QAAQ,EAAE,UAAU;wBACpB,KAAK,EAAE,yBAAyB;wBAChC,MAAM,EAAE,IAAI,IAAI,GAAG,SAAS,KAAK;wBACjC,QAAQ,EAAE,GAAG,KAAK,GAAG,SAAS,KAAK;wBACnC,IAAI,EAAE,GAAG;wBACT,UAAU,EAAE,QAAQ;wBACpB,KAAK,EAAE,aAAa;qBACrB;;oBAEa,IAAI,CAAC,QAAQ,CACzB,CACL;gBACA,IAAI,CAAC,cAAc,IAAI,CACtB,+DACE,KAAK,EAAE,UAAU,EACjB,KAAK,EAAE;wBACL,OAAO,EAAE,GAAG,KAAK,GAAG,SAAS,KAAK;qBACnC,EACD,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,WAAW,EAAE;oBAEjC,gEAAS,IAAI,EAAC,GAAG,EAAC,IAAI,EAAE,GAAG,KAAK,GAAG,SAAS,KAAK,GAAI,CAC9C,CACV,CACG,CACD,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Host, h, Element, State, Prop, Watch, Listen, Event, EventEmitter } from '@stencil/core';\nimport { LSApiElement } from '../../components';\nimport { LSMutateEvent } from '../../types/LSMutateEvent';\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() assignee: string;\n @Prop({ mutable: true }) dataItem: LSApiElement;\n @Prop() selected: boolean = false;\n @Prop() readonly: boolean;\n @Prop() type: 'text' | 'signature' | 'date' | 'regex' | 'file' | 'number' | 'autodate';\n @Prop() page: { height: number; width: number };\n @Prop() fixedAspect: number | null = null;\n @State() isEditing: boolean = false;\n @State() heldEdge: string = null;\n @State() isEdgeDragging: boolean = false;\n @State() innerValue: string;\n @Prop() zoom: string;\n \n private sizeObserver: ResizeObserver;\n\n @Event({\n bubbles: true,\n cancelable: false,\n composed: true,\n })\n mutate: EventEmitter<LSMutateEvent[]>;\n\n @Event({\n bubbles: true,\n cancelable: false,\n composed: true,\n })\n update: EventEmitter<LSMutateEvent[]>;\n\n /**\n * Controls whether floating elements are visible. Set by mouse enter/leave events.\n */\n @Prop({ mutable: true, reflect: true }) floatingActive: boolean = false;\n\n // Set floatingActive true on mouse enter, false on mouse leave\n private handleMouseEnter = () => {\n this.floatingActive = true;\n };\n\n private handleMouseLeave = () => {\n this.floatingActive = false;\n };\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 e.stopPropagation();\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(e: MouseEvent) {\n if (this.readonly || this.dataItem.formElementType === 'signature' || this.dataItem.formElementType === 'initials') 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(this.dataItem);\n\n if (editbox) {\n editbox.className = 'ls-editor-field-editable';\n editbox.focus();\n }\n e.preventDefault();\n e.stopPropagation();\n }\n\n @Listen('dragstart', { capture: false, passive: false })\n handleDragStart(event) {\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 = this.hexToRgba(defaultRolePalette[this.dataItem?.signer % 100].s20, 0.5);\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 = 'rgba(255,255,255,0.5)';\n this.component.style.boxShadow = 'none';\n }\n }\n\n deleteField = () => {\n this.mutate.emit([{ action: 'delete', data: this.dataItem }]);\n this.update.emit([{ action: 'delete', data: this.dataItem }]);\n };\n\n componentDidLoad() {\n this.sizeObserver = new ResizeObserver(entries => {\n for (const entry of entries) {\n if (entry.contentRect) {\n const movebox = this.component.shadowRoot.getElementById('field-info') as HTMLElement;\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.hexToRgba(defaultRolePalette[this.dataItem?.signer % 100].s20, 0.5);\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 = this.hexToRgba('ffffff', 0.7);\n this.component.style.boxShadow = 'none';\n }\n }\n\n // Send one or more mutations up the chain\n // The source of the chain fires the mutation\n // NOTE this alter is debounced to account for typing\n alter(diff: object) {\n this.dataItem = { ...this.dataItem, ...diff };\n this.debounce(this.dataItem, 900);\n }\n\n private labeltimer;\n\n debounce(data, delay) {\n if (this.labeltimer) clearTimeout(this.labeltimer);\n\n this.labeltimer = setTimeout(() => {\n const diffs: LSMutateEvent[] = [{ action: 'update', data }];\n this.mutate.emit(diffs);\n }, delay);\n }\n\n hexToRgba(hex: string, alpha: number): string {\n hex = hex.replace('#', '');\n const r = parseInt(hex.substring(0, 2), 16);\n const g = parseInt(hex.substring(2, 4), 16);\n const b = parseInt(hex.substring(4, 6), 16);\n return `rgba(${r},${g},${b},${alpha})`;\n }\n\n render() {\n const hostStyle = this.floatingActive\n ? { border: `2px ${defaultRolePalette[this.dataItem?.signer % 100].s60} solid`, boxShadow: '0 4px 6px -1px rgba(0, 0, 0, 0.10), 0 2px 4px -1px rgba(0, 0, 0, 0.06)' }\n : { border: `2px ${defaultRolePalette[this.dataItem?.signer % 100].s60} solid` };\n\n const zoomValue = parseFloat(this.zoom) || 1;\n\n return (\n <Host id={this.dataItem ? 'ls-field-' + this.dataItem.id : undefined} style={hostStyle} onMouseEnter={this.handleMouseEnter} onMouseLeave={this.handleMouseLeave}>\n <div\n class={{\n 'ls-editor-field': true,\n 'is-selected': this.selected,\n }}\n >\n {!this.dataItem?.optional && <ls-icon name=\"required\" size={`${0.75 * zoomValue}rem`} class=\"required-icon\" customStyle={{ position: 'absolute', verticalAlign: 'top', top: `${0.125 * zoomValue}rem`, right: `${0.125 * zoomValue}rem` }} />}\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}\n checked={this.dataItem?.value ? true : false}\n onInput={e => this.alter({ value: (e.target as HTMLInputElement).value })}\n />\n\n <div id=\"field-info\" class={this.isEditing ? 'hidden-field' : 'ls-editor-field-draggable'} style={{ color: `${defaultRolePalette[this.dataItem?.signer % 100].s100}` }}>\n {(this.dataItem.value.length && this.dataItem.value) || this.dataItem?.formElementType}\n </div>\n {(this.floatingActive || this.selected) && this.dataItem?.label && (\n <div\n style={{\n position: 'absolute',\n background: `${defaultRolePalette[this.dataItem?.signer % 100].s20}`,\n color: `${defaultRolePalette[this.dataItem?.signer % 100].s80}`,\n borderRadius: `${0.25 * zoomValue}rem`,\n padding: `${0.125 * zoomValue}rem ${0.25 * zoomValue}rem`,\n top: `-${1.375 * zoomValue}rem`,\n fontWeight: '500',\n left: `-${2 * zoomValue}px`,\n whiteSpace: 'nowrap',\n width: 'fit-content',\n }}\n >\n {this.dataItem?.label}\n </div>\n )}\n {(this.floatingActive || this.selected) && (\n <p\n style={{\n position: 'absolute',\n color: 'var(--gray-80, #3a3a3a)',\n bottom: `-${1.75 * zoomValue}rem`,\n fontSize: `${0.625 * zoomValue}rem`,\n left: '0',\n whiteSpace: 'nowrap',\n width: 'fit-content',\n }}\n >\n Assigned to: {this.assignee}\n </p>\n )}\n {this.floatingActive && (\n <button\n class={'x-button'}\n style={{\n padding: `${0.125 * zoomValue}rem`,\n }}\n onClick={() => this.deleteField()}\n >\n <ls-icon name=\"x\" size={`${0.625 * zoomValue}rem`} />\n </button>\n )}\n </div>\n </Host>\n );\n }\n}\n"]}
@@ -41,7 +41,6 @@ export class LsEditorTable {
41
41
  return {
42
42
  "editor": {
43
43
  "type": "unknown",
44
- "attribute": "editor",
45
44
  "mutable": false,
46
45
  "complexType": {
47
46
  "original": "LsDocumentViewer",
@@ -1 +1 @@
1
- {"version":3,"file":"ls-editor-table.js","sourceRoot":"","sources":["../../../src/components/ls-editor-table/ls-editor-table.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,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;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Host, Prop, h, Element } from '@stencil/core';\nimport { LsDocumentViewer } from '../ls-document-viewer/ls-document-viewer';\n\n@Component({\n tag: 'ls-editor-table',\n styleUrl: 'ls-editor-table.css',\n shadow: true,\n})\nexport class LsEditorTable {\n @Element() component: HTMLElement;\n /**\n* The parent editor control.\n* {LsDocumentViewer}\n*/\n @Prop() editor: LsDocumentViewer;\n\n componentDidLoad() {\n var dataTable = this.component.shadowRoot.getElementById('ls-editor-table') as HTMLCanvasElement;\n Array.from(this.editor.component.shadowRoot.querySelectorAll('ls-editor-field')).forEach(fx => {\n\n const rowNode = document.createElement('tr');\n const idCellNode = document.createElement('td');\n idCellNode.innerText = fx.dataItem.id\n rowNode.appendChild(idCellNode);\n\n const valueCellNode = document.createElement('td');\n valueCellNode.innerText = fx.dataItem.value\n rowNode.appendChild(valueCellNode);\n\n const labelCellNode = document.createElement('td');\n labelCellNode.innerText = fx.dataItem.label\n rowNode.appendChild(labelCellNode);\n\n dataTable.appendChild(rowNode)\n })\n }\n\n render() {\n return (\n <Host>\n <table id=\"ls-editor-table\">\n </table>\n <slot></slot>\n </Host>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"ls-editor-table.js","sourceRoot":"","sources":["../../../src/components/ls-editor-table/ls-editor-table.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAQlE,MAAM,OAAO,aAAa;IACb,SAAS,CAAc;IAClC;;;IAGA;IACQ,MAAM,CAAmB;IAEjC,gBAAgB;QACd,IAAI,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,cAAc,CAAC,iBAAiB,CAAsB,CAAC;QACjG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,UAAU,CAAC,gBAAgB,CAAC,iBAAiB,CAAC,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC,EAAE;YAE5F,MAAM,OAAO,GAAG,QAAQ,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC;YAC7C,MAAM,UAAU,GAAG,QAAQ,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC;YAChD,UAAU,CAAC,SAAS,GAAG,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAA;YACrC,OAAO,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;YAEhC,MAAM,aAAa,GAAG,QAAQ,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC;YACnD,aAAa,CAAC,SAAS,GAAG,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAA;YAC3C,OAAO,CAAC,WAAW,CAAC,aAAa,CAAC,CAAC;YAEnC,MAAM,aAAa,GAAG,QAAQ,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC;YACnD,aAAa,CAAC,SAAS,GAAG,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAA;YAC3C,OAAO,CAAC,WAAW,CAAC,aAAa,CAAC,CAAC;YAEnC,SAAS,CAAC,WAAW,CAAC,OAAO,CAAC,CAAA;QAChC,CAAC,CAAC,CAAA;IACJ,CAAC;IAED,MAAM;QACJ,OAAO,CACL,EAAC,IAAI;YACH,8DAAO,EAAE,EAAC,iBAAiB,GACnB;YACR,8DAAa,CACR,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Host, Prop, h, Element } from '@stencil/core';\nimport { LsDocumentViewer } from '../ls-document-viewer/ls-document-viewer';\n\n@Component({\n tag: 'ls-editor-table',\n styleUrl: 'ls-editor-table.css',\n shadow: true,\n})\nexport class LsEditorTable {\n @Element() component: HTMLElement;\n /**\n* The parent editor control.\n* {LsDocumentViewer}\n*/\n @Prop() editor: LsDocumentViewer;\n\n componentDidLoad() {\n var dataTable = this.component.shadowRoot.getElementById('ls-editor-table') as HTMLCanvasElement;\n Array.from(this.editor.component.shadowRoot.querySelectorAll('ls-editor-field')).forEach(fx => {\n\n const rowNode = document.createElement('tr');\n const idCellNode = document.createElement('td');\n idCellNode.innerText = fx.dataItem.id\n rowNode.appendChild(idCellNode);\n\n const valueCellNode = document.createElement('td');\n valueCellNode.innerText = fx.dataItem.value\n rowNode.appendChild(valueCellNode);\n\n const labelCellNode = document.createElement('td');\n labelCellNode.innerText = fx.dataItem.label\n rowNode.appendChild(labelCellNode);\n\n dataTable.appendChild(rowNode)\n })\n }\n\n render() {\n return (\n <Host>\n <table id=\"ls-editor-table\">\n </table>\n <slot></slot>\n </Host>\n );\n }\n}\n"]}
@@ -51,7 +51,6 @@ export class LsFeatureColoumn {
51
51
  return {
52
52
  "manager": {
53
53
  "type": "string",
54
- "attribute": "manager",
55
54
  "mutable": true,
56
55
  "complexType": {
57
56
  "original": "'document' | 'toolbox' | 'participant'| 'recipient' | 'validation'",
@@ -67,11 +66,11 @@ export class LsFeatureColoumn {
67
66
  "getter": false,
68
67
  "setter": false,
69
68
  "reflect": false,
69
+ "attribute": "manager",
70
70
  "defaultValue": "'toolbox'"
71
71
  },
72
72
  "mode": {
73
73
  "type": "string",
74
- "attribute": "mode",
75
74
  "mutable": false,
76
75
  "complexType": {
77
76
  "original": "'preview' | 'editor' | 'compose'",
@@ -87,6 +86,7 @@ export class LsFeatureColoumn {
87
86
  "getter": false,
88
87
  "setter": false,
89
88
  "reflect": false,
89
+ "attribute": "mode",
90
90
  "defaultValue": "'editor'"
91
91
  }
92
92
  };
@@ -14,7 +14,6 @@ export class LsFieldAlignment {
14
14
  });
15
15
  this.dataItem = diffs.map(d => d.data);
16
16
  this.mutate.emit(diffs);
17
- this.update.emit(diffs);
18
17
  }
19
18
  right() {
20
19
  const rightmost = this.dataItem.reduce((rightmost, current) => {
@@ -35,7 +34,6 @@ export class LsFieldAlignment {
35
34
  });
36
35
  this.dataItem = diffs.map(d => d.data);
37
36
  this.mutate.emit(diffs);
38
- this.update.emit(diffs);
39
37
  }
40
38
  center() {
41
39
  const addcentres = this.dataItem.reduce((total, current) => {
@@ -60,7 +58,6 @@ export class LsFieldAlignment {
60
58
  console.log(diffs);
61
59
  this.dataItem = diffs.map(d => d.data);
62
60
  this.mutate.emit(diffs);
63
- this.update.emit(diffs);
64
61
  }
65
62
  top() {
66
63
  const topmost = this.dataItem.reduce((most, current) => {
@@ -94,7 +91,6 @@ export class LsFieldAlignment {
94
91
  });
95
92
  this.dataItem = diffs.map(d => d.data);
96
93
  this.mutate.emit(diffs);
97
- this.update.emit(diffs);
98
94
  }
99
95
  bottom() {
100
96
  const lowest = this.dataItem.reduce((acc, current) => {
@@ -114,15 +110,14 @@ export class LsFieldAlignment {
114
110
  });
115
111
  this.dataItem = diffs.map(d => d.data);
116
112
  this.mutate.emit(diffs);
117
- this.update.emit(diffs);
118
113
  }
119
114
  componentDidLoad() {
120
115
  attachAllTooltips(this.component.shadowRoot);
121
116
  }
122
117
  render() {
123
- return (h(Host, { key: '63398a2ccc1bc4cbd98d2858c2e2557cc7b37890' }, h("div", { key: '9e18ed6648be04c04c8d31a2141c282f95405e0b', class: 'ls-field-properties-section' }, h("div", { key: 'cdc65651627eab57be294950db80971aac9ab633', class: 'ls-field-properties-section-text' }, h("p", { key: 'ea997551b75b54f994a2b099369926183dfb164c', class: 'ls-field-properties-section-title' }, "Alignment"), h("p", { key: 'fef2f6130de37727e29ffbdd8e6c1d39347758ea', class: 'ls-field-properties-section-description' }, "Align your Fields relative to the page or multi-select and align then to each other.")), h("div", { key: '58f910381243daf9987373ca73cb850643457fae', class: 'multi-button-group-row' }, h("div", { key: 'a928ef05dc1a41bf172854be6de6e43d754ff215', class: 'button-group' }, h("button", { key: '0fd393359c52d53fc5acf0148cf45c35ff9a787f', onClick: () => this.left(), "aria-label": "Align selected fields vertically about their left edge.", "data-tooltip": "Align Left" }, h("ls-icon", { key: 'eb751025f62ce1482974e5244d36560ef6d652e2', name: "field-alignment-left" })), h("button", { key: '2ea4e049759d7bab322b09bf37006c9aca7d550a', onClick: () => this.center(), "aria-label": "Align selected fields vertically about their centre.", "data-tooltip": "Align Center" }, h("ls-icon", { key: '12e1e084e55992e5e8dcb3c616d354e813db4bc2', name: "field-alignment-centre" })), h("button", { key: '50820a4dbb9fe2ee520e6bfd18cd5c3c8798e485', onClick: () => {
118
+ return (h(Host, { key: '400db25c25a36e1c2556bb4ec06724864b9bf83d' }, h("div", { key: '47e10979f5e40df74c8ee295f2e0f3c24f026215', class: 'ls-field-properties-section' }, h("div", { key: '9c101afb5812f8958f420f9e3f2b180085156f0c', class: 'ls-field-properties-section-text' }, h("p", { key: 'd2f6af742ae404699954d0a038e98553ca6de830', class: 'ls-field-properties-section-title' }, "Alignment"), h("p", { key: '1ad0db4521681851ad7d2ea04b54714033f8983e', class: 'ls-field-properties-section-description' }, "Align your Fields relative to the page or multi-select and align then to each other.")), h("div", { key: 'c8aa1676673aa7dd6272fe215c2b932c3cf7b31e', class: 'multi-button-group-row' }, h("div", { key: '0fdba69a2964a55718efd5d7c0c8084fbb3f3c5b', class: 'button-group' }, h("button", { key: 'bce8132bc2b3d2c932312b5f5ce7202936ba0372', onClick: () => this.left(), "aria-label": "Align selected fields vertically about their left edge.", "data-tooltip": "Align Left" }, h("ls-icon", { key: '4ecde43b70300205a93860415001744d24e9e31f', name: "field-alignment-left" })), h("button", { key: 'd7b62d1433ab7d98573774b2e8ba11dfc933f09e', onClick: () => this.center(), "aria-label": "Align selected fields vertically about their centre.", "data-tooltip": "Align Center" }, h("ls-icon", { key: '88af50eb18c0e5c9759c38785374a080e0c68889', name: "field-alignment-centre" })), h("button", { key: 'f6567ecc6bcf13c853a92985a6c8892fbf9e2360', onClick: () => {
124
119
  this.right();
125
- }, "aria-label": "Align selected fields vertically about their right edge.", "data-tooltip": "Align Right" }, h("ls-icon", { key: '020ce69f599c1dd7ca53f00b48dd605c0c85da08', name: "field-alignment-right" }))), h("div", { key: '6b89b279eb02636d907dccc34c14a346850d774e', class: 'button-group' }, h("button", { key: '49a49d4ec2b27337b8e094926cdef9961c13d848', onClick: () => this.top(), "aria-label": "Align selected fields by their top.", "data-tooltip": "Align Top" }, h("ls-icon", { key: '1821a377171df23e2fa3d62204370023e03231eb', name: "field-alignment-top" })), h("button", { key: '03f2aac11c4c379782e3ec9b557ad9f76a8bb756', onClick: () => this.middle(), "aria-label": "Align selected fields by their middles.", "data-tooltip": "Align Middle" }, h("ls-icon", { key: 'df0d8013b46142216c431b5b13d3f329cf3f2bd2', name: "field-alignment-middle" })), h("button", { key: '122cdaa9caf98cc3d0bd06ed4cefb670c6095053', onClick: () => this.bottom(), "aria-label": "Align selected fields by their bottoms.", "data-tooltip": "Align Bottom" }, h("ls-icon", { key: 'a516854348931f5c64a52f3fc4ee9b902378c916', name: "field-alignment-bottom" }))))), h("slot", { key: 'a21b40bc260e0516f212908b6fdf37984f1e6303' }), h("ls-tooltip", { key: 'd2b66a3db33c6bb4b092a306326d9881c51eb05e', id: "ls-tooltip-master" })));
120
+ }, "aria-label": "Align selected fields vertically about their right edge.", "data-tooltip": "Align Right" }, h("ls-icon", { key: 'b4a316f3b22d598206e53b0aadc152af935a6c92', name: "field-alignment-right" }))), h("div", { key: 'ee1b1aaa94d60b6f8599c48cd41485699eaf8ec1', class: 'button-group' }, h("button", { key: '0533eb85453764ca44a586c7d189d09b9222fd03', onClick: () => this.top(), "aria-label": "Align selected fields by their top.", "data-tooltip": "Align Top" }, h("ls-icon", { key: '6baca0ef2df8e60749ca46f26fa614675aaabdaa', name: "field-alignment-top" })), h("button", { key: '1e2ef35fbe0f0b520091e40c3120ea6112f9b8b7', onClick: () => this.middle(), "aria-label": "Align selected fields by their middles.", "data-tooltip": "Align Middle" }, h("ls-icon", { key: 'b91876a9aec1e5c3f528ee679ac468298e8922f4', name: "field-alignment-middle" })), h("button", { key: 'ef6d7f773708d14ba4621ca900204dda6b5fb016', onClick: () => this.bottom(), "aria-label": "Align selected fields by their bottoms.", "data-tooltip": "Align Bottom" }, h("ls-icon", { key: 'b35d93c535bb179901af3c0a1fbb25a69bde5579', name: "field-alignment-bottom" }))))), h("slot", { key: 'be48e72ff93e6490eae685759d20d21cc0944745' }), h("ls-tooltip", { key: '8fe30e3b47397e4d9bdab32cce7629450bf4123e', id: "ls-tooltip-master" })));
126
121
  }
127
122
  static get is() { return "ls-field-alignment"; }
128
123
  static get encapsulation() { return "shadow"; }
@@ -140,7 +135,6 @@ export class LsFieldAlignment {
140
135
  return {
141
136
  "dataItem": {
142
137
  "type": "unknown",
143
- "attribute": "data-item",
144
138
  "mutable": true,
145
139
  "complexType": {
146
140
  "original": "LSApiElement[]",
@@ -1 +1 @@
1
- {"version":3,"file":"ls-field-alignment.js","sourceRoot":"","sources":["../../../src/components/ls-field-alignment/ls-field-alignment.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,EAAE,KAAK,EAAgB,OAAO,EAAE,MAAM,eAAe,CAAC;AAEvF,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAOxD,MAAM,OAAO,gBAAgB;IAChB,SAAS,CAAc;IACT,QAAQ,CAAiB;IAMlD,MAAM,CAAgC;IAOtC,MAAM,CAAgC;IAEtC,0CAA0C;IAC1C,6CAA6C;IAC7C,KAAK,CAAC,IAAY;QAChB,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QAElB,MAAM,KAAK,GAAoB,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE;YACnD,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,EAAE,GAAG,CAAC,EAAE,GAAG,IAAI,EAAkB,EAAE,CAAC;QACvE,CAAC,CAAC,CAAC;QAEH,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAoB,CAAC,CAAC;QACvD,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC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C,wBAAwB,GAAW,CAC1C;wBACT,+DAAQ,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,MAAM,EAAE,gBAAa,yCAAyC,kBAAc,cAAc;4BACpH,gEAAS,IAAI,EAAC,wBAAwB,GAAW,CAC1C,CACL,CACF,CACF;YAEN,8DAAa;YACb,mEAAY,EAAE,EAAC,mBAAmB,GAAG,CAChC,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Host, Prop, h, Event, EventEmitter, Element } from '@stencil/core';\nimport { LSApiElement, LSMutateEvent } from '../../components';\nimport { attachAllTooltips } from '../../utils/tooltip';\n\n@Component({\n tag: 'ls-field-alignment',\n styleUrl: 'ls-field-alignment.css',\n shadow: true,\n})\nexport class LsFieldAlignment {\n @Element() component: HTMLElement;\n @Prop({ mutable: true }) dataItem: LSApiElement[];\n @Event({\n bubbles: true,\n cancelable: true,\n composed: true,\n })\n mutate: EventEmitter<LSMutateEvent[]>;\n\n @Event({\n bubbles: true,\n cancelable: true,\n composed: true,\n })\n update: EventEmitter<LSMutateEvent[]>;\n\n // Send one or more mutations up the chain\n // The source of the chain fires the mutation\n alter(diff: object) {\n console.log(diff);\n\n const diffs: LSMutateEvent[] = this.dataItem.map(c => {\n return { action: 'update', data: { ...c, ...diff } as LSApiElement };\n });\n\n this.dataItem = diffs.map(d => d.data as LSApiElement);\n this.mutate.emit(diffs);\n this.update.emit(diffs);\n }\n\n right() {\n const rightmost = this.dataItem.reduce((rightmost, current) => {\n return current.left + current.width < rightmost ? rightmost : current.left + current.width;\n }, 0);\n\n console.log(rightmost);\n\n const diffs: LSMutateEvent[] = this.dataItem.map(c => {\n const newLeft = rightmost - c.width;\n\n return {\n action: 'update',\n data: {\n ...c,\n left: newLeft,\n ax: newLeft,\n bx: newLeft + c.width,\n } as LSApiElement,\n };\n });\n\n this.dataItem = diffs.map(d => d.data as LSApiElement);\n this.mutate.emit(diffs);\n this.update.emit(diffs);\n }\n\n center() {\n const addcentres = this.dataItem.reduce((total, current) => {\n console.log(total + (current.left + current.width / 2));\n return total + (current.left + current.width / 2);\n }, 0);\n console.log(addcentres);\n\n const cp = addcentres / this.dataItem.length;\n console.log('centerposition', cp);\n\n const diffs: LSMutateEvent[] = this.dataItem.map(c => {\n const newLeft = c.left + (cp - (c.left + c.width / 2));\n return {\n action: 'update',\n data: {\n ...c,\n left: newLeft,\n ax: newLeft,\n bx: newLeft + c.width,\n } as LSApiElement,\n };\n });\n console.log(diffs);\n this.dataItem = diffs.map(d => d.data as LSApiElement);\n this.mutate.emit(diffs);\n this.update.emit(diffs);\n }\n\n top() {\n const topmost = this.dataItem.reduce((most, current) => {\n return current.top < most ? most : current.top;\n }, 0);\n\n this.alter({ top: topmost });\n }\n\n left() {\n const leftmost = this.dataItem.reduce((least, current) => {\n return current.left < least ? current.left : least;\n }, this.dataItem[0].left);\n\n this.alter({ left: leftmost });\n }\n\n middle() {\n const addmiddles = this.dataItem.reduce((total, current) => {\n console.log(total + (current.top + current.height / 2));\n return total + (current.top + current.height / 2);\n }, 0);\n\n const cp = addmiddles / this.dataItem.length;\n\n const diffs: LSMutateEvent[] = this.dataItem.map(c => {\n const newTop = c.top + (cp - (c.top + c.height / 2));\n return {\n action: 'update',\n data: {\n ...c,\n top: newTop,\n ay: newTop,\n by: newTop + c.height,\n } as LSApiElement,\n };\n });\n this.dataItem = diffs.map(d => d.data as LSApiElement);\n this.mutate.emit(diffs);\n this.update.emit(diffs);\n }\n\n bottom() {\n const lowest = this.dataItem.reduce((acc, current) => {\n return acc > current.top + current.height ? acc : current.top + current.height;\n }, 0);\n\n const diffs: LSMutateEvent[] = this.dataItem.map(c => {\n const newTop = lowest - c.height;\n return {\n action: 'update',\n data: {\n ...c,\n top: newTop,\n ay: newTop,\n by: newTop + c.height,\n } as LSApiElement,\n };\n });\n this.dataItem = diffs.map(d => d.data as LSApiElement);\n this.mutate.emit(diffs);\n this.update.emit(diffs);\n }\n\n componentDidLoad() {\n attachAllTooltips(this.component.shadowRoot);\n }\n\n render() {\n return (\n <Host>\n <div class={'ls-field-properties-section'}>\n <div class={'ls-field-properties-section-text'}>\n <p class={'ls-field-properties-section-title'}>Alignment</p>\n <p class={'ls-field-properties-section-description'}>Align your Fields relative to the page or multi-select and align then to each other.</p>\n </div>\n <div class={'multi-button-group-row'}>\n <div class={'button-group'}>\n <button onClick={() => this.left()} aria-label=\"Align selected fields vertically about their left edge.\" data-tooltip=\"Align Left\">\n <ls-icon name=\"field-alignment-left\"></ls-icon>\n </button>\n <button onClick={() => this.center()} aria-label=\"Align selected fields vertically about their centre.\" data-tooltip=\"Align Center\">\n <ls-icon name=\"field-alignment-centre\"></ls-icon>\n </button>\n <button\n onClick={() => {\n this.right();\n }}\n aria-label=\"Align selected fields vertically about their right edge.\"\n data-tooltip=\"Align Right\"\n >\n <ls-icon name=\"field-alignment-right\"></ls-icon>\n </button>\n </div>\n <div class={'button-group'}>\n <button onClick={() => this.top()} aria-label=\"Align selected fields by their top.\" data-tooltip=\"Align Top\">\n <ls-icon name=\"field-alignment-top\"></ls-icon>\n </button>\n <button onClick={() => this.middle()} aria-label=\"Align selected fields by their middles.\" data-tooltip=\"Align Middle\">\n <ls-icon name=\"field-alignment-middle\"></ls-icon>\n </button>\n <button onClick={() => this.bottom()} aria-label=\"Align selected fields by their bottoms.\" data-tooltip=\"Align Bottom\">\n <ls-icon name=\"field-alignment-bottom\"></ls-icon>\n </button>\n </div>\n </div>\n </div>\n\n <slot></slot>\n <ls-tooltip id=\"ls-tooltip-master\" />\n </Host>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"ls-field-alignment.js","sourceRoot":"","sources":["../../../src/components/ls-field-alignment/ls-field-alignment.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,EAAE,KAAK,EAAgB,OAAO,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,kBACxD,aAAa;4BAE1B,gEAAS,IAAI,EAAC,uBAAuB,GAAW,CACzC,CACL;oBACN,4DAAK,KAAK,EAAE,cAAc;wBACxB,+DAAQ,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,GAAG,EAAE,gBAAa,qCAAqC,kBAAc,WAAW;4BAC1G,gEAAS,IAAI,EAAC,qBAAqB,GAAW,CACvC;wBACT,+DAAQ,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,MAAM,EAAE,gBAAa,yCAAyC,kBAAc,cAAc;4BACpH,gEAAS,IAAI,EAAC,wBAAwB,GAAW,CAC1C;wBACT,+DAAQ,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,MAAM,EAAE,gBAAa,yCAAyC,kBAAc,cAAc;4BACpH,gEAAS,IAAI,EAAC,wBAAwB,GAAW,CAC1C,CACL,CACF,CACF;YAEN,8DAAa;YACb,mEAAY,EAAE,EAAC,mBAAmB,GAAG,CAChC,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Host, Prop, h, Event, EventEmitter, Element } from '@stencil/core';\nimport { LSApiElement, LSMutateEvent } from '../../components';\nimport { attachAllTooltips } from '../../utils/tooltip';\n\n@Component({\n tag: 'ls-field-alignment',\n styleUrl: 'ls-field-alignment.css',\n shadow: true,\n})\nexport class LsFieldAlignment {\n @Element() component: HTMLElement;\n @Prop({ mutable: true }) dataItem: LSApiElement[];\n @Event({\n bubbles: true,\n cancelable: true,\n composed: true,\n })\n mutate: EventEmitter<LSMutateEvent[]>;\n\n @Event({\n bubbles: true,\n cancelable: true,\n composed: true,\n })\n update: EventEmitter<LSMutateEvent[]>;\n\n // Send one or more mutations up the chain\n // The source of the chain fires the mutation\n alter(diff: object) {\n console.log(diff);\n\n const diffs: LSMutateEvent[] = this.dataItem.map(c => {\n return { action: 'update', data: { ...c, ...diff } as LSApiElement };\n });\n\n this.dataItem = diffs.map(d => d.data as LSApiElement);\n this.mutate.emit(diffs);\n }\n\n right() {\n const rightmost = this.dataItem.reduce((rightmost, current) => {\n return current.left + current.width < rightmost ? rightmost : current.left + current.width;\n }, 0);\n\n console.log(rightmost);\n\n const diffs: LSMutateEvent[] = this.dataItem.map(c => {\n const newLeft = rightmost - c.width;\n\n return {\n action: 'update',\n data: {\n ...c,\n left: newLeft,\n ax: newLeft,\n bx: newLeft + c.width,\n } as LSApiElement,\n };\n });\n\n this.dataItem = diffs.map(d => d.data as LSApiElement);\n this.mutate.emit(diffs);\n }\n\n center() {\n const addcentres = this.dataItem.reduce((total, current) => {\n console.log(total + (current.left + current.width / 2));\n return total + (current.left + current.width / 2);\n }, 0);\n console.log(addcentres);\n\n const cp = addcentres / this.dataItem.length;\n console.log('centerposition', cp);\n\n const diffs: LSMutateEvent[] = this.dataItem.map(c => {\n const newLeft = c.left + (cp - (c.left + c.width / 2));\n return {\n action: 'update',\n data: {\n ...c,\n left: newLeft,\n ax: newLeft,\n bx: newLeft + c.width,\n } as LSApiElement,\n };\n });\n console.log(diffs);\n this.dataItem = diffs.map(d => d.data as LSApiElement);\n this.mutate.emit(diffs);\n }\n\n top() {\n const topmost = this.dataItem.reduce((most, current) => {\n return current.top < most ? most : current.top;\n }, 0);\n\n this.alter({ top: topmost });\n }\n\n left() {\n const leftmost = this.dataItem.reduce((least, current) => {\n return current.left < least ? current.left : least;\n }, this.dataItem[0].left);\n\n this.alter({ left: leftmost });\n }\n\n middle() {\n const addmiddles = this.dataItem.reduce((total, current) => {\n console.log(total + (current.top + current.height / 2));\n return total + (current.top + current.height / 2);\n }, 0);\n\n const cp = addmiddles / this.dataItem.length;\n\n const diffs: LSMutateEvent[] = this.dataItem.map(c => {\n const newTop = c.top + (cp - (c.top + c.height / 2));\n return {\n action: 'update',\n data: {\n ...c,\n top: newTop,\n ay: newTop,\n by: newTop + c.height,\n } as LSApiElement,\n };\n });\n this.dataItem = diffs.map(d => d.data as LSApiElement);\n this.mutate.emit(diffs);\n }\n\n bottom() {\n const lowest = this.dataItem.reduce((acc, current) => {\n return acc > current.top + current.height ? acc : current.top + current.height;\n }, 0);\n\n const diffs: LSMutateEvent[] = this.dataItem.map(c => {\n const newTop = lowest - c.height;\n return {\n action: 'update',\n data: {\n ...c,\n top: newTop,\n ay: newTop,\n by: newTop + c.height,\n } as LSApiElement,\n };\n });\n this.dataItem = diffs.map(d => d.data as LSApiElement);\n this.mutate.emit(diffs);\n }\n\n componentDidLoad() {\n attachAllTooltips(this.component.shadowRoot);\n }\n\n render() {\n return (\n <Host>\n <div class={'ls-field-properties-section'}>\n <div class={'ls-field-properties-section-text'}>\n <p class={'ls-field-properties-section-title'}>Alignment</p>\n <p class={'ls-field-properties-section-description'}>Align your Fields relative to the page or multi-select and align then to each other.</p>\n </div>\n <div class={'multi-button-group-row'}>\n <div class={'button-group'}>\n <button onClick={() => this.left()} aria-label=\"Align selected fields vertically about their left edge.\" data-tooltip=\"Align Left\">\n <ls-icon name=\"field-alignment-left\"></ls-icon>\n </button>\n <button onClick={() => this.center()} aria-label=\"Align selected fields vertically about their centre.\" data-tooltip=\"Align Center\">\n <ls-icon name=\"field-alignment-centre\"></ls-icon>\n </button>\n <button\n onClick={() => {\n this.right();\n }}\n aria-label=\"Align selected fields vertically about their right edge.\"\n data-tooltip=\"Align Right\"\n >\n <ls-icon name=\"field-alignment-right\"></ls-icon>\n </button>\n </div>\n <div class={'button-group'}>\n <button onClick={() => this.top()} aria-label=\"Align selected fields by their top.\" data-tooltip=\"Align Top\">\n <ls-icon name=\"field-alignment-top\"></ls-icon>\n </button>\n <button onClick={() => this.middle()} aria-label=\"Align selected fields by their middles.\" data-tooltip=\"Align Middle\">\n <ls-icon name=\"field-alignment-middle\"></ls-icon>\n </button>\n <button onClick={() => this.bottom()} aria-label=\"Align selected fields by their bottoms.\" data-tooltip=\"Align Bottom\">\n <ls-icon name=\"field-alignment-bottom\"></ls-icon>\n </button>\n </div>\n </div>\n </div>\n\n <slot></slot>\n <ls-tooltip id=\"ls-tooltip-master\" />\n </Host>\n );\n }\n}\n"]}
@@ -20,7 +20,6 @@ export class LsFieldContent {
20
20
  this.labeltimer = setTimeout(() => {
21
21
  const diffs = [{ action: 'update', data }];
22
22
  this.mutate.emit(diffs);
23
- this.update.emit(diffs);
24
23
  }, delay);
25
24
  }
26
25
  supportsValue() {
@@ -28,9 +27,9 @@ export class LsFieldContent {
28
27
  return !typesWithValue.includes(this.dataItem?.elementType);
29
28
  }
30
29
  render() {
31
- return (h(Host, { key: '734ec935c3012ca203927537a917e43bbf51bd29' }, h("ls-props-section", { key: '8e9b9f1cc340517f3b7f3255dc87e8801d73b5ec', sectionTitle: "Field Type", sectionDescription: "The Field you currently have selected" }, h("ls-field-type-display", { key: '9b01edd6f83f4a060d00bb780322ce138fb7dea4', fieldType: this.dataItem?.elementType, assignee: this.dataItem?.signer })), h("ls-props-section", { key: '3e3995526461f108576b7d22cbb1b2846d995e27', sectionTitle: "Required Field", row: true }, h("ls-toggle", { key: 'bec526155b82b50a64f9b1b5b74aadb7e3c6abad', id: "toggle-required", checked: !this.dataItem?.optional, onValueChange: (ev) => this.alter({ optional: !ev.detail }) })), h("ls-props-section", { key: '1575b64c8c8381205c13c3fe70a32b97699b595f', sectionTitle: "Field Label", sectionDescription: "Add a label to clarify the information required from the Recipient." }, h("input", { key: '320dd9b0427f7ca277134c1d0739a82a5e155f27', value: this.dataItem?.label, placeholder: "eg. Sign Here", onInput: (e) => this.alter({ label: e.target.value }) })), this.supportsValue() && (h("ls-props-section", { key: 'aa879cb5deca3ce965dc998116966ef77e118a89', sectionTitle: "Value", sectionDescription: "A prefilled value that can be altered by the signer." }, h("input", { key: 'd6c22af8098d61cc7af5e8abb9e23b9d046771d6', value: this.dataItem?.value, placeholder: "e.g. Gordon Smith", onInput: (e) => this.alter({ value: e.target.value }) }))), this.dataItem.validation === 20 && (h("ls-props-section", { key: '2ef0f7da035529ce618803d0c6b74b447b922555', sectionTitle: "Options", sectionDescription: "Define the options available in the dropdown. One option per line." }, h("textarea", { key: 'ce22a03c08f2d1f98feb0125912e053ef62c7226', value: this.dataItem?.options, placeholder: "Option 1\nOption 2\nOption 3", onInput: (e) => this.alter({ options: e.target.value }) }))), this.showValidationTypes && (h("ls-props-section", { key: '0f6e53e8261eb4c6b8db6fd5f828a42724f27ffd', sectionTitle: "Content Format", sectionDescription: "Select the specific format you want the Recipient to enter." }, h("ls-input-wrapper", { key: '3005c64a70fd13264666ad5e4e014000d820c630', select: true }, h("select", { key: 'f319bc0e3d1987ff3bebe363051c6756cb1b56cf', onChange: (ev) => this.alter({ validation: parseInt(ev.target.value) }) }, validationTypes
30
+ return (h(Host, { key: '3aa145da2c93db6900ba96388d86c72472686aa3' }, h("ls-props-section", { key: '4d08885c91a113e3c58b79046abc18e0b57ac1e4', sectionTitle: "Field Type", sectionDescription: "The Field you currently have selected" }, h("ls-field-type-display", { key: '166c7438df51abd4ee13952444a9e0996dd3d1ac', fieldType: this.dataItem?.elementType, assignee: this.dataItem?.signer })), h("ls-props-section", { key: '7a8f379af5a5bcfd3317dcd143129e493e963b08', sectionTitle: "Required Field", row: true }, h("ls-toggle", { key: '48ff9c0929d5cc38303b33423c8af14ef41d402a', id: "toggle-required", checked: !this.dataItem?.optional, onValueChange: (ev) => this.alter({ optional: !ev.detail }) })), h("ls-props-section", { key: '589a7bf1ff07a9c0cccfc347d0d8e2ccd4292629', sectionTitle: "Field Label", sectionDescription: "Add a label to clarify the information required from the Recipient." }, h("input", { key: 'bfd8071a1f1f54b9b1c1ee7a44b29c126b8f481b', value: this.dataItem?.label, placeholder: "eg. Sign Here", onInput: (e) => this.alter({ label: e.target.value }) })), this.supportsValue() && (h("ls-props-section", { key: '1fc16d46a133d7f8724b7e89fec0430908a5d440', sectionTitle: "Value", sectionDescription: "A prefilled value that can be altered by the signer." }, h("input", { key: '5c891526edb6a685222cfbc8f322a089e7cd5279', value: this.dataItem?.value, placeholder: "e.g. Gordon Smith", onInput: (e) => this.alter({ value: e.target.value }) }))), this.dataItem.validation === 20 && (h("ls-props-section", { key: '681316a7a8e67745fd9bf1735dc5d282ce62e756', sectionTitle: "Options", sectionDescription: "Define the options available in the dropdown. One option per line." }, h("textarea", { key: 'c919685a5b466e8ff6fd4d7ee4dbbcf9c66bfcee', value: this.dataItem?.options, placeholder: "Option 1\nOption 2\nOption 3", onInput: (e) => this.alter({ options: e.target.value }) }))), this.showValidationTypes && (h("ls-props-section", { key: '21d860e34e7a1715a5618b375c57c979acfb5dcb', sectionTitle: "Content Format", sectionDescription: "Select the specific format you want the Recipient to enter." }, h("ls-input-wrapper", { key: 'e4cc5533901b4a0842ea97bb6a97f4f55816d1cb', select: true }, h("select", { key: '4875147dbdcfdeadf4485f2b283bed89fe43c083', onChange: (ev) => this.alter({ validation: parseInt(ev.target.value) }) }, validationTypes
32
31
  .filter(type => type.formType === this.dataItem?.elementType)
33
- .map(type => (h("option", { selected: this.dataItem?.validation === type.id, value: type.id }, type.description))))))), h("slot", { key: 'c8983032bdf7d1ec86416810de22445987bd75b5' })));
32
+ .map(type => (h("option", { selected: this.dataItem?.validation === type.id, value: type.id }, type.description))))))), h("slot", { key: 'de3eef5f0ea1297b43c3e92851935552f1fdcef9' })));
34
33
  }
35
34
  static get is() { return "ls-field-content"; }
36
35
  static get encapsulation() { return "shadow"; }
@@ -48,7 +47,6 @@ export class LsFieldContent {
48
47
  return {
49
48
  "dataItem": {
50
49
  "type": "unknown",
51
- "attribute": "data-item",
52
50
  "mutable": true,
53
51
  "complexType": {
54
52
  "original": "LSApiElement",
@@ -72,7 +70,6 @@ export class LsFieldContent {
72
70
  },
73
71
  "showValidationTypes": {
74
72
  "type": "boolean",
75
- "attribute": "show-validation-types",
76
73
  "mutable": false,
77
74
  "complexType": {
78
75
  "original": "boolean",
@@ -88,6 +85,7 @@ export class LsFieldContent {
88
85
  "getter": false,
89
86
  "setter": false,
90
87
  "reflect": false,
88
+ "attribute": "show-validation-types",
91
89
  "defaultValue": "true"
92
90
  }
93
91
  };
@@ -1 +1 @@
1
- {"version":3,"file":"ls-field-content.js","sourceRoot":"","sources":["../../../src/components/ls-field-content/ls-field-content.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,EAAE,KAAK,EAAgB,OAAO,EAAE,MAAM,eAAe,CAAC;AAEvF,OAAO,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AAOpE,MAAM,OAAO,cAAc;IACd,SAAS,CAAc;IACT,QAAQ,CAAe;IACxC,mBAAmB,GAAY,IAAI,CAAC;IAO5C,MAAM,CAAgC;IAOtC,MAAM,CAAgC;IAEtC,0CAA0C;IAC1C,6CAA6C;IAC7C,qDAAqD;IACrD,KAAK,CAAC,IAAY;QAChB,IAAI,CAAC,QAAQ,GAAG,EAAE,GAAG,IAAI,CAAC,QAAQ,EAAE,GAAG,IAAI,EAAE,CAAC;QAC9C,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC;IACpC,CAAC;IAEO,UAAU,CAAC;IAEnB,QAAQ,CAAC,IAAI,EAAE,KAAK;QAClB,IAAI,IAAI,CAAC,UAAU;YAAE,YAAY,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QAEnD,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC,GAAG,EAAE;YAChC,MAAM,KAAK,GAAoB,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC;YAC5D,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YACxB,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAC1B,CAAC,EAAE,KAAK,CAAC,CAAC;IACZ,CAAC;IAED,aAAa;QACX,MAAM,cAAc,GAAG,CAAC,WAAW,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,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event, EventEmitter, Element } from '@stencil/core';\nimport { LSApiElement, LSMutateEvent } from '../../components';\nimport { validationTypes } from '../ls-document-viewer/editorUtils';\n\n@Component({\n tag: 'ls-field-content',\n styleUrl: 'ls-field-content.css',\n shadow: true,\n})\nexport class LsFieldContent {\n @Element() component: HTMLElement;\n @Prop({ mutable: true }) dataItem: LSApiElement;\n @Prop() showValidationTypes: boolean = true;\n\n @Event({\n bubbles: true,\n cancelable: true,\n composed: true,\n })\n mutate: EventEmitter<LSMutateEvent[]>;\n\n @Event({\n bubbles: true,\n cancelable: true,\n composed: true,\n })\n update: EventEmitter<LSMutateEvent[]>;\n\n // Send one or more mutations up the chain\n // The source of the chain fires the mutation\n // NOTE this alter is debounced to account for typing\n alter(diff: object) {\n this.dataItem = { ...this.dataItem, ...diff };\n this.debounce(this.dataItem, 500);\n }\n\n private labeltimer;\n\n debounce(data, delay) {\n if (this.labeltimer) clearTimeout(this.labeltimer);\n\n this.labeltimer = setTimeout(() => {\n const diffs: LSMutateEvent[] = [{ action: 'update', data }];\n this.mutate.emit(diffs);\n this.update.emit(diffs);\n }, delay);\n }\n\n supportsValue() {\n const typesWithValue = [\"signature\", \"intials\", \"image\", \"file\", \"signing\", \"date\", \"autosign\", \"regex\"];\n \n return !typesWithValue.includes(this.dataItem?.elementType);\n }\n\n render() {\n return (\n <Host>\n <ls-props-section sectionTitle=\"Field Type\" sectionDescription=\"The Field you currently have selected\">\n <ls-field-type-display fieldType={this.dataItem?.elementType} assignee={this.dataItem?.signer} />\n </ls-props-section>\n <ls-props-section sectionTitle=\"Required Field\" row={true}>\n <ls-toggle id=\"toggle-required\" checked={!this.dataItem?.optional} onValueChange={(ev) => this.alter({ optional: !ev.detail })} />\n </ls-props-section>\n <ls-props-section sectionTitle=\"Field Label\" sectionDescription=\"Add a label to clarify the information required from the Recipient.\">\n <input value={this.dataItem?.label} placeholder=\"eg. Sign Here\" onInput={(e) => this.alter({ label: (e.target as HTMLInputElement).value })} />\n </ls-props-section>\n {this.supportsValue() && (\n <ls-props-section sectionTitle=\"Value\" sectionDescription=\"A prefilled value that can be altered by the signer.\">\n <input value={this.dataItem?.value} placeholder=\"e.g. Gordon Smith\" onInput={(e) => this.alter({ value: (e.target as HTMLInputElement).value })} />\n </ls-props-section>\n )}\n {this.dataItem.validation === 20 && (\n <ls-props-section sectionTitle=\"Options\" sectionDescription=\"Define the options available in the dropdown. One option per line.\">\n <textarea value={this.dataItem?.options} placeholder=\"Option 1&#10;Option 2&#10;Option 3\" onInput={(e) => this.alter({ options: (e.target as HTMLTextAreaElement).value })} />\n </ls-props-section>\n )}\n\n {this.showValidationTypes && (\n <ls-props-section sectionTitle=\"Content Format\" sectionDescription=\"Select the specific format you want the Recipient to enter.\">\n <ls-input-wrapper select>\n <select onChange={(ev) => this.alter({ validation: parseInt((ev.target as HTMLSelectElement).value) })} >\n {validationTypes\n .filter(type => type.formType === this.dataItem?.elementType)\n .map(type => (\n <option selected={this.dataItem?.validation === type.id} value={type.id}>\n {type.description}\n </option>\n ))}\n </select>\n </ls-input-wrapper>\n </ls-props-section>\n )}\n <slot></slot>\n </Host>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"ls-field-content.js","sourceRoot":"","sources":["../../../src/components/ls-field-content/ls-field-content.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,EAAE,KAAK,EAAgB,OAAO,EAAE,MAAM,eAAe,CAAC;AAEvF,OAAO,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AAOpE,MAAM,OAAO,cAAc;IACd,SAAS,CAAc;IACT,QAAQ,CAAe;IACxC,mBAAmB,GAAY,IAAI,CAAC;IAO5C,MAAM,CAAgC;IAOtC,MAAM,CAAgC;IAEtC,0CAA0C;IAC1C,6CAA6C;IAC7C,qDAAqD;IACrD,KAAK,CAAC,IAAY;QAChB,IAAI,CAAC,QAAQ,GAAG,EAAE,GAAG,IAAI,CAAC,QAAQ,EAAE,GAA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AAE,CAAC,MAA4B,CAAC,KAAK,CAAC,EAAE,CAAC,IACnG,eAAe;yBACb,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,QAAQ,KAAK,IAAI,CAAC,QAAQ,EAAE,WAAW,CAAC;yBAC5D,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,CACX,cAAQ,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE,UAAU,KAAK,IAAI,CAAC,EAAE,EAAE,KAAK,EAAE,IAAI,CAAC,EAAE,IACpE,IAAI,CAAC,WAAW,CACV,CACV,CAAC,CACG,CACQ,CACF,CACpB;YACD,8DAAa,CACR,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Host, Prop, h, Event, EventEmitter, Element } from '@stencil/core';\nimport { LSApiElement, LSMutateEvent } from '../../components';\nimport { validationTypes } from '../ls-document-viewer/editorUtils';\n\n@Component({\n tag: 'ls-field-content',\n styleUrl: 'ls-field-content.css',\n shadow: true,\n})\nexport class LsFieldContent {\n @Element() component: HTMLElement;\n @Prop({ mutable: true }) dataItem: LSApiElement;\n @Prop() showValidationTypes: boolean = true;\n\n @Event({\n bubbles: true,\n cancelable: true,\n composed: true,\n })\n mutate: EventEmitter<LSMutateEvent[]>;\n\n @Event({\n bubbles: true,\n cancelable: true,\n composed: true,\n })\n update: EventEmitter<LSMutateEvent[]>;\n\n // Send one or more mutations up the chain\n // The source of the chain fires the mutation\n // NOTE this alter is debounced to account for typing\n alter(diff: object) {\n this.dataItem = { ...this.dataItem, ...diff };\n this.debounce(this.dataItem, 500);\n }\n\n private labeltimer;\n\n debounce(data, delay) {\n if (this.labeltimer) clearTimeout(this.labeltimer);\n\n this.labeltimer = setTimeout(() => {\n const diffs: LSMutateEvent[] = [{ action: 'update', data }];\n this.mutate.emit(diffs);\n }, delay);\n }\n\n supportsValue() {\n const typesWithValue = [\"signature\", \"intials\", \"image\", \"file\", \"signing\", \"date\", \"autosign\", \"regex\"];\n \n return !typesWithValue.includes(this.dataItem?.elementType);\n }\n\n render() {\n return (\n <Host>\n <ls-props-section sectionTitle=\"Field Type\" sectionDescription=\"The Field you currently have selected\">\n <ls-field-type-display fieldType={this.dataItem?.elementType} assignee={this.dataItem?.signer} />\n </ls-props-section>\n <ls-props-section sectionTitle=\"Required Field\" row={true}>\n <ls-toggle id=\"toggle-required\" checked={!this.dataItem?.optional} onValueChange={(ev) => this.alter({ optional: !ev.detail })} />\n </ls-props-section>\n <ls-props-section sectionTitle=\"Field Label\" sectionDescription=\"Add a label to clarify the information required from the Recipient.\">\n <input value={this.dataItem?.label} placeholder=\"eg. Sign Here\" onInput={(e) => this.alter({ label: (e.target as HTMLInputElement).value })} />\n </ls-props-section>\n {this.supportsValue() && (\n <ls-props-section sectionTitle=\"Value\" sectionDescription=\"A prefilled value that can be altered by the signer.\">\n <input value={this.dataItem?.value} placeholder=\"e.g. Gordon Smith\" onInput={(e) => this.alter({ value: (e.target as HTMLInputElement).value })} />\n </ls-props-section>\n )}\n {this.dataItem.validation === 20 && (\n <ls-props-section sectionTitle=\"Options\" sectionDescription=\"Define the options available in the dropdown. One option per line.\">\n <textarea value={this.dataItem?.options} placeholder=\"Option 1&#10;Option 2&#10;Option 3\" onInput={(e) => this.alter({ options: (e.target as HTMLTextAreaElement).value })} />\n </ls-props-section>\n )}\n\n {this.showValidationTypes && (\n <ls-props-section sectionTitle=\"Content Format\" sectionDescription=\"Select the specific format you want the Recipient to enter.\">\n <ls-input-wrapper select>\n <select onChange={(ev) => this.alter({ validation: parseInt((ev.target as HTMLSelectElement).value) })} >\n {validationTypes\n .filter(type => type.formType === this.dataItem?.elementType)\n .map(type => (\n <option selected={this.dataItem?.validation === type.id} value={type.id}>\n {type.description}\n </option>\n ))}\n </select>\n </ls-input-wrapper>\n </ls-props-section>\n )}\n <slot></slot>\n </Host>\n );\n }\n}\n"]}