@verdocs/web-sdk 1.11.11 → 1.12.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 (151) hide show
  1. package/dist/cjs/verdocs-contact-picker.cjs.entry.js +2 -2
  2. package/dist/cjs/verdocs-field-attachment.cjs.entry.js +1 -1
  3. package/dist/cjs/verdocs-field-initial.cjs.entry.js +2 -2
  4. package/dist/cjs/verdocs-field-signature.cjs.entry.js +1 -1
  5. package/dist/cjs/verdocs-initial-dialog.cjs.entry.js +2 -2
  6. package/dist/cjs/verdocs-kba-dialog.cjs.entry.js +2 -2
  7. package/dist/cjs/verdocs-ok-dialog.cjs.entry.js +3 -3
  8. package/dist/cjs/verdocs-send.cjs.entry.js +2 -2
  9. package/dist/cjs/verdocs-signature-dialog.cjs.entry.js +2 -2
  10. package/dist/cjs/verdocs-template-create_2.cjs.entry.js +2 -7
  11. package/dist/cjs/verdocs-template-properties.cjs.entry.js +2 -2
  12. package/dist/cjs/verdocs-template-roles.cjs.entry.js +2 -2
  13. package/dist/cjs/verdocs-upload-dialog.cjs.entry.js +2 -2
  14. package/dist/collection/collection-manifest.json +1 -1
  15. package/dist/collection/components/dialogs/verdocs-initial-dialog/verdocs-initial-dialog.js +4 -4
  16. package/dist/collection/components/dialogs/verdocs-initial-dialog/verdocs-initial-dialog.stories.js +3 -3
  17. package/dist/collection/components/dialogs/verdocs-kba-dialog/verdocs-kba-dialog.js +4 -4
  18. package/dist/collection/components/dialogs/verdocs-kba-dialog/verdocs-kba-dialog.stories.js +4 -4
  19. package/dist/collection/components/dialogs/verdocs-ok-dialog/verdocs-ok-dialog.js +5 -5
  20. package/dist/collection/components/dialogs/verdocs-ok-dialog/verdocs-ok-dialog.stories.js +3 -3
  21. package/dist/collection/components/dialogs/verdocs-signature-dialog/verdocs-signature-dialog.js +4 -4
  22. package/dist/collection/components/dialogs/verdocs-signature-dialog/verdocs-signature-dialog.stories.js +3 -3
  23. package/dist/collection/components/dialogs/verdocs-upload-dialog/verdocs-upload-dialog.js +4 -4
  24. package/dist/collection/components/dialogs/verdocs-upload-dialog/verdocs-upload-dialog.stories.js +4 -6
  25. package/dist/collection/components/elements/verdocs-contact-picker/verdocs-contact-picker.js +4 -4
  26. package/dist/collection/components/elements/verdocs-contact-picker/verdocs-contact-picker.stories.js +2 -2
  27. package/dist/collection/components/embeds/verdocs-send/verdocs-send.js +4 -4
  28. package/dist/collection/components/fields/verdocs-field-attachment/verdocs-field-attachment.js +1 -1
  29. package/dist/collection/components/fields/verdocs-field-initial/verdocs-field-initial.js +4 -4
  30. package/dist/collection/components/fields/verdocs-field-signature/verdocs-field-signature.js +1 -1
  31. package/dist/collection/components/templates/verdocs-template-create/verdocs-template-create.js +4 -21
  32. package/dist/collection/components/templates/verdocs-template-create/verdocs-template-create.stories.js +2 -2
  33. package/dist/collection/components/templates/verdocs-template-fields/verdocs-template-fields.js +0 -35
  34. package/dist/collection/components/templates/verdocs-template-fields/verdocs-template-fields.stories.js +3 -6
  35. package/dist/collection/components/templates/verdocs-template-properties/verdocs-template-properties.js +4 -4
  36. package/dist/collection/components/templates/verdocs-template-properties/verdocs-template-properties.stories.js +2 -2
  37. package/dist/collection/components/templates/{verdocs-template-recipients → verdocs-template-roles}/verdocs-template-roles.js +4 -4
  38. package/dist/collection/components/templates/{verdocs-template-recipients → verdocs-template-roles}/verdocs-template-roles.stories.js +2 -2
  39. package/dist/components/index.d.ts +1 -1
  40. package/dist/components/verdocs-contact-picker2.js +2 -2
  41. package/dist/components/verdocs-field-attachment.js +1 -1
  42. package/dist/components/verdocs-field-initial.js +2 -2
  43. package/dist/components/verdocs-field-signature.js +1 -1
  44. package/dist/components/verdocs-initial-dialog2.js +2 -2
  45. package/dist/components/verdocs-kba-dialog.js +2 -2
  46. package/dist/components/verdocs-ok-dialog2.js +3 -3
  47. package/dist/components/verdocs-send.js +2 -2
  48. package/dist/components/verdocs-signature-dialog2.js +2 -2
  49. package/dist/components/verdocs-template-create2.js +2 -5
  50. package/dist/components/verdocs-template-fields2.js +0 -2
  51. package/dist/components/verdocs-template-properties.js +2 -2
  52. package/dist/components/verdocs-template-roles.js +2 -2
  53. package/dist/components/verdocs-upload-dialog2.js +2 -2
  54. package/dist/docs.json +28 -55
  55. package/dist/esm/verdocs-contact-picker.entry.js +2 -2
  56. package/dist/esm/verdocs-field-attachment.entry.js +1 -1
  57. package/dist/esm/verdocs-field-initial.entry.js +2 -2
  58. package/dist/esm/verdocs-field-signature.entry.js +1 -1
  59. package/dist/esm/verdocs-initial-dialog.entry.js +2 -2
  60. package/dist/esm/verdocs-kba-dialog.entry.js +2 -2
  61. package/dist/esm/verdocs-ok-dialog.entry.js +3 -3
  62. package/dist/esm/verdocs-send.entry.js +2 -2
  63. package/dist/esm/verdocs-signature-dialog.entry.js +2 -2
  64. package/dist/esm/verdocs-template-create_2.entry.js +2 -7
  65. package/dist/esm/verdocs-template-properties.entry.js +2 -2
  66. package/dist/esm/verdocs-template-roles.entry.js +2 -2
  67. package/dist/esm/verdocs-upload-dialog.entry.js +2 -2
  68. package/dist/esm-es5/verdocs-contact-picker.entry.js +1 -1
  69. package/dist/esm-es5/verdocs-field-attachment.entry.js +1 -1
  70. package/dist/esm-es5/verdocs-field-initial.entry.js +1 -1
  71. package/dist/esm-es5/verdocs-field-signature.entry.js +1 -1
  72. package/dist/esm-es5/verdocs-initial-dialog.entry.js +1 -1
  73. package/dist/esm-es5/verdocs-kba-dialog.entry.js +1 -1
  74. package/dist/esm-es5/verdocs-ok-dialog.entry.js +1 -1
  75. package/dist/esm-es5/verdocs-send.entry.js +1 -1
  76. package/dist/esm-es5/verdocs-signature-dialog.entry.js +1 -1
  77. package/dist/esm-es5/verdocs-template-create_2.entry.js +1 -1
  78. package/dist/esm-es5/verdocs-template-properties.entry.js +1 -1
  79. package/dist/esm-es5/verdocs-template-roles.entry.js +1 -1
  80. package/dist/esm-es5/verdocs-upload-dialog.entry.js +1 -1
  81. package/dist/types/components/dialogs/verdocs-initial-dialog/verdocs-initial-dialog.d.ts +2 -2
  82. package/dist/types/components/dialogs/verdocs-initial-dialog/verdocs-initial-dialog.stories.d.ts +2 -2
  83. package/dist/types/components/dialogs/verdocs-kba-dialog/verdocs-kba-dialog.d.ts +2 -2
  84. package/dist/types/components/dialogs/verdocs-kba-dialog/verdocs-kba-dialog.stories.d.ts +2 -2
  85. package/dist/types/components/dialogs/verdocs-ok-dialog/verdocs-ok-dialog.d.ts +2 -2
  86. package/dist/types/components/dialogs/verdocs-ok-dialog/verdocs-ok-dialog.stories.d.ts +2 -2
  87. package/dist/types/components/dialogs/verdocs-signature-dialog/verdocs-signature-dialog.d.ts +2 -2
  88. package/dist/types/components/dialogs/verdocs-signature-dialog/verdocs-signature-dialog.stories.d.ts +2 -2
  89. package/dist/types/components/dialogs/verdocs-upload-dialog/verdocs-upload-dialog.d.ts +2 -2
  90. package/dist/types/components/dialogs/verdocs-upload-dialog/verdocs-upload-dialog.stories.d.ts +2 -2
  91. package/dist/types/components/elements/verdocs-contact-picker/verdocs-contact-picker.d.ts +2 -2
  92. package/dist/types/components/elements/verdocs-contact-picker/verdocs-contact-picker.stories.d.ts +2 -2
  93. package/dist/types/components/embeds/verdocs-send/verdocs-send.d.ts +2 -2
  94. package/dist/types/components/fields/verdocs-field-initial/verdocs-field-initial.d.ts +2 -2
  95. package/dist/types/components/templates/verdocs-template-create/verdocs-template-create.d.ts +2 -6
  96. package/dist/types/components/templates/verdocs-template-create/verdocs-template-create.stories.d.ts +2 -2
  97. package/dist/types/components/templates/verdocs-template-fields/verdocs-template-fields.d.ts +0 -8
  98. package/dist/types/components/templates/verdocs-template-fields/verdocs-template-fields.stories.d.ts +1 -3
  99. package/dist/types/components/templates/verdocs-template-properties/verdocs-template-properties.d.ts +2 -2
  100. package/dist/types/components/templates/verdocs-template-properties/verdocs-template-properties.stories.d.ts +2 -2
  101. package/dist/types/components/templates/{verdocs-template-recipients → verdocs-template-roles}/verdocs-template-roles.d.ts +2 -2
  102. package/dist/types/components/templates/{verdocs-template-recipients → verdocs-template-roles}/verdocs-template-roles.stories.d.ts +2 -2
  103. package/dist/types/components.d.ts +24 -36
  104. package/dist/verdocs-web-sdk/p-04ca7746.entry.js +1 -0
  105. package/dist/verdocs-web-sdk/p-062bd1d6.entry.js +1 -0
  106. package/dist/verdocs-web-sdk/p-0bb87b59.entry.js +1 -0
  107. package/dist/verdocs-web-sdk/p-24266b55.entry.js +1 -0
  108. package/dist/verdocs-web-sdk/p-257d232d.system.entry.js +1 -0
  109. package/dist/verdocs-web-sdk/p-25c56686.entry.js +1 -0
  110. package/dist/verdocs-web-sdk/p-30f1611a.system.entry.js +1 -0
  111. package/dist/verdocs-web-sdk/p-3903c3c0.system.entry.js +1 -0
  112. package/dist/verdocs-web-sdk/p-3bc39719.entry.js +1 -0
  113. package/dist/verdocs-web-sdk/{p-7b82f0f2.system.entry.js → p-504d51c9.system.entry.js} +1 -1
  114. package/dist/verdocs-web-sdk/{p-a72e49c5.system.entry.js → p-55610f09.system.entry.js} +1 -1
  115. package/dist/verdocs-web-sdk/{p-7b4d7756.system.entry.js → p-5659c4bb.system.entry.js} +1 -1
  116. package/dist/verdocs-web-sdk/p-607b66bb.entry.js +1 -0
  117. package/dist/verdocs-web-sdk/p-64841d89.system.entry.js +1 -0
  118. package/dist/verdocs-web-sdk/p-70a6176e.entry.js +1 -0
  119. package/dist/verdocs-web-sdk/p-75e8cb42.entry.js +1 -0
  120. package/dist/verdocs-web-sdk/p-79b5b76f.entry.js +1 -0
  121. package/dist/verdocs-web-sdk/p-7e6d7c07.system.js +1 -1
  122. package/dist/verdocs-web-sdk/{p-a62755ba.system.entry.js → p-a0fd3c9b.system.entry.js} +1 -1
  123. package/dist/verdocs-web-sdk/{p-4faa7ff3.system.entry.js → p-a8ff2439.system.entry.js} +1 -1
  124. package/dist/verdocs-web-sdk/p-d0fc924d.entry.js +1 -0
  125. package/dist/verdocs-web-sdk/{p-5fa9dd45.system.entry.js → p-da81a310.system.entry.js} +1 -1
  126. package/dist/verdocs-web-sdk/p-dfe6f5d9.entry.js +1 -0
  127. package/dist/verdocs-web-sdk/{p-7be5af5d.system.entry.js → p-e9f06aab.system.entry.js} +1 -1
  128. package/dist/verdocs-web-sdk/{p-457d3af9.system.entry.js → p-f1863a57.system.entry.js} +1 -1
  129. package/dist/verdocs-web-sdk/p-f75b2973.entry.js +1 -0
  130. package/dist/verdocs-web-sdk/p-fc57a027.system.entry.js +1 -0
  131. package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +1 -1
  132. package/package.json +1 -1
  133. package/dist/verdocs-web-sdk/p-0048af58.system.entry.js +0 -1
  134. package/dist/verdocs-web-sdk/p-0e58db22.entry.js +0 -1
  135. package/dist/verdocs-web-sdk/p-1178d7a5.entry.js +0 -1
  136. package/dist/verdocs-web-sdk/p-5342a0bb.entry.js +0 -1
  137. package/dist/verdocs-web-sdk/p-5659eb9b.entry.js +0 -1
  138. package/dist/verdocs-web-sdk/p-5737eeb5.entry.js +0 -1
  139. package/dist/verdocs-web-sdk/p-5e932394.entry.js +0 -1
  140. package/dist/verdocs-web-sdk/p-75c744e0.entry.js +0 -1
  141. package/dist/verdocs-web-sdk/p-772ca02c.entry.js +0 -1
  142. package/dist/verdocs-web-sdk/p-99f4242f.system.entry.js +0 -1
  143. package/dist/verdocs-web-sdk/p-a275f3b8.system.entry.js +0 -1
  144. package/dist/verdocs-web-sdk/p-a38a4e2d.entry.js +0 -1
  145. package/dist/verdocs-web-sdk/p-a8a3bcb0.entry.js +0 -1
  146. package/dist/verdocs-web-sdk/p-a8b3e594.system.entry.js +0 -1
  147. package/dist/verdocs-web-sdk/p-b154b9b9.entry.js +0 -1
  148. package/dist/verdocs-web-sdk/p-b71f26f2.entry.js +0 -1
  149. package/dist/verdocs-web-sdk/p-c5be2c0f.entry.js +0 -1
  150. package/dist/verdocs-web-sdk/p-f2ff8d0e.system.entry.js +0 -1
  151. /package/dist/collection/components/templates/{verdocs-template-recipients → verdocs-template-roles}/verdocs-template-roles.css +0 -0
package/dist/docs.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "timestamp": "2023-03-01T16:17:53",
2
+ "timestamp": "2023-03-01T16:58:46",
3
3
  "compiler": {
4
4
  "name": "@stencil/core",
5
5
  "version": "2.20.0",
@@ -832,12 +832,12 @@
832
832
  "methods": [],
833
833
  "events": [
834
834
  {
835
- "event": "cancel",
835
+ "event": "exit",
836
836
  "detail": "any",
837
837
  "bubbles": true,
838
838
  "cancelable": true,
839
839
  "composed": true,
840
- "docs": "Event fired when the user cancels the dialog.",
840
+ "docs": "Event fired when the step is cancelled. This is called exit to avoid conflicts with the JS-reserved \"cancel\" event name.",
841
841
  "docsTags": []
842
842
  },
843
843
  {
@@ -1979,21 +1979,21 @@
1979
1979
  "docsTags": []
1980
1980
  },
1981
1981
  {
1982
- "event": "cancel",
1983
- "detail": "any",
1982
+ "event": "deleted",
1983
+ "detail": "{ fieldName: string; }",
1984
1984
  "bubbles": true,
1985
1985
  "cancelable": true,
1986
1986
  "composed": true,
1987
- "docs": "Event emitted when the user cancels the process.",
1987
+ "docs": "Event fired when the field is deleted.",
1988
1988
  "docsTags": []
1989
1989
  },
1990
1990
  {
1991
- "event": "deleted",
1992
- "detail": "{ fieldName: string; }",
1991
+ "event": "exit",
1992
+ "detail": "any",
1993
1993
  "bubbles": true,
1994
1994
  "cancelable": true,
1995
1995
  "composed": true,
1996
- "docs": "Event fired when the field is deleted.",
1996
+ "docs": "Event fired when the step is cancelled. This is called exit to avoid conflicts with the JS-reserved \"cancel\" event name.",
1997
1997
  "docsTags": []
1998
1998
  },
1999
1999
  {
@@ -3553,12 +3553,12 @@
3553
3553
  "methods": [],
3554
3554
  "events": [
3555
3555
  {
3556
- "event": "cancel",
3556
+ "event": "exit",
3557
3557
  "detail": "any",
3558
3558
  "bubbles": true,
3559
3559
  "cancelable": true,
3560
3560
  "composed": true,
3561
- "docs": "Event fired when the step is cancelled.",
3561
+ "docs": "Event fired when the step is cancelled. This is called exit to avoid conflicts with the JS-reserved \"cancel\" event name.",
3562
3562
  "docsTags": []
3563
3563
  },
3564
3564
  {
@@ -3747,12 +3747,12 @@
3747
3747
  "methods": [],
3748
3748
  "events": [
3749
3749
  {
3750
- "event": "cancel",
3750
+ "event": "exit",
3751
3751
  "detail": "any",
3752
3752
  "bubbles": true,
3753
3753
  "cancelable": true,
3754
3754
  "composed": true,
3755
- "docs": "Event fired when the dialog is closed. The event data will contain the closure reason.",
3755
+ "docs": "Event fired when the step is cancelled. This is called exit to avoid conflicts with the JS-reserved \"cancel\" event name.",
3756
3756
  "docsTags": []
3757
3757
  },
3758
3758
  {
@@ -3894,12 +3894,12 @@
3894
3894
  "methods": [],
3895
3895
  "events": [
3896
3896
  {
3897
- "event": "cancel",
3897
+ "event": "exit",
3898
3898
  "detail": "any",
3899
3899
  "bubbles": true,
3900
3900
  "cancelable": true,
3901
3901
  "composed": true,
3902
- "docs": "Event fired when the user clicks the background overlay or Cancel button.",
3902
+ "docs": "Event fired when the step is cancelled. This is called exit to avoid conflicts with the JS-reserved \"cancel\" event name.",
3903
3903
  "docsTags": []
3904
3904
  },
3905
3905
  {
@@ -4670,12 +4670,12 @@
4670
4670
  ],
4671
4671
  "events": [
4672
4672
  {
4673
- "event": "cancel",
4673
+ "event": "exit",
4674
4674
  "detail": "any",
4675
4675
  "bubbles": true,
4676
4676
  "cancelable": true,
4677
4677
  "composed": true,
4678
- "docs": "The user canceled the process.",
4678
+ "docs": "Event fired when the step is cancelled. This is called exit to avoid conflicts with the JS-reserved \"cancel\" event name.",
4679
4679
  "docsTags": []
4680
4680
  },
4681
4681
  {
@@ -4870,12 +4870,12 @@
4870
4870
  "methods": [],
4871
4871
  "events": [
4872
4872
  {
4873
- "event": "cancel",
4873
+ "event": "exit",
4874
4874
  "detail": "any",
4875
4875
  "bubbles": true,
4876
4876
  "cancelable": true,
4877
4877
  "composed": true,
4878
- "docs": "Fired if the user cancels the dialog.",
4878
+ "docs": "Event fired when the step is cancelled. This is called exit to avoid conflicts with the JS-reserved \"cancel\" event name.",
4879
4879
  "docsTags": []
4880
4880
  },
4881
4881
  {
@@ -5184,12 +5184,12 @@
5184
5184
  "methods": [],
5185
5185
  "events": [
5186
5186
  {
5187
- "event": "cancel",
5187
+ "event": "exit",
5188
5188
  "detail": "any",
5189
5189
  "bubbles": true,
5190
5190
  "cancelable": true,
5191
5191
  "composed": true,
5192
- "docs": "Event fired when the user cancels the dialog.",
5192
+ "docs": "Event fired when the step is cancelled. This is called exit to avoid conflicts with the JS-reserved \"cancel\" event name.",
5193
5193
  "docsTags": []
5194
5194
  },
5195
5195
  {
@@ -5209,15 +5209,6 @@
5209
5209
  "composed": true,
5210
5210
  "docs": "Event fired if an error occurs. The event details will contain information about the error. Most errors will\nterminate the process, and the calling application should correct the condition and re-render the component.",
5211
5211
  "docsTags": []
5212
- },
5213
- {
5214
- "event": "testev",
5215
- "detail": "any",
5216
- "bubbles": true,
5217
- "cancelable": true,
5218
- "composed": true,
5219
- "docs": "Test event for debugging",
5220
- "docsTags": []
5221
5212
  }
5222
5213
  ],
5223
5214
  "listeners": [],
@@ -5618,24 +5609,6 @@
5618
5609
  ],
5619
5610
  "methods": [],
5620
5611
  "events": [
5621
- {
5622
- "event": "cancel",
5623
- "detail": "any",
5624
- "bubbles": true,
5625
- "cancelable": true,
5626
- "composed": true,
5627
- "docs": "Event fired when the user cancels the dialog.",
5628
- "docsTags": []
5629
- },
5630
- {
5631
- "event": "next",
5632
- "detail": "ITemplate",
5633
- "bubbles": true,
5634
- "cancelable": true,
5635
- "composed": true,
5636
- "docs": "Event fired when the user completes the step.",
5637
- "docsTags": []
5638
- },
5639
5612
  {
5640
5613
  "event": "sdkError",
5641
5614
  "detail": "SDKError",
@@ -5818,12 +5791,12 @@
5818
5791
  "methods": [],
5819
5792
  "events": [
5820
5793
  {
5821
- "event": "cancel",
5794
+ "event": "exit",
5822
5795
  "detail": "any",
5823
5796
  "bubbles": true,
5824
5797
  "cancelable": true,
5825
5798
  "composed": true,
5826
- "docs": "Event fired when the user cancels the dialog.",
5799
+ "docs": "Event fired when the step is cancelled. This is called exit to avoid conflicts with the JS-reserved \"cancel\" event name.",
5827
5800
  "docsTags": []
5828
5801
  },
5829
5802
  {
@@ -6115,7 +6088,7 @@
6115
6088
  }
6116
6089
  },
6117
6090
  {
6118
- "filePath": "./src/components/templates/verdocs-template-recipients/verdocs-template-roles.tsx",
6091
+ "filePath": "./src/components/templates/verdocs-template-roles/verdocs-template-roles.tsx",
6119
6092
  "encapsulation": "none",
6120
6093
  "tag": "verdocs-template-roles",
6121
6094
  "docs": "Displays an edit form that allows the user to adjust a template's roles and workflow.",
@@ -6159,12 +6132,12 @@
6159
6132
  "methods": [],
6160
6133
  "events": [
6161
6134
  {
6162
- "event": "cancel",
6135
+ "event": "exit",
6163
6136
  "detail": "any",
6164
6137
  "bubbles": true,
6165
6138
  "cancelable": true,
6166
6139
  "composed": true,
6167
- "docs": "Event fired when the user cancels the dialog.",
6140
+ "docs": "Event fired when the step is cancelled. This is called exit to avoid conflicts with the JS-reserved \"cancel\" event name.",
6168
6141
  "docsTags": []
6169
6142
  },
6170
6143
  {
@@ -6980,12 +6953,12 @@
6980
6953
  "methods": [],
6981
6954
  "events": [
6982
6955
  {
6983
- "event": "cancel",
6956
+ "event": "exit",
6984
6957
  "detail": "any",
6985
6958
  "bubbles": true,
6986
6959
  "cancelable": true,
6987
6960
  "composed": true,
6988
- "docs": "Event fired when the dialog is cancelled.",
6961
+ "docs": "Event fired when the step is cancelled. This is called exit to avoid conflicts with the JS-reserved \"cancel\" event name.",
6989
6962
  "docsTags": []
6990
6963
  },
6991
6964
  {
@@ -11,7 +11,7 @@ const VerdocsContactPicker = class {
11
11
  constructor(hostRef) {
12
12
  registerInstance(this, hostRef);
13
13
  this.searchContacts = createEvent(this, "searchContacts", 7);
14
- this.cancel = createEvent(this, "cancel", 7);
14
+ this.exit = createEvent(this, "exit", 7);
15
15
  this.next = createEvent(this, "next", 7);
16
16
  this.endpoint = VerdocsEndpoint.getDefault();
17
17
  this.templateRole = null;
@@ -55,7 +55,7 @@ const VerdocsContactPicker = class {
55
55
  var _a;
56
56
  e.stopPropagation();
57
57
  this.showSuggestions = false;
58
- (_a = this.cancel) === null || _a === void 0 ? void 0 : _a.emit();
58
+ (_a = this.exit) === null || _a === void 0 ? void 0 : _a.emit();
59
59
  }
60
60
  handleSubmit(e) {
61
61
  var _a;
@@ -21,7 +21,7 @@ const VerdocsFieldAttachment = class {
21
21
  handleShow() {
22
22
  this.dialog = document.createElement('verdocs-upload-dialog');
23
23
  this.dialog.open = true;
24
- this.dialog.addEventListener('cancel', () => { var _a; return (_a = this.dialog) === null || _a === void 0 ? void 0 : _a.remove(); });
24
+ this.dialog.addEventListener('exit', () => { var _a; return (_a = this.dialog) === null || _a === void 0 ? void 0 : _a.remove(); });
25
25
  document.addEventListener('done', () => { var _a; return (_a = this.dialog) === null || _a === void 0 ? void 0 : _a.remove(); });
26
26
  document.body.append(this.dialog);
27
27
  }
@@ -16,7 +16,7 @@ const VerdocsFieldInitial = class {
16
16
  constructor(hostRef) {
17
17
  registerInstance(this, hostRef);
18
18
  this.adopt = createEvent(this, "adopt", 7);
19
- this.cancel = createEvent(this, "cancel", 7);
19
+ this.exit = createEvent(this, "exit", 7);
20
20
  this.fieldChange = createEvent(this, "fieldChange", 7);
21
21
  this.settingsChanged = createEvent(this, "settingsChanged", 7);
22
22
  this.settingsPress = createEvent(this, "settingsPress", 7);
@@ -49,7 +49,7 @@ const VerdocsFieldInitial = class {
49
49
  this.dialog = document.createElement('verdocs-initial-dialog');
50
50
  this.dialog.setAttribute('initials', this.initials);
51
51
  this.dialog.setAttribute('roleindex', this.roleindex);
52
- this.dialog.addEventListener('cancel', () => this.hideDialog());
52
+ this.dialog.addEventListener('exit', () => this.hideDialog());
53
53
  this.dialog.addEventListener('next', e => this.handleAdopt(e));
54
54
  document.body.append(this.dialog);
55
55
  }
@@ -48,7 +48,7 @@ const VerdocsFieldSignature = class {
48
48
  this.dialog = document.createElement('verdocs-signature-dialog');
49
49
  this.dialog.setAttribute('name', this.name);
50
50
  this.dialog.setAttribute('roleindex', this.roleindex);
51
- this.dialog.addEventListener('cancel', () => this.hideDialog());
51
+ this.dialog.addEventListener('exit', () => this.hideDialog());
52
52
  this.dialog.addEventListener('next', e => this.handleAdopt(e));
53
53
  document.body.append(this.dialog);
54
54
  }
@@ -6,7 +6,7 @@ const VerdocsInitialDialog = class {
6
6
  constructor(hostRef) {
7
7
  registerInstance(this, hostRef);
8
8
  this.next = createEvent(this, "next", 7);
9
- this.cancel = createEvent(this, "cancel", 7);
9
+ this.exit = createEvent(this, "exit", 7);
10
10
  this.initials = '';
11
11
  this.fontLoaded = false;
12
12
  this.enteredInitials = '';
@@ -49,7 +49,7 @@ const VerdocsInitialDialog = class {
49
49
  handleCancel(e) {
50
50
  e.stopPropagation();
51
51
  e.preventDefault();
52
- this.cancel.emit();
52
+ this.exit.emit();
53
53
  }
54
54
  handleAdopt(e) {
55
55
  e.stopPropagation();
@@ -6,7 +6,7 @@ const QuestionIcon = `<svg width="40" height="40" viewBox="0 0 40 40" fill="none
6
6
  const VerdocsKbaDialog = class {
7
7
  constructor(hostRef) {
8
8
  registerInstance(this, hostRef);
9
- this.cancel = createEvent(this, "cancel", 7);
9
+ this.exit = createEvent(this, "exit", 7);
10
10
  this.next = createEvent(this, "next", 7);
11
11
  this.step = 1;
12
12
  this.steps = 3;
@@ -19,7 +19,7 @@ const VerdocsKbaDialog = class {
19
19
  this.response = '';
20
20
  }
21
21
  handleCancel() {
22
- this.cancel.emit();
22
+ this.exit.emit();
23
23
  }
24
24
  // We need a separate event handler for clicking the background because it can receive events "through" other child components
25
25
  handleDismiss(e) {
@@ -6,7 +6,7 @@ const VerdocsOkDialog = class {
6
6
  constructor(hostRef) {
7
7
  registerInstance(this, hostRef);
8
8
  this.next = createEvent(this, "next", 7);
9
- this.cancel = createEvent(this, "cancel", 7);
9
+ this.exit = createEvent(this, "exit", 7);
10
10
  this.heading = '';
11
11
  this.message = '';
12
12
  this.showCancel = false;
@@ -15,13 +15,13 @@ const VerdocsOkDialog = class {
15
15
  this.next.emit();
16
16
  }
17
17
  handleCancel() {
18
- this.cancel.emit();
18
+ this.exit.emit();
19
19
  }
20
20
  // We need a separate event handler for clicking the background because it can receive events "through" other child components
21
21
  handleDismiss(e) {
22
22
  if (e.target.className === 'background-overlay') {
23
23
  e.preventDefault();
24
- this.cancel.emit();
24
+ this.exit.emit();
25
25
  }
26
26
  }
27
27
  render() {
@@ -24,7 +24,7 @@ const VerdocsSend = class {
24
24
  constructor(hostRef) {
25
25
  registerInstance(this, hostRef);
26
26
  this.send = createEvent(this, "send", 7);
27
- this.cancel = createEvent(this, "cancel", 7);
27
+ this.exit = createEvent(this, "exit", 7);
28
28
  this.sdkError = createEvent(this, "sdkError", 7);
29
29
  this.levels = [];
30
30
  this.endpoint = VerdocsEndpoint.getDefault();
@@ -103,7 +103,7 @@ const VerdocsSend = class {
103
103
  handleCancel(e) {
104
104
  var _a;
105
105
  e.stopPropagation();
106
- (_a = this.cancel) === null || _a === void 0 ? void 0 : _a.emit();
106
+ (_a = this.exit) === null || _a === void 0 ? void 0 : _a.emit();
107
107
  }
108
108
  render() {
109
109
  const roleNames = state.template.roles.map(role => role.name) || [];
@@ -6,7 +6,7 @@ const VerdocsSignatureDialog = class {
6
6
  constructor(hostRef) {
7
7
  registerInstance(this, hostRef);
8
8
  this.next = createEvent(this, "next", 7);
9
- this.cancel = createEvent(this, "cancel", 7);
9
+ this.exit = createEvent(this, "exit", 7);
10
10
  this.name = '';
11
11
  this.fontLoaded = false;
12
12
  this.enteredName = '';
@@ -49,7 +49,7 @@ const VerdocsSignatureDialog = class {
49
49
  handleCancel(e) {
50
50
  e.stopPropagation();
51
51
  e.preventDefault();
52
- this.cancel.emit();
52
+ this.exit.emit();
53
53
  }
54
54
  handleAdopt(e) {
55
55
  e.stopPropagation();
@@ -22,8 +22,7 @@ const FileIcon = '<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24">
22
22
  const VerdocsTemplateCreate = class {
23
23
  constructor(hostRef) {
24
24
  registerInstance(this, hostRef);
25
- this.cancel = createEvent(this, "cancel", 7);
26
- this.testev = createEvent(this, "testev", 7);
25
+ this.exit = createEvent(this, "exit", 7);
27
26
  this.next = createEvent(this, "next", 7);
28
27
  this.sdkError = createEvent(this, "sdkError", 7);
29
28
  this.endpoint = VerdocsEndpoint.getDefault();
@@ -47,9 +46,7 @@ const VerdocsTemplateCreate = class {
47
46
  }
48
47
  handleCancel(e) {
49
48
  e.stopPropagation();
50
- console.log('Canceling');
51
- this.testev.emit();
52
- this.cancel.emit();
49
+ this.exit.emit();
53
50
  }
54
51
  async handleSubmit(e) {
55
52
  var _a, _b, _c;
@@ -132,8 +129,6 @@ const menuOptions = [
132
129
  const VerdocsTemplateFields = class {
133
130
  constructor(hostRef) {
134
131
  registerInstance(this, hostRef);
135
- this.next = createEvent(this, "next", 7);
136
- this.cancel = createEvent(this, "cancel", 7);
137
132
  this.sdkError = createEvent(this, "sdkError", 7);
138
133
  this.templateUpdated = createEvent(this, "templateUpdated", 7);
139
134
  this.pageHeights = {};
@@ -12,7 +12,7 @@ const verdocsTemplatePropertiesCss = "verdocs-template-properties{font-family:\"
12
12
  const VerdocsTemplateProperties = class {
13
13
  constructor(hostRef) {
14
14
  registerInstance(this, hostRef);
15
- this.cancel = createEvent(this, "cancel", 7);
15
+ this.exit = createEvent(this, "exit", 7);
16
16
  this.next = createEvent(this, "next", 7);
17
17
  this.sdkError = createEvent(this, "sdkError", 7);
18
18
  this.endpoint = VerdocsEndpoint.getDefault();
@@ -48,7 +48,7 @@ const VerdocsTemplateProperties = class {
48
48
  handleCancel(e) {
49
49
  var _a;
50
50
  e.stopPropagation();
51
- (_a = this.cancel) === null || _a === void 0 ? void 0 : _a.emit();
51
+ (_a = this.exit) === null || _a === void 0 ? void 0 : _a.emit();
52
52
  }
53
53
  handleSubmit(e) {
54
54
  var _a;
@@ -36,7 +36,7 @@ const VerdocsTemplateRoles = class {
36
36
  constructor(hostRef) {
37
37
  registerInstance(this, hostRef);
38
38
  this.next = createEvent(this, "next", 7);
39
- this.cancel = createEvent(this, "cancel", 7);
39
+ this.exit = createEvent(this, "exit", 7);
40
40
  this.sdkError = createEvent(this, "sdkError", 7);
41
41
  this.templateUpdated = createEvent(this, "templateUpdated", 7);
42
42
  this.sequences = [];
@@ -156,7 +156,7 @@ const VerdocsTemplateRoles = class {
156
156
  handleCancel(e) {
157
157
  var _a;
158
158
  e.stopPropagation();
159
- (_a = this.cancel) === null || _a === void 0 ? void 0 : _a.emit();
159
+ (_a = this.exit) === null || _a === void 0 ? void 0 : _a.emit();
160
160
  }
161
161
  handleSubmit(e) {
162
162
  var _a;
@@ -8,13 +8,13 @@ const PaperclipIcon = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewB
8
8
  const VerdocsUploadDialog = class {
9
9
  constructor(hostRef) {
10
10
  registerInstance(this, hostRef);
11
- this.cancel = createEvent(this, "cancel", 7);
11
+ this.exit = createEvent(this, "exit", 7);
12
12
  this.next = createEvent(this, "next", 7);
13
13
  this.draggingOver = false;
14
14
  this.decodedFiles = [];
15
15
  }
16
16
  handleCancel() {
17
- this.cancel.emit();
17
+ this.exit.emit();
18
18
  }
19
19
  // We need a separate event handler for clicking the background because it can receive events "through" other child components
20
20
  handleDismiss(e) {
@@ -1 +1 @@
1
- import{r as registerInstance,c as createEvent,h}from"./index-e64d45e2.js";import{V as VerdocsEndpoint}from"./VerdocsEndpoint-d50a8d28.js";import"./Token-54690789.js";var verdocsContactPickerCss='verdocs-contact-picker{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;background-color:#ffffff}verdocs-contact-picker form{background-color:#f5f5fa;padding:12px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}verdocs-contact-picker form .row{width:300px;display:-ms-flexbox;display:flex;position:relative;margin:0 0 20px 0;-ms-flex-direction:column;flex-direction:column}verdocs-contact-picker form label{display:block;font-size:14px;font-weight:500;margin:0 0 4px 0;color:#5c6575}verdocs-contact-picker form input{border:none;font-size:18px;padding:3px 6px 3px 0;background:transparent;border-bottom:1px solid #33364b}verdocs-contact-picker form input:focus{outline:none}verdocs-contact-picker form .dropdown{left:0;right:0;top:49px;z-index:100;position:absolute;background:#ffffff;-webkit-box-shadow:0 0 15px 0 rgba(0, 0, 0, 0.1);box-shadow:0 0 15px 0 rgba(0, 0, 0, 0.1)}verdocs-contact-picker form .dropdown .suggestion{display:-ms-flexbox;display:flex;padding:6px 12px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}verdocs-contact-picker form .dropdown .suggestion svg{fill:#666666}verdocs-contact-picker form .dropdown .suggestion .avatar{width:48px;height:48px;-ms-flex:0 0 48px;flex:0 0 48px;margin-right:8px;border-radius:100%}verdocs-contact-picker form .dropdown .suggestion .details{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}verdocs-contact-picker form .dropdown .suggestion .name{font-size:16px;font-weight:500;margin-bottom:3px;color:#092c4c}verdocs-contact-picker form .dropdown .suggestion .destination{font-size:14px;margin-bottom:3px;color:#33364b}verdocs-contact-picker form .dropdown .suggestion:hover{background:#eee;cursor:pointer}verdocs-contact-picker .buttons{display:-ms-flexbox;display:flex;-webkit-column-gap:8px;-moz-column-gap:8px;column-gap:8px;margin-top:16px;-ms-flex-direction:row;flex-direction:row}verdocs-contact-picker .buttons .flex-fill{-ms-flex:1;flex:1}verdocs-contact-picker ::-webkit-input-placeholder{color:#aaaaaa}verdocs-contact-picker ::-moz-placeholder{color:#aaaaaa}verdocs-contact-picker :-ms-input-placeholder{color:#aaaaaa}verdocs-contact-picker ::-ms-input-placeholder{color:#aaaaaa}verdocs-contact-picker ::placeholder{color:#aaaaaa}verdocs-contact-picker [data-lastpass-icon-root]{display:none !important}';var messageIcon='<svg class="MuiSvgIcon-root MuiSvgIcon-fontSizeMedium MuiBox-root css-1om0hkc" focusable="false" aria-hidden="true" viewBox="0 0 24 24"><path d="M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-2 12H6v-2h12v2zm0-3H6V9h12v2zm0-3H6V6h12v2z"></path></svg>';var delegateIcon='<svg class="MuiSvgIcon-root MuiSvgIcon-fontSizeMedium MuiSvgIcon-root MuiSvgIcon-fontSizeLarge css-zjt8k" focusable="false" aria-hidden="true" viewBox="0 0 24 24" data-testid="AssignmentIndIcon" tabindex="-1" title="AssignmentInd"><path d="M19 3h-4.18C14.4 1.84 13.3 1 12 1c-1.3 0-2.4.84-2.82 2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-7 0c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zm0 4c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3 1.34-3 3-3zm6 12H6v-1.4c0-2 4-3.1 6-3.1s6 1.1 6 3.1V19z"></path></svg>';var placeholderIcon='<svg class="MuiSvgIcon-root MuiSvgIcon-fontSizeMedium MuiSvgIcon-root MuiSvgIcon-fontSizeLarge css-zjt8k" focusable="false" aria-hidden="true" viewBox="0 0 24 24" data-testid="AccountCircleIcon" tabindex="-1" title="AccountCircle"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 4c1.93 0 3.5 1.57 3.5 3.5S13.93 13 12 13s-3.5-1.57-3.5-3.5S10.07 6 12 6zm0 14c-2.03 0-4.43-.82-6.14-2.88C7.55 15.8 9.68 15 12 15s4.45.8 6.14 2.12C16.43 19.18 14.03 20 12 20z"></path></svg>';var VerdocsContactPicker=function(){function e(e){registerInstance(this,e);this.searchContacts=createEvent(this,"searchContacts",7);this.cancel=createEvent(this,"cancel",7);this.next=createEvent(this,"next",7);this.endpoint=VerdocsEndpoint.getDefault();this.templateRole=null;this.contactSuggestions=[];this.name=undefined;this.email=undefined;this.phone=undefined;this.message=undefined;this.showSuggestions=false;this.showMessage=false;this.delegator=false;this.nameFieldId="verdocs-contact-picker-name-".concat(Math.random().toString(36).substring(2,11));this.emailFieldId="verdocs-contact-picker-email-".concat(Math.random().toString(36).substring(2,11));this.phoneFieldId="verdocs-contact-picker-phone-".concat(Math.random().toString(36).substring(2,11))}e.prototype.componentWillLoad=function(){if(this.templateRole){this.name=this.templateRole.full_name||"";this.email=this.templateRole.email||"";this.phone=this.templateRole.phone||"";this.delegator=this.templateRole.delegator||false;this.message=this.templateRole.message||"";this.showMessage=this.message!==""}};e.prototype.handleNameChange=function(e){var t;this.name=e.target.value;(t=this.searchContacts)===null||t===void 0?void 0:t.emit({query:this.name})};e.prototype.handleEmailChange=function(e){this.email=e.target.value};e.prototype.handlePhoneChange=function(e){this.phone=e.target.value};e.prototype.handleMessageChange=function(e){this.message=e.target.value};e.prototype.handleCancel=function(e){var t;e.stopPropagation();this.showSuggestions=false;(t=this.cancel)===null||t===void 0?void 0:t.emit()};e.prototype.handleSubmit=function(e){var t;e.stopPropagation();this.showSuggestions=false;(t=this.next)===null||t===void 0?void 0:t.emit({full_name:this.name,email:this.email,phone:this.phone,message:this.message,delegator:this.delegator})};e.prototype.handleSelectSuggestion=function(e,t){e.stopPropagation();this.name=t.name;this.email=t.email;this.phone=t.phone;this.showSuggestions=false};e.prototype.render=function(){var e=this;return h("form",{onSubmit:function(e){return e.preventDefault()},onClick:function(e){return e.stopPropagation()},autocomplete:"off"},h("div",{class:"row"},h("label",{htmlFor:this.nameFieldId},"Name:"),h("input",{id:this.nameFieldId,name:this.nameFieldId,type:"text","data-lpignore":"true",autocomplete:"blocked",value:this.name,placeholder:"Recipient Name...",onFocus:function(){var t;return e.showSuggestions=((t=e.contactSuggestions)===null||t===void 0?void 0:t.length)>0},onInput:function(t){return e.handleNameChange(t)}}),this.showSuggestions&&h("div",{class:"dropdown"},this.contactSuggestions.map((function(t){var o;return h("div",{key:(o=t.id)!==null&&o!==void 0?o:t.name,class:"suggestion",onClick:function(o){return e.handleSelectSuggestion(o,t)}},t.avatar?h("img",{alt:"Avatar",class:"avatar",src:t.avatar}):h("div",{class:"avatar",innerHTML:placeholderIcon}),h("div",{class:"details"},h("div",{class:"name"},t.name),t.email&&h("div",{class:"destination"},t.email),t.phone&&h("div",{class:"destination"},t.phone)))})))),h("div",{class:"row"},h("label",{htmlFor:this.emailFieldId},"Email:"),h("input",{id:this.emailFieldId,name:this.emailFieldId,type:"text","data-lpignore":"true",autoComplete:"blocked",value:this.email,placeholder:"Email Address...",onFocus:function(){return e.showSuggestions=false},onInput:function(t){return e.handleEmailChange(t)}})),h("div",{class:"row"},h("label",{htmlFor:this.phoneFieldId},"Phone:"),h("input",{id:this.phoneFieldId,name:this.phoneFieldId,type:"text","data-lpignore":"true",autoComplete:"blocked",value:this.phone,placeholder:"Phone Number...",onFocus:function(){return e.showSuggestions=false},onInput:function(t){return e.handlePhoneChange(t)}})),this.showMessage&&h("div",{class:"row"},h("label",{htmlFor:"verdocs-contact-picker-message"},"Message:"),h("input",{id:"verdocs-contact-picker-message",name:"verdocs-contact-picker-message",type:"text","data-lpignore":"true",autocomplete:"blocked",value:this.message,placeholder:"Invitation Message...",onFocus:function(){return e.showSuggestions=false},onInput:function(t){return e.handleMessageChange(t)}})),h("div",{class:"buttons"},h("verdocs-toggle-button",{icon:messageIcon,size:"small",active:this.showMessage,onToggle:function(t){e.showMessage=t.detail.active;e.showSuggestions=false}}),h("verdocs-toggle-button",{icon:delegateIcon,size:"small",active:this.delegator,onToggle:function(t){e.delegator=t.detail.active;e.showSuggestions=false}}),h("div",{class:"flex-fill"}),h("verdocs-button",{variant:"outline",label:"Cancel",size:"small",onClick:function(t){return e.handleCancel(t)}}),h("verdocs-button",{label:"OK",size:"small",onClick:function(t){return e.handleSubmit(t)}})))};return e}();VerdocsContactPicker.style=verdocsContactPickerCss;export{VerdocsContactPicker as verdocs_contact_picker};
1
+ import{r as registerInstance,c as createEvent,h}from"./index-e64d45e2.js";import{V as VerdocsEndpoint}from"./VerdocsEndpoint-d50a8d28.js";import"./Token-54690789.js";var verdocsContactPickerCss='verdocs-contact-picker{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;background-color:#ffffff}verdocs-contact-picker form{background-color:#f5f5fa;padding:12px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}verdocs-contact-picker form .row{width:300px;display:-ms-flexbox;display:flex;position:relative;margin:0 0 20px 0;-ms-flex-direction:column;flex-direction:column}verdocs-contact-picker form label{display:block;font-size:14px;font-weight:500;margin:0 0 4px 0;color:#5c6575}verdocs-contact-picker form input{border:none;font-size:18px;padding:3px 6px 3px 0;background:transparent;border-bottom:1px solid #33364b}verdocs-contact-picker form input:focus{outline:none}verdocs-contact-picker form .dropdown{left:0;right:0;top:49px;z-index:100;position:absolute;background:#ffffff;-webkit-box-shadow:0 0 15px 0 rgba(0, 0, 0, 0.1);box-shadow:0 0 15px 0 rgba(0, 0, 0, 0.1)}verdocs-contact-picker form .dropdown .suggestion{display:-ms-flexbox;display:flex;padding:6px 12px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}verdocs-contact-picker form .dropdown .suggestion svg{fill:#666666}verdocs-contact-picker form .dropdown .suggestion .avatar{width:48px;height:48px;-ms-flex:0 0 48px;flex:0 0 48px;margin-right:8px;border-radius:100%}verdocs-contact-picker form .dropdown .suggestion .details{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}verdocs-contact-picker form .dropdown .suggestion .name{font-size:16px;font-weight:500;margin-bottom:3px;color:#092c4c}verdocs-contact-picker form .dropdown .suggestion .destination{font-size:14px;margin-bottom:3px;color:#33364b}verdocs-contact-picker form .dropdown .suggestion:hover{background:#eee;cursor:pointer}verdocs-contact-picker .buttons{display:-ms-flexbox;display:flex;-webkit-column-gap:8px;-moz-column-gap:8px;column-gap:8px;margin-top:16px;-ms-flex-direction:row;flex-direction:row}verdocs-contact-picker .buttons .flex-fill{-ms-flex:1;flex:1}verdocs-contact-picker ::-webkit-input-placeholder{color:#aaaaaa}verdocs-contact-picker ::-moz-placeholder{color:#aaaaaa}verdocs-contact-picker :-ms-input-placeholder{color:#aaaaaa}verdocs-contact-picker ::-ms-input-placeholder{color:#aaaaaa}verdocs-contact-picker ::placeholder{color:#aaaaaa}verdocs-contact-picker [data-lastpass-icon-root]{display:none !important}';var messageIcon='<svg class="MuiSvgIcon-root MuiSvgIcon-fontSizeMedium MuiBox-root css-1om0hkc" focusable="false" aria-hidden="true" viewBox="0 0 24 24"><path d="M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-2 12H6v-2h12v2zm0-3H6V9h12v2zm0-3H6V6h12v2z"></path></svg>';var delegateIcon='<svg class="MuiSvgIcon-root MuiSvgIcon-fontSizeMedium MuiSvgIcon-root MuiSvgIcon-fontSizeLarge css-zjt8k" focusable="false" aria-hidden="true" viewBox="0 0 24 24" data-testid="AssignmentIndIcon" tabindex="-1" title="AssignmentInd"><path d="M19 3h-4.18C14.4 1.84 13.3 1 12 1c-1.3 0-2.4.84-2.82 2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-7 0c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zm0 4c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3 1.34-3 3-3zm6 12H6v-1.4c0-2 4-3.1 6-3.1s6 1.1 6 3.1V19z"></path></svg>';var placeholderIcon='<svg class="MuiSvgIcon-root MuiSvgIcon-fontSizeMedium MuiSvgIcon-root MuiSvgIcon-fontSizeLarge css-zjt8k" focusable="false" aria-hidden="true" viewBox="0 0 24 24" data-testid="AccountCircleIcon" tabindex="-1" title="AccountCircle"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 4c1.93 0 3.5 1.57 3.5 3.5S13.93 13 12 13s-3.5-1.57-3.5-3.5S10.07 6 12 6zm0 14c-2.03 0-4.43-.82-6.14-2.88C7.55 15.8 9.68 15 12 15s4.45.8 6.14 2.12C16.43 19.18 14.03 20 12 20z"></path></svg>';var VerdocsContactPicker=function(){function e(e){registerInstance(this,e);this.searchContacts=createEvent(this,"searchContacts",7);this.exit=createEvent(this,"exit",7);this.next=createEvent(this,"next",7);this.endpoint=VerdocsEndpoint.getDefault();this.templateRole=null;this.contactSuggestions=[];this.name=undefined;this.email=undefined;this.phone=undefined;this.message=undefined;this.showSuggestions=false;this.showMessage=false;this.delegator=false;this.nameFieldId="verdocs-contact-picker-name-".concat(Math.random().toString(36).substring(2,11));this.emailFieldId="verdocs-contact-picker-email-".concat(Math.random().toString(36).substring(2,11));this.phoneFieldId="verdocs-contact-picker-phone-".concat(Math.random().toString(36).substring(2,11))}e.prototype.componentWillLoad=function(){if(this.templateRole){this.name=this.templateRole.full_name||"";this.email=this.templateRole.email||"";this.phone=this.templateRole.phone||"";this.delegator=this.templateRole.delegator||false;this.message=this.templateRole.message||"";this.showMessage=this.message!==""}};e.prototype.handleNameChange=function(e){var t;this.name=e.target.value;(t=this.searchContacts)===null||t===void 0?void 0:t.emit({query:this.name})};e.prototype.handleEmailChange=function(e){this.email=e.target.value};e.prototype.handlePhoneChange=function(e){this.phone=e.target.value};e.prototype.handleMessageChange=function(e){this.message=e.target.value};e.prototype.handleCancel=function(e){var t;e.stopPropagation();this.showSuggestions=false;(t=this.exit)===null||t===void 0?void 0:t.emit()};e.prototype.handleSubmit=function(e){var t;e.stopPropagation();this.showSuggestions=false;(t=this.next)===null||t===void 0?void 0:t.emit({full_name:this.name,email:this.email,phone:this.phone,message:this.message,delegator:this.delegator})};e.prototype.handleSelectSuggestion=function(e,t){e.stopPropagation();this.name=t.name;this.email=t.email;this.phone=t.phone;this.showSuggestions=false};e.prototype.render=function(){var e=this;return h("form",{onSubmit:function(e){return e.preventDefault()},onClick:function(e){return e.stopPropagation()},autocomplete:"off"},h("div",{class:"row"},h("label",{htmlFor:this.nameFieldId},"Name:"),h("input",{id:this.nameFieldId,name:this.nameFieldId,type:"text","data-lpignore":"true",autocomplete:"blocked",value:this.name,placeholder:"Recipient Name...",onFocus:function(){var t;return e.showSuggestions=((t=e.contactSuggestions)===null||t===void 0?void 0:t.length)>0},onInput:function(t){return e.handleNameChange(t)}}),this.showSuggestions&&h("div",{class:"dropdown"},this.contactSuggestions.map((function(t){var o;return h("div",{key:(o=t.id)!==null&&o!==void 0?o:t.name,class:"suggestion",onClick:function(o){return e.handleSelectSuggestion(o,t)}},t.avatar?h("img",{alt:"Avatar",class:"avatar",src:t.avatar}):h("div",{class:"avatar",innerHTML:placeholderIcon}),h("div",{class:"details"},h("div",{class:"name"},t.name),t.email&&h("div",{class:"destination"},t.email),t.phone&&h("div",{class:"destination"},t.phone)))})))),h("div",{class:"row"},h("label",{htmlFor:this.emailFieldId},"Email:"),h("input",{id:this.emailFieldId,name:this.emailFieldId,type:"text","data-lpignore":"true",autoComplete:"blocked",value:this.email,placeholder:"Email Address...",onFocus:function(){return e.showSuggestions=false},onInput:function(t){return e.handleEmailChange(t)}})),h("div",{class:"row"},h("label",{htmlFor:this.phoneFieldId},"Phone:"),h("input",{id:this.phoneFieldId,name:this.phoneFieldId,type:"text","data-lpignore":"true",autoComplete:"blocked",value:this.phone,placeholder:"Phone Number...",onFocus:function(){return e.showSuggestions=false},onInput:function(t){return e.handlePhoneChange(t)}})),this.showMessage&&h("div",{class:"row"},h("label",{htmlFor:"verdocs-contact-picker-message"},"Message:"),h("input",{id:"verdocs-contact-picker-message",name:"verdocs-contact-picker-message",type:"text","data-lpignore":"true",autocomplete:"blocked",value:this.message,placeholder:"Invitation Message...",onFocus:function(){return e.showSuggestions=false},onInput:function(t){return e.handleMessageChange(t)}})),h("div",{class:"buttons"},h("verdocs-toggle-button",{icon:messageIcon,size:"small",active:this.showMessage,onToggle:function(t){e.showMessage=t.detail.active;e.showSuggestions=false}}),h("verdocs-toggle-button",{icon:delegateIcon,size:"small",active:this.delegator,onToggle:function(t){e.delegator=t.detail.active;e.showSuggestions=false}}),h("div",{class:"flex-fill"}),h("verdocs-button",{variant:"outline",label:"Cancel",size:"small",onClick:function(t){return e.handleCancel(t)}}),h("verdocs-button",{label:"OK",size:"small",onClick:function(t){return e.handleSubmit(t)}})))};return e}();VerdocsContactPicker.style=verdocsContactPickerCss;export{VerdocsContactPicker as verdocs_contact_picker};
@@ -1 +1 @@
1
- var __awaiter=this&&this.__awaiter||function(e,t,n,i){function r(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,o){function a(e){try{l(i.next(e))}catch(e){o(e)}}function s(e){try{l(i["throw"](e))}catch(e){o(e)}}function l(e){e.done?n(e.value):r(e.value).then(a,s)}l((i=i.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},i,r,o,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(e){return function(t){return l([e,t])}}function l(a){if(i)throw new TypeError("Generator is already executing.");while(n)try{if(i=1,r&&(o=a[0]&2?r["return"]:a[0]?r["throw"]||((o=r["return"])&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;if(r=0,o)a=[a[0]&2,o.value];switch(a[0]){case 0:case 1:o=a;break;case 4:n.label++;return{value:a[1],done:false};case 5:n.label++;r=a[1];a=[0];continue;case 7:a=n.ops.pop();n.trys.pop();continue;default:if(!(o=n.trys,o=o.length>0&&o[o.length-1])&&(a[0]===6||a[0]===2)){n=0;continue}if(a[0]===3&&(!o||a[1]>o[0]&&a[1]<o[3])){n.label=a[1];break}if(a[0]===6&&n.label<o[1]){n.label=o[1];o=a;break}if(o&&n.label<o[2]){n.label=o[2];n.ops.push(a);break}if(o[2])n.ops.pop();n.trys.pop();continue}a=t.call(e,n)}catch(e){a=[6,e];r=0}finally{i=o=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};import{r as registerInstance,c as createEvent,h,H as Host}from"./index-e64d45e2.js";import{g as getRGBA}from"./Colors-1b298092.js";import{s as state}from"./templateStore-5cb73464.js";import"./index-24fd1580.js";import"./Primitives-054bc6e5.js";var verdocsFieldAttachmentCss='verdocs-field-attachment{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;width:24px;height:24px;display:block;font-size:11px;background-color:transparent;-webkit-transform-origin:bottom left;transform-origin:bottom left}verdocs-field-attachment.disabled{opacity:0.5}verdocs-field-attachment.disabled span{cursor:inherit}verdocs-field-attachment span{width:20px;cursor:pointer}verdocs-field-attachment.required span{border:1px solid #cc0000}verdocs-field-attachment.focused{-webkit-animation:verdocs-field-pulse 0.75s 2;animation:verdocs-field-pulse 0.75s 2}';var PaperclipIcon='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15.172 7l-6.586 6.586a2 2 0 102.828 2.828l6.414-6.586a4 4 0 00-5.656-5.656l-6.415 6.585a6 6 0 108.486 8.486L20.5 13" /></svg>';var VerdocsFieldAttachment=function(){function e(e){registerInstance(this,e);this.settingsChanged=createEvent(this,"settingsChanged",7);this.field=null;this.disabled=false;this.roleIndex=0}e.prototype.focusField=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.handleShow();return[2]}))}))};e.prototype.handleShow=function(){var e=this;this.dialog=document.createElement("verdocs-upload-dialog");this.dialog.open=true;this.dialog.addEventListener("cancel",(function(){var t;return(t=e.dialog)===null||t===void 0?void 0:t.remove()}));document.addEventListener("done",(function(){var t;return(t=e.dialog)===null||t===void 0?void 0:t.remove()}));document.body.append(this.dialog)};e.prototype.showSettingsPanel=function(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(t){e=document.getElementById("verdocs-settings-panel-".concat(this.field.name));if(e&&e.showPanel){e.showPanel()}return[2]}))}))};e.prototype.hideSettingsPanel=function(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(t){e=document.getElementById("verdocs-settings-panel-".concat(this.field.name));if(e&&e.hidePanel){e.hidePanel()}state.updateCount++;return[2]}))}))};e.prototype.render=function(){var e=this;var t,n,i,r;var o={x:0,y:0};if("settings"in this.field&&((t=this.field)===null||t===void 0?void 0:t.settings)){o=this.field.settings}else if("setting"in this.field&&((n=this.field)===null||n===void 0?void 0:n.setting)){o=this.field.setting}var a=(r=(i=this.disabled)!==null&&i!==void 0?i:o.disabled)!==null&&r!==void 0?r:false;var s=this.field["rgba"]||getRGBA(this.roleIndex);return h(Host,{class:{required:o.required,disabled:a},style:{backgroundColor:s}},h("span",{innerHTML:PaperclipIcon,onClick:function(){return!a&&e.handleShow()}}))};return e}();VerdocsFieldAttachment.style=verdocsFieldAttachmentCss;export{VerdocsFieldAttachment as verdocs_field_attachment};
1
+ var __awaiter=this&&this.__awaiter||function(e,t,n,i){function r(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,o){function a(e){try{l(i.next(e))}catch(e){o(e)}}function s(e){try{l(i["throw"](e))}catch(e){o(e)}}function l(e){e.done?n(e.value):r(e.value).then(a,s)}l((i=i.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},i,r,o,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(e){return function(t){return l([e,t])}}function l(a){if(i)throw new TypeError("Generator is already executing.");while(n)try{if(i=1,r&&(o=a[0]&2?r["return"]:a[0]?r["throw"]||((o=r["return"])&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;if(r=0,o)a=[a[0]&2,o.value];switch(a[0]){case 0:case 1:o=a;break;case 4:n.label++;return{value:a[1],done:false};case 5:n.label++;r=a[1];a=[0];continue;case 7:a=n.ops.pop();n.trys.pop();continue;default:if(!(o=n.trys,o=o.length>0&&o[o.length-1])&&(a[0]===6||a[0]===2)){n=0;continue}if(a[0]===3&&(!o||a[1]>o[0]&&a[1]<o[3])){n.label=a[1];break}if(a[0]===6&&n.label<o[1]){n.label=o[1];o=a;break}if(o&&n.label<o[2]){n.label=o[2];n.ops.push(a);break}if(o[2])n.ops.pop();n.trys.pop();continue}a=t.call(e,n)}catch(e){a=[6,e];r=0}finally{i=o=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};import{r as registerInstance,c as createEvent,h,H as Host}from"./index-e64d45e2.js";import{g as getRGBA}from"./Colors-1b298092.js";import{s as state}from"./templateStore-5cb73464.js";import"./index-24fd1580.js";import"./Primitives-054bc6e5.js";var verdocsFieldAttachmentCss='verdocs-field-attachment{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;width:24px;height:24px;display:block;font-size:11px;background-color:transparent;-webkit-transform-origin:bottom left;transform-origin:bottom left}verdocs-field-attachment.disabled{opacity:0.5}verdocs-field-attachment.disabled span{cursor:inherit}verdocs-field-attachment span{width:20px;cursor:pointer}verdocs-field-attachment.required span{border:1px solid #cc0000}verdocs-field-attachment.focused{-webkit-animation:verdocs-field-pulse 0.75s 2;animation:verdocs-field-pulse 0.75s 2}';var PaperclipIcon='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15.172 7l-6.586 6.586a2 2 0 102.828 2.828l6.414-6.586a4 4 0 00-5.656-5.656l-6.415 6.585a6 6 0 108.486 8.486L20.5 13" /></svg>';var VerdocsFieldAttachment=function(){function e(e){registerInstance(this,e);this.settingsChanged=createEvent(this,"settingsChanged",7);this.field=null;this.disabled=false;this.roleIndex=0}e.prototype.focusField=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.handleShow();return[2]}))}))};e.prototype.handleShow=function(){var e=this;this.dialog=document.createElement("verdocs-upload-dialog");this.dialog.open=true;this.dialog.addEventListener("exit",(function(){var t;return(t=e.dialog)===null||t===void 0?void 0:t.remove()}));document.addEventListener("done",(function(){var t;return(t=e.dialog)===null||t===void 0?void 0:t.remove()}));document.body.append(this.dialog)};e.prototype.showSettingsPanel=function(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(t){e=document.getElementById("verdocs-settings-panel-".concat(this.field.name));if(e&&e.showPanel){e.showPanel()}return[2]}))}))};e.prototype.hideSettingsPanel=function(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(t){e=document.getElementById("verdocs-settings-panel-".concat(this.field.name));if(e&&e.hidePanel){e.hidePanel()}state.updateCount++;return[2]}))}))};e.prototype.render=function(){var e=this;var t,n,i,r;var o={x:0,y:0};if("settings"in this.field&&((t=this.field)===null||t===void 0?void 0:t.settings)){o=this.field.settings}else if("setting"in this.field&&((n=this.field)===null||n===void 0?void 0:n.setting)){o=this.field.setting}var a=(r=(i=this.disabled)!==null&&i!==void 0?i:o.disabled)!==null&&r!==void 0?r:false;var s=this.field["rgba"]||getRGBA(this.roleIndex);return h(Host,{class:{required:o.required,disabled:a},style:{backgroundColor:s}},h("span",{innerHTML:PaperclipIcon,onClick:function(){return!a&&e.handleShow()}}))};return e}();VerdocsFieldAttachment.style=verdocsFieldAttachmentCss;export{VerdocsFieldAttachment as verdocs_field_attachment};
@@ -1 +1 @@
1
- var __awaiter=this&&this.__awaiter||function(e,t,i,n){function o(e){return e instanceof i?e:new i((function(t){t(e)}))}return new(i||(i=Promise))((function(i,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n["throw"](e))}catch(e){r(e)}}function l(e){e.done?i(e.value):o(e.value).then(s,a)}l((n=n.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var i={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},n,o,r,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(e){return function(t){return l([e,t])}}function l(s){if(n)throw new TypeError("Generator is already executing.");while(i)try{if(n=1,o&&(r=s[0]&2?o["return"]:s[0]?o["throw"]||((r=o["return"])&&r.call(o),0):o.next)&&!(r=r.call(o,s[1])).done)return r;if(o=0,r)s=[s[0]&2,r.value];switch(s[0]){case 0:case 1:r=s;break;case 4:i.label++;return{value:s[1],done:false};case 5:i.label++;o=s[1];s=[0];continue;case 7:s=i.ops.pop();i.trys.pop();continue;default:if(!(r=i.trys,r=r.length>0&&r[r.length-1])&&(s[0]===6||s[0]===2)){i=0;continue}if(s[0]===3&&(!r||s[1]>r[0]&&s[1]<r[3])){i.label=s[1];break}if(s[0]===6&&i.label<r[1]){i.label=r[1];r=s;break}if(r&&i.label<r[2]){i.label=r[2];i.ops.push(s);break}if(r[2])i.ops.pop();i.trys.pop();continue}s=t.call(e,i)}catch(e){s=[6,e];o=0}finally{n=r=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};import{r as registerInstance,c as createEvent,h,H as Host}from"./index-e64d45e2.js";import{g as getRGBA}from"./Colors-1b298092.js";import{g as getFieldSettings}from"./utils-e9a6b9e4.js";import{s as state}from"./templateStore-5cb73464.js";import"./Envelopes-eb3eef02.js";import"./Token-54690789.js";import"./Files-70a192df.js";import"./index-d264c496.js";import"./index-24fd1580.js";import"./Primitives-054bc6e5.js";var verdocsFieldInitialCss='verdocs-field-initial{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;width:83px;height:36px;display:block;font-size:11px;letter-spacing:0.3px;background-color:transparent;-webkit-transform-origin:bottom left;transform-origin:bottom left;border:1px solid rgba(0, 0, 0, 0.2)}verdocs-field-initial.disabled{opacity:0.5}verdocs-field-initial.done{border:none;opacity:1}verdocs-field-initial img{display:block;max-width:100%;max-height:100%}verdocs-field-initial button{-webkit-box-sizing:border-box;box-sizing:border-box;border:none;color:rgba(0, 0, 0, 0.87);font-weight:500;-webkit-transform-origin:0 0;transform-origin:0 0;height:100%;width:100%;background:none;font-size:11px}verdocs-field-initial button.hide{display:none}verdocs-field-initial.required{border:1px solid #cc0000}verdocs-field-initial.focused{-webkit-animation:verdocs-field-pulse 0.75s 2;animation:verdocs-field-pulse 0.75s 2}verdocs-field-initial verdocs-button-panel{top:-3px;left:-2px;opacity:0.5;z-index:1000;cursor:pointer;position:absolute;-webkit-transform:scale(0.6);transform:scale(0.6)}verdocs-field-initial verdocs-button-panel[data-active],verdocs-field-initial verdocs-button-panel:hover{opacity:1}verdocs-field-initial verdocs-button-panel .icon svg{fill:#333333}verdocs-field-initial verdocs-button-panel .icon:hover svg{fill:#000000}';var settingsIcon='<svg xmlns="http://www.w3.org/2000/svg" height="20" width="20"><path d="m7.5 18.5-.312-2.667q-.188-.125-.396-.25-.209-.125-.396-.229l-2.479 1.063-2.521-4.334 2.125-1.625q.021-.104.021-.229v-.458q0-.125-.021-.229L1.396 7.917l2.521-4.313 2.5 1.042q.166-.104.375-.229.208-.125.396-.229L7.5 1.5h5l.312 2.688q.188.104.396.229.209.125.396.229l2.479-1.042 2.521 4.313-2.125 1.625v.916l2.125 1.625-2.521 4.334-2.5-1.063q-.166.104-.375.229-.208.125-.396.25L12.5 18.5Zm2.479-5.521q1.229 0 2.104-.875T12.958 10q0-1.229-.875-2.104t-2.104-.875q-1.208 0-2.094.875Q7 8.771 7 10t.885 2.104q.886.875 2.094.875Zm0-1.75q-.5 0-.864-.364Q8.75 10.5 8.75 10t.365-.865q.364-.364.864-.364t.865.364q.364.365.364.865t-.364.865q-.365.364-.865.364ZM10.021 10Zm-.792 6.521h1.542l.25-2.146q.625-.167 1.198-.51.573-.344 1.031-.823l2.021.854.771-1.271-1.771-1.354q.104-.292.156-.615.052-.323.052-.656 0-.292-.052-.604-.052-.313-.135-.646l1.77-1.375-.77-1.271-2.021.875q-.479-.5-1.042-.833-.562-.334-1.187-.5l-.271-2.167H9.208l-.25 2.167q-.625.166-1.187.5-.563.333-1.042.812l-2-.854-.771 1.271 1.73 1.354q-.084.333-.136.656Q5.5 9.708 5.5 10t.052.604q.052.313.136.667l-1.73 1.354.771 1.271 2-.834q.479.459 1.042.792.562.334 1.187.5Z"/></svg>';var VerdocsFieldInitial=function(){function e(e){registerInstance(this,e);this.adopt=createEvent(this,"adopt",7);this.cancel=createEvent(this,"cancel",7);this.fieldChange=createEvent(this,"fieldChange",7);this.settingsChanged=createEvent(this,"settingsChanged",7);this.settingsPress=createEvent(this,"settingsPress",7);this.deleted=createEvent(this,"deleted",7);this.field=null;this.disabled=false;this.initials="";this.editable=false;this.moveable=false;this.done=false;this.roleindex=0;this.tempInitials=""}e.prototype.focusField=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.handleShow();return[2]}))}))};e.prototype.hideDialog=function(){var e;(e=this.dialog)===null||e===void 0?void 0:e.remove();this.dialog=null};e.prototype.handleAdopt=function(e){var t;console.log("[INITIAL] Adopted initials");this.tempInitials=e.detail;(t=this.fieldChange)===null||t===void 0?void 0:t.emit(this.tempInitials);this.hideDialog()};e.prototype.handleShow=function(){var e=this;this.dialog=document.createElement("verdocs-initial-dialog");this.dialog.setAttribute("initials",this.initials);this.dialog.setAttribute("roleindex",this.roleindex);this.dialog.addEventListener("cancel",(function(){return e.hideDialog()}));this.dialog.addEventListener("next",(function(t){return e.handleAdopt(t)}));document.body.append(this.dialog)};e.prototype.showSettingsPanel=function(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(t){e=document.getElementById("verdocs-settings-panel-".concat(this.field.name));if(e&&e.showPanel){e.showPanel()}return[2]}))}))};e.prototype.hideSettingsPanel=function(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(t){e=document.getElementById("verdocs-settings-panel-".concat(this.field.name));if(e&&e.hidePanel){e.hidePanel()}state.updateCount++;return[2]}))}))};e.prototype.render=function(){var e=this;var t,i;var n=getFieldSettings(this.field);var o=n.base64||this.tempInitials;var r=(i=(t=this.disabled)!==null&&t!==void 0?t:n.disabled)!==null&&i!==void 0?i:false;var s=this.field["rgba"]||getRGBA(this.roleindex);if(this.done){return h(Host,{class:{done:this.done}},o&&h("img",{src:o,alt:"Initials"}))}return h(Host,{class:{required:n.required,disabled:r},style:{backgroundColor:s}},o?h("img",{src:o,alt:"Initials"}):h("button",{class:{},onClick:function(){return!r&&e.handleShow()}},"Initials"),this.editable&&h("verdocs-button-panel",{icon:settingsIcon,id:"verdocs-settings-panel-".concat(this.field.name)},h("h6",null,"Field Settings"),h("verdocs-template-field-properties",{templateId:state.templateId,fieldName:this.field.name,onClose:function(){return e.hideSettingsPanel()},onDelete:function(){var t;(t=e.deleted)===null||t===void 0?void 0:t.emit({fieldName:e.field.name});return e.hideSettingsPanel()},onSettingsChanged:function(t){var i;(i=e.settingsChanged)===null||i===void 0?void 0:i.emit(t.detail);return e.hideSettingsPanel()}})))};return e}();VerdocsFieldInitial.style=verdocsFieldInitialCss;export{VerdocsFieldInitial as verdocs_field_initial};
1
+ var __awaiter=this&&this.__awaiter||function(e,t,i,n){function o(e){return e instanceof i?e:new i((function(t){t(e)}))}return new(i||(i=Promise))((function(i,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n["throw"](e))}catch(e){r(e)}}function l(e){e.done?i(e.value):o(e.value).then(s,a)}l((n=n.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var i={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},n,o,r,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(e){return function(t){return l([e,t])}}function l(s){if(n)throw new TypeError("Generator is already executing.");while(i)try{if(n=1,o&&(r=s[0]&2?o["return"]:s[0]?o["throw"]||((r=o["return"])&&r.call(o),0):o.next)&&!(r=r.call(o,s[1])).done)return r;if(o=0,r)s=[s[0]&2,r.value];switch(s[0]){case 0:case 1:r=s;break;case 4:i.label++;return{value:s[1],done:false};case 5:i.label++;o=s[1];s=[0];continue;case 7:s=i.ops.pop();i.trys.pop();continue;default:if(!(r=i.trys,r=r.length>0&&r[r.length-1])&&(s[0]===6||s[0]===2)){i=0;continue}if(s[0]===3&&(!r||s[1]>r[0]&&s[1]<r[3])){i.label=s[1];break}if(s[0]===6&&i.label<r[1]){i.label=r[1];r=s;break}if(r&&i.label<r[2]){i.label=r[2];i.ops.push(s);break}if(r[2])i.ops.pop();i.trys.pop();continue}s=t.call(e,i)}catch(e){s=[6,e];o=0}finally{n=r=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};import{r as registerInstance,c as createEvent,h,H as Host}from"./index-e64d45e2.js";import{g as getRGBA}from"./Colors-1b298092.js";import{g as getFieldSettings}from"./utils-e9a6b9e4.js";import{s as state}from"./templateStore-5cb73464.js";import"./Envelopes-eb3eef02.js";import"./Token-54690789.js";import"./Files-70a192df.js";import"./index-d264c496.js";import"./index-24fd1580.js";import"./Primitives-054bc6e5.js";var verdocsFieldInitialCss='verdocs-field-initial{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;width:83px;height:36px;display:block;font-size:11px;letter-spacing:0.3px;background-color:transparent;-webkit-transform-origin:bottom left;transform-origin:bottom left;border:1px solid rgba(0, 0, 0, 0.2)}verdocs-field-initial.disabled{opacity:0.5}verdocs-field-initial.done{border:none;opacity:1}verdocs-field-initial img{display:block;max-width:100%;max-height:100%}verdocs-field-initial button{-webkit-box-sizing:border-box;box-sizing:border-box;border:none;color:rgba(0, 0, 0, 0.87);font-weight:500;-webkit-transform-origin:0 0;transform-origin:0 0;height:100%;width:100%;background:none;font-size:11px}verdocs-field-initial button.hide{display:none}verdocs-field-initial.required{border:1px solid #cc0000}verdocs-field-initial.focused{-webkit-animation:verdocs-field-pulse 0.75s 2;animation:verdocs-field-pulse 0.75s 2}verdocs-field-initial verdocs-button-panel{top:-3px;left:-2px;opacity:0.5;z-index:1000;cursor:pointer;position:absolute;-webkit-transform:scale(0.6);transform:scale(0.6)}verdocs-field-initial verdocs-button-panel[data-active],verdocs-field-initial verdocs-button-panel:hover{opacity:1}verdocs-field-initial verdocs-button-panel .icon svg{fill:#333333}verdocs-field-initial verdocs-button-panel .icon:hover svg{fill:#000000}';var settingsIcon='<svg xmlns="http://www.w3.org/2000/svg" height="20" width="20"><path d="m7.5 18.5-.312-2.667q-.188-.125-.396-.25-.209-.125-.396-.229l-2.479 1.063-2.521-4.334 2.125-1.625q.021-.104.021-.229v-.458q0-.125-.021-.229L1.396 7.917l2.521-4.313 2.5 1.042q.166-.104.375-.229.208-.125.396-.229L7.5 1.5h5l.312 2.688q.188.104.396.229.209.125.396.229l2.479-1.042 2.521 4.313-2.125 1.625v.916l2.125 1.625-2.521 4.334-2.5-1.063q-.166.104-.375.229-.208.125-.396.25L12.5 18.5Zm2.479-5.521q1.229 0 2.104-.875T12.958 10q0-1.229-.875-2.104t-2.104-.875q-1.208 0-2.094.875Q7 8.771 7 10t.885 2.104q.886.875 2.094.875Zm0-1.75q-.5 0-.864-.364Q8.75 10.5 8.75 10t.365-.865q.364-.364.864-.364t.865.364q.364.365.364.865t-.364.865q-.365.364-.865.364ZM10.021 10Zm-.792 6.521h1.542l.25-2.146q.625-.167 1.198-.51.573-.344 1.031-.823l2.021.854.771-1.271-1.771-1.354q.104-.292.156-.615.052-.323.052-.656 0-.292-.052-.604-.052-.313-.135-.646l1.77-1.375-.77-1.271-2.021.875q-.479-.5-1.042-.833-.562-.334-1.187-.5l-.271-2.167H9.208l-.25 2.167q-.625.166-1.187.5-.563.333-1.042.812l-2-.854-.771 1.271 1.73 1.354q-.084.333-.136.656Q5.5 9.708 5.5 10t.052.604q.052.313.136.667l-1.73 1.354.771 1.271 2-.834q.479.459 1.042.792.562.334 1.187.5Z"/></svg>';var VerdocsFieldInitial=function(){function e(e){registerInstance(this,e);this.adopt=createEvent(this,"adopt",7);this.exit=createEvent(this,"exit",7);this.fieldChange=createEvent(this,"fieldChange",7);this.settingsChanged=createEvent(this,"settingsChanged",7);this.settingsPress=createEvent(this,"settingsPress",7);this.deleted=createEvent(this,"deleted",7);this.field=null;this.disabled=false;this.initials="";this.editable=false;this.moveable=false;this.done=false;this.roleindex=0;this.tempInitials=""}e.prototype.focusField=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.handleShow();return[2]}))}))};e.prototype.hideDialog=function(){var e;(e=this.dialog)===null||e===void 0?void 0:e.remove();this.dialog=null};e.prototype.handleAdopt=function(e){var t;console.log("[INITIAL] Adopted initials");this.tempInitials=e.detail;(t=this.fieldChange)===null||t===void 0?void 0:t.emit(this.tempInitials);this.hideDialog()};e.prototype.handleShow=function(){var e=this;this.dialog=document.createElement("verdocs-initial-dialog");this.dialog.setAttribute("initials",this.initials);this.dialog.setAttribute("roleindex",this.roleindex);this.dialog.addEventListener("exit",(function(){return e.hideDialog()}));this.dialog.addEventListener("next",(function(t){return e.handleAdopt(t)}));document.body.append(this.dialog)};e.prototype.showSettingsPanel=function(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(t){e=document.getElementById("verdocs-settings-panel-".concat(this.field.name));if(e&&e.showPanel){e.showPanel()}return[2]}))}))};e.prototype.hideSettingsPanel=function(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(t){e=document.getElementById("verdocs-settings-panel-".concat(this.field.name));if(e&&e.hidePanel){e.hidePanel()}state.updateCount++;return[2]}))}))};e.prototype.render=function(){var e=this;var t,i;var n=getFieldSettings(this.field);var o=n.base64||this.tempInitials;var r=(i=(t=this.disabled)!==null&&t!==void 0?t:n.disabled)!==null&&i!==void 0?i:false;var s=this.field["rgba"]||getRGBA(this.roleindex);if(this.done){return h(Host,{class:{done:this.done}},o&&h("img",{src:o,alt:"Initials"}))}return h(Host,{class:{required:n.required,disabled:r},style:{backgroundColor:s}},o?h("img",{src:o,alt:"Initials"}):h("button",{class:{},onClick:function(){return!r&&e.handleShow()}},"Initials"),this.editable&&h("verdocs-button-panel",{icon:settingsIcon,id:"verdocs-settings-panel-".concat(this.field.name)},h("h6",null,"Field Settings"),h("verdocs-template-field-properties",{templateId:state.templateId,fieldName:this.field.name,onClose:function(){return e.hideSettingsPanel()},onDelete:function(){var t;(t=e.deleted)===null||t===void 0?void 0:t.emit({fieldName:e.field.name});return e.hideSettingsPanel()},onSettingsChanged:function(t){var i;(i=e.settingsChanged)===null||i===void 0?void 0:i.emit(t.detail);return e.hideSettingsPanel()}})))};return e}();VerdocsFieldInitial.style=verdocsFieldInitialCss;export{VerdocsFieldInitial as verdocs_field_initial};
@@ -1 +1 @@
1
- var __awaiter=this&&this.__awaiter||function(e,t,i,n){function o(e){return e instanceof i?e:new i((function(t){t(e)}))}return new(i||(i=Promise))((function(i,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n["throw"](e))}catch(e){r(e)}}function l(e){e.done?i(e.value):o(e.value).then(s,a)}l((n=n.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var i={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},n,o,r,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(e){return function(t){return l([e,t])}}function l(s){if(n)throw new TypeError("Generator is already executing.");while(i)try{if(n=1,o&&(r=s[0]&2?o["return"]:s[0]?o["throw"]||((r=o["return"])&&r.call(o),0):o.next)&&!(r=r.call(o,s[1])).done)return r;if(o=0,r)s=[s[0]&2,r.value];switch(s[0]){case 0:case 1:r=s;break;case 4:i.label++;return{value:s[1],done:false};case 5:i.label++;o=s[1];s=[0];continue;case 7:s=i.ops.pop();i.trys.pop();continue;default:if(!(r=i.trys,r=r.length>0&&r[r.length-1])&&(s[0]===6||s[0]===2)){i=0;continue}if(s[0]===3&&(!r||s[1]>r[0]&&s[1]<r[3])){i.label=s[1];break}if(s[0]===6&&i.label<r[1]){i.label=r[1];r=s;break}if(r&&i.label<r[2]){i.label=r[2];i.ops.push(s);break}if(r[2])i.ops.pop();i.trys.pop();continue}s=t.call(e,i)}catch(e){s=[6,e];o=0}finally{n=r=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};import{r as registerInstance,c as createEvent,h,H as Host}from"./index-e64d45e2.js";import{g as getRGBA}from"./Colors-1b298092.js";import{g as getFieldSettings}from"./utils-e9a6b9e4.js";import{s as state}from"./templateStore-5cb73464.js";import"./Envelopes-eb3eef02.js";import"./Token-54690789.js";import"./Files-70a192df.js";import"./index-d264c496.js";import"./index-24fd1580.js";import"./Primitives-054bc6e5.js";var verdocsFieldSignatureCss='verdocs-field-signature{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;width:83px;height:36px;display:block;font-size:11px;position:relative;letter-spacing:0.3px;background-color:transparent;-webkit-transform-origin:bottom left;transform-origin:bottom left;border:1px solid rgba(0, 0, 0, 0.2)}verdocs-field-signature.disabled{opacity:0.5}verdocs-field-signature.done{border:none;opacity:1}verdocs-field-signature img{display:block;max-width:100%;max-height:100%}verdocs-field-signature button{-webkit-box-sizing:border-box;box-sizing:border-box;border:none;color:rgba(0, 0, 0, 0.87);font-weight:500;-webkit-transform-origin:0 0;transform-origin:0 0;height:100%;width:100%;background:none;font-size:11px}verdocs-field-signature button.hide{display:none}verdocs-field-signature.required{border:1px solid #cc0000}verdocs-field-signature.focused{-webkit-animation:verdocs-field-pulse 0.75s 2;animation:verdocs-field-pulse 0.75s 2}verdocs-field-signature verdocs-button-panel{top:-3px;left:-2px;opacity:0.5;z-index:1000;cursor:pointer;position:absolute;-webkit-transform:scale(0.6);transform:scale(0.6)}verdocs-field-signature verdocs-button-panel[data-active],verdocs-field-signature verdocs-button-panel:hover{opacity:1}verdocs-field-signature verdocs-button-panel .icon svg{fill:#333333}verdocs-field-signature verdocs-button-panel .icon:hover svg{fill:#000000}';var settingsIcon='<svg xmlns="http://www.w3.org/2000/svg" height="20" width="20"><path d="m7.5 18.5-.312-2.667q-.188-.125-.396-.25-.209-.125-.396-.229l-2.479 1.063-2.521-4.334 2.125-1.625q.021-.104.021-.229v-.458q0-.125-.021-.229L1.396 7.917l2.521-4.313 2.5 1.042q.166-.104.375-.229.208-.125.396-.229L7.5 1.5h5l.312 2.688q.188.104.396.229.209.125.396.229l2.479-1.042 2.521 4.313-2.125 1.625v.916l2.125 1.625-2.521 4.334-2.5-1.063q-.166.104-.375.229-.208.125-.396.25L12.5 18.5Zm2.479-5.521q1.229 0 2.104-.875T12.958 10q0-1.229-.875-2.104t-2.104-.875q-1.208 0-2.094.875Q7 8.771 7 10t.885 2.104q.886.875 2.094.875Zm0-1.75q-.5 0-.864-.364Q8.75 10.5 8.75 10t.365-.865q.364-.364.864-.364t.865.364q.364.365.364.865t-.364.865q-.365.364-.865.364ZM10.021 10Zm-.792 6.521h1.542l.25-2.146q.625-.167 1.198-.51.573-.344 1.031-.823l2.021.854.771-1.271-1.771-1.354q.104-.292.156-.615.052-.323.052-.656 0-.292-.052-.604-.052-.313-.135-.646l1.77-1.375-.77-1.271-2.021.875q-.479-.5-1.042-.833-.562-.334-1.187-.5l-.271-2.167H9.208l-.25 2.167q-.625.166-1.187.5-.563.333-1.042.812l-2-.854-.771 1.271 1.73 1.354q-.084.333-.136.656Q5.5 9.708 5.5 10t.052.604q.052.313.136.667l-1.73 1.354.771 1.271 2-.834q.479.459 1.042.792.562.334 1.187.5Z"/></svg>';var VerdocsFieldSignature=function(){function e(e){registerInstance(this,e);this.fieldChange=createEvent(this,"fieldChange",7);this.settingsPress=createEvent(this,"settingsPress",7);this.settingsChanged=createEvent(this,"settingsChanged",7);this.deleted=createEvent(this,"deleted",7);this.field=null;this.name="";this.disabled=false;this.editable=false;this.moveable=false;this.done=false;this.roleindex=0;this.tempSignature=""}e.prototype.focusField=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.handleShow();console.log("focused",this);return[2]}))}))};e.prototype.hideDialog=function(){var e;(e=this.dialog)===null||e===void 0?void 0:e.remove();this.dialog=null};e.prototype.handleAdopt=function(e){var t;console.log("[SIGNATURE] Adopted signature");this.tempSignature=e.detail;(t=this.fieldChange)===null||t===void 0?void 0:t.emit(this.tempSignature);this.hideDialog()};e.prototype.handleShow=function(){var e=this;this.dialog=document.createElement("verdocs-signature-dialog");this.dialog.setAttribute("name",this.name);this.dialog.setAttribute("roleindex",this.roleindex);this.dialog.addEventListener("cancel",(function(){return e.hideDialog()}));this.dialog.addEventListener("next",(function(t){return e.handleAdopt(t)}));document.body.append(this.dialog)};e.prototype.showSettingsPanel=function(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(t){e=document.getElementById("verdocs-settings-panel-".concat(this.field.name));if(e&&e.showPanel){e.showPanel()}return[2]}))}))};e.prototype.hideSettingsPanel=function(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(t){e=document.getElementById("verdocs-settings-panel-".concat(this.field.name));if(e&&e.hidePanel){e.hidePanel()}state.updateCount++;return[2]}))}))};e.prototype.render=function(){var e=this;var t,i,n;var o=getFieldSettings(this.field);var r=o.base64||this.tempSignature;var s=(i=(t=this.disabled)!==null&&t!==void 0?t:o.disabled)!==null&&i!==void 0?i:false;var a=this.field["rgba"]||getRGBA(this.roleindex);if(this.done){return h(Host,{class:{done:this.done}},r&&h("img",{src:r,alt:"Signature"}))}return h(Host,{class:{required:(n=this.field)===null||n===void 0?void 0:n.required,disabled:s},style:{backgroundColor:a}},r?h("img",{src:r,alt:"Signature"}):h("button",{onClick:function(){return!s&&e.handleShow()}},"Signature"),this.editable&&h("verdocs-button-panel",{icon:settingsIcon,id:"verdocs-settings-panel-".concat(this.field.name)},h("h6",null,"Field Settings"),h("verdocs-template-field-properties",{templateId:state.templateId,fieldName:this.field.name,onClose:function(){return e.hideSettingsPanel()},onDelete:function(){var t;(t=e.deleted)===null||t===void 0?void 0:t.emit({fieldName:e.field.name});return e.hideSettingsPanel()},onSettingsChanged:function(t){var i;(i=e.settingsChanged)===null||i===void 0?void 0:i.emit(t.detail);return e.hideSettingsPanel()}})))};return e}();VerdocsFieldSignature.style=verdocsFieldSignatureCss;export{VerdocsFieldSignature as verdocs_field_signature};
1
+ var __awaiter=this&&this.__awaiter||function(e,t,i,n){function o(e){return e instanceof i?e:new i((function(t){t(e)}))}return new(i||(i=Promise))((function(i,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n["throw"](e))}catch(e){r(e)}}function l(e){e.done?i(e.value):o(e.value).then(s,a)}l((n=n.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var i={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},n,o,r,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(e){return function(t){return l([e,t])}}function l(s){if(n)throw new TypeError("Generator is already executing.");while(i)try{if(n=1,o&&(r=s[0]&2?o["return"]:s[0]?o["throw"]||((r=o["return"])&&r.call(o),0):o.next)&&!(r=r.call(o,s[1])).done)return r;if(o=0,r)s=[s[0]&2,r.value];switch(s[0]){case 0:case 1:r=s;break;case 4:i.label++;return{value:s[1],done:false};case 5:i.label++;o=s[1];s=[0];continue;case 7:s=i.ops.pop();i.trys.pop();continue;default:if(!(r=i.trys,r=r.length>0&&r[r.length-1])&&(s[0]===6||s[0]===2)){i=0;continue}if(s[0]===3&&(!r||s[1]>r[0]&&s[1]<r[3])){i.label=s[1];break}if(s[0]===6&&i.label<r[1]){i.label=r[1];r=s;break}if(r&&i.label<r[2]){i.label=r[2];i.ops.push(s);break}if(r[2])i.ops.pop();i.trys.pop();continue}s=t.call(e,i)}catch(e){s=[6,e];o=0}finally{n=r=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};import{r as registerInstance,c as createEvent,h,H as Host}from"./index-e64d45e2.js";import{g as getRGBA}from"./Colors-1b298092.js";import{g as getFieldSettings}from"./utils-e9a6b9e4.js";import{s as state}from"./templateStore-5cb73464.js";import"./Envelopes-eb3eef02.js";import"./Token-54690789.js";import"./Files-70a192df.js";import"./index-d264c496.js";import"./index-24fd1580.js";import"./Primitives-054bc6e5.js";var verdocsFieldSignatureCss='verdocs-field-signature{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;width:83px;height:36px;display:block;font-size:11px;position:relative;letter-spacing:0.3px;background-color:transparent;-webkit-transform-origin:bottom left;transform-origin:bottom left;border:1px solid rgba(0, 0, 0, 0.2)}verdocs-field-signature.disabled{opacity:0.5}verdocs-field-signature.done{border:none;opacity:1}verdocs-field-signature img{display:block;max-width:100%;max-height:100%}verdocs-field-signature button{-webkit-box-sizing:border-box;box-sizing:border-box;border:none;color:rgba(0, 0, 0, 0.87);font-weight:500;-webkit-transform-origin:0 0;transform-origin:0 0;height:100%;width:100%;background:none;font-size:11px}verdocs-field-signature button.hide{display:none}verdocs-field-signature.required{border:1px solid #cc0000}verdocs-field-signature.focused{-webkit-animation:verdocs-field-pulse 0.75s 2;animation:verdocs-field-pulse 0.75s 2}verdocs-field-signature verdocs-button-panel{top:-3px;left:-2px;opacity:0.5;z-index:1000;cursor:pointer;position:absolute;-webkit-transform:scale(0.6);transform:scale(0.6)}verdocs-field-signature verdocs-button-panel[data-active],verdocs-field-signature verdocs-button-panel:hover{opacity:1}verdocs-field-signature verdocs-button-panel .icon svg{fill:#333333}verdocs-field-signature verdocs-button-panel .icon:hover svg{fill:#000000}';var settingsIcon='<svg xmlns="http://www.w3.org/2000/svg" height="20" width="20"><path d="m7.5 18.5-.312-2.667q-.188-.125-.396-.25-.209-.125-.396-.229l-2.479 1.063-2.521-4.334 2.125-1.625q.021-.104.021-.229v-.458q0-.125-.021-.229L1.396 7.917l2.521-4.313 2.5 1.042q.166-.104.375-.229.208-.125.396-.229L7.5 1.5h5l.312 2.688q.188.104.396.229.209.125.396.229l2.479-1.042 2.521 4.313-2.125 1.625v.916l2.125 1.625-2.521 4.334-2.5-1.063q-.166.104-.375.229-.208.125-.396.25L12.5 18.5Zm2.479-5.521q1.229 0 2.104-.875T12.958 10q0-1.229-.875-2.104t-2.104-.875q-1.208 0-2.094.875Q7 8.771 7 10t.885 2.104q.886.875 2.094.875Zm0-1.75q-.5 0-.864-.364Q8.75 10.5 8.75 10t.365-.865q.364-.364.864-.364t.865.364q.364.365.364.865t-.364.865q-.365.364-.865.364ZM10.021 10Zm-.792 6.521h1.542l.25-2.146q.625-.167 1.198-.51.573-.344 1.031-.823l2.021.854.771-1.271-1.771-1.354q.104-.292.156-.615.052-.323.052-.656 0-.292-.052-.604-.052-.313-.135-.646l1.77-1.375-.77-1.271-2.021.875q-.479-.5-1.042-.833-.562-.334-1.187-.5l-.271-2.167H9.208l-.25 2.167q-.625.166-1.187.5-.563.333-1.042.812l-2-.854-.771 1.271 1.73 1.354q-.084.333-.136.656Q5.5 9.708 5.5 10t.052.604q.052.313.136.667l-1.73 1.354.771 1.271 2-.834q.479.459 1.042.792.562.334 1.187.5Z"/></svg>';var VerdocsFieldSignature=function(){function e(e){registerInstance(this,e);this.fieldChange=createEvent(this,"fieldChange",7);this.settingsPress=createEvent(this,"settingsPress",7);this.settingsChanged=createEvent(this,"settingsChanged",7);this.deleted=createEvent(this,"deleted",7);this.field=null;this.name="";this.disabled=false;this.editable=false;this.moveable=false;this.done=false;this.roleindex=0;this.tempSignature=""}e.prototype.focusField=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.handleShow();console.log("focused",this);return[2]}))}))};e.prototype.hideDialog=function(){var e;(e=this.dialog)===null||e===void 0?void 0:e.remove();this.dialog=null};e.prototype.handleAdopt=function(e){var t;console.log("[SIGNATURE] Adopted signature");this.tempSignature=e.detail;(t=this.fieldChange)===null||t===void 0?void 0:t.emit(this.tempSignature);this.hideDialog()};e.prototype.handleShow=function(){var e=this;this.dialog=document.createElement("verdocs-signature-dialog");this.dialog.setAttribute("name",this.name);this.dialog.setAttribute("roleindex",this.roleindex);this.dialog.addEventListener("exit",(function(){return e.hideDialog()}));this.dialog.addEventListener("next",(function(t){return e.handleAdopt(t)}));document.body.append(this.dialog)};e.prototype.showSettingsPanel=function(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(t){e=document.getElementById("verdocs-settings-panel-".concat(this.field.name));if(e&&e.showPanel){e.showPanel()}return[2]}))}))};e.prototype.hideSettingsPanel=function(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(t){e=document.getElementById("verdocs-settings-panel-".concat(this.field.name));if(e&&e.hidePanel){e.hidePanel()}state.updateCount++;return[2]}))}))};e.prototype.render=function(){var e=this;var t,i,n;var o=getFieldSettings(this.field);var r=o.base64||this.tempSignature;var s=(i=(t=this.disabled)!==null&&t!==void 0?t:o.disabled)!==null&&i!==void 0?i:false;var a=this.field["rgba"]||getRGBA(this.roleindex);if(this.done){return h(Host,{class:{done:this.done}},r&&h("img",{src:r,alt:"Signature"}))}return h(Host,{class:{required:(n=this.field)===null||n===void 0?void 0:n.required,disabled:s},style:{backgroundColor:a}},r?h("img",{src:r,alt:"Signature"}):h("button",{onClick:function(){return!s&&e.handleShow()}},"Signature"),this.editable&&h("verdocs-button-panel",{icon:settingsIcon,id:"verdocs-settings-panel-".concat(this.field.name)},h("h6",null,"Field Settings"),h("verdocs-template-field-properties",{templateId:state.templateId,fieldName:this.field.name,onClose:function(){return e.hideSettingsPanel()},onDelete:function(){var t;(t=e.deleted)===null||t===void 0?void 0:t.emit({fieldName:e.field.name});return e.hideSettingsPanel()},onSettingsChanged:function(t){var i;(i=e.settingsChanged)===null||i===void 0?void 0:i.emit(t.detail);return e.hideSettingsPanel()}})))};return e}();VerdocsFieldSignature.style=verdocsFieldSignatureCss;export{VerdocsFieldSignature as verdocs_field_signature};