@hubsync/esign-web-sdk 6.5.10 → 6.5.12

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 (126) hide show
  1. package/dist/cjs/loader.cjs.js +1 -1
  2. package/dist/cjs/verdocs-field-attachment_11.cjs.entry.js +10 -10
  3. package/dist/cjs/verdocs-field-payment.cjs.entry.js +1 -1
  4. package/dist/cjs/verdocs-field-payment.entry.cjs.js.map +1 -1
  5. package/dist/cjs/verdocs-sign.cjs.entry.js +11 -0
  6. package/dist/cjs/verdocs-sign.entry.cjs.js.map +1 -1
  7. package/dist/cjs/verdocs-web-sdk.cjs.js +1 -1
  8. package/dist/collection/components/embeds/verdocs-sign/verdocs-sign.js +31 -0
  9. package/dist/collection/components/embeds/verdocs-sign/verdocs-sign.js.map +1 -1
  10. package/dist/collection/components/fields/verdocs-field-attachment/verdocs-field-attachment.css +6 -6
  11. package/dist/collection/components/fields/verdocs-field-checkbox/verdocs-field-checkbox.css +9 -6
  12. package/dist/collection/components/fields/verdocs-field-date/verdocs-field-date.css +11 -0
  13. package/dist/collection/components/fields/verdocs-field-dropdown/verdocs-field-dropdown.css +6 -6
  14. package/dist/collection/components/fields/verdocs-field-initial/verdocs-field-initial.css +6 -6
  15. package/dist/collection/components/fields/verdocs-field-payment/verdocs-field-payment.css +6 -6
  16. package/dist/collection/components/fields/verdocs-field-radio/verdocs-field-radio.css +9 -6
  17. package/dist/collection/components/fields/verdocs-field-signature/verdocs-field-signature.css +6 -6
  18. package/dist/collection/components/fields/verdocs-field-textarea/verdocs-field-textarea.css +6 -6
  19. package/dist/collection/components/fields/verdocs-field-textbox/verdocs-field-textbox.css +6 -6
  20. package/dist/collection/components/fields/verdocs-field-timestamp/verdocs-field-timestamp.css +12 -0
  21. package/dist/components/{p-DqoBcfqq.js → p-8jKCYn3R.js} +3 -3
  22. package/dist/components/p-8jKCYn3R.js.map +1 -0
  23. package/dist/components/{p-Dz20noaY.js → p-B2SBl93W.js} +12 -12
  24. package/dist/components/{p-Dz20noaY.js.map → p-B2SBl93W.js.map} +1 -1
  25. package/dist/components/{p-DGVgIkrO.js → p-BMyljYq7.js} +3 -3
  26. package/dist/components/p-BMyljYq7.js.map +1 -0
  27. package/dist/components/{p-5G9qfsgg.js → p-BPjGK9sw.js} +3 -3
  28. package/dist/components/p-BPjGK9sw.js.map +1 -0
  29. package/dist/components/{p-Y0OyTFqS.js → p-CIHZgqAi.js} +3 -3
  30. package/dist/components/p-CIHZgqAi.js.map +1 -0
  31. package/dist/components/{p-C3q4mHaq.js → p-CPICiOIr.js} +3 -3
  32. package/dist/components/p-CPICiOIr.js.map +1 -0
  33. package/dist/components/p-CRklYgtI.js +219 -0
  34. package/dist/components/p-CRklYgtI.js.map +1 -0
  35. package/dist/components/{p-1MIt5Mm9.js → p-CZf0Zvin.js} +13 -13
  36. package/dist/components/{p-1MIt5Mm9.js.map → p-CZf0Zvin.js.map} +1 -1
  37. package/dist/components/{p-UPW-U544.js → p-DCxaHidf.js} +3 -3
  38. package/dist/components/p-DCxaHidf.js.map +1 -0
  39. package/dist/components/{p-D3-Ing_B.js → p-DPSyw_A2.js} +13 -13
  40. package/dist/components/{p-D3-Ing_B.js.map → p-DPSyw_A2.js.map} +1 -1
  41. package/dist/components/{p-BvPd1sPA.js → p-DjY5uZW4.js} +3 -3
  42. package/dist/components/p-DjY5uZW4.js.map +1 -0
  43. package/dist/components/{p-DzWIeBDx.js → p-M6mFqtZi.js} +3 -3
  44. package/dist/components/p-M6mFqtZi.js.map +1 -0
  45. package/dist/components/{p-B06G5G5z.js → p-zrsP4O_G.js} +3 -3
  46. package/dist/components/p-zrsP4O_G.js.map +1 -0
  47. package/dist/components/verdocs-build.js +13 -13
  48. package/dist/components/verdocs-field-attachment.js +1 -1
  49. package/dist/components/verdocs-field-checkbox.js +1 -1
  50. package/dist/components/verdocs-field-date.js +1 -1
  51. package/dist/components/verdocs-field-dropdown.js +1 -1
  52. package/dist/components/verdocs-field-initial.js +1 -1
  53. package/dist/components/verdocs-field-payment.js +1 -1
  54. package/dist/components/verdocs-field-payment.js.map +1 -1
  55. package/dist/components/verdocs-field-radio.js +1 -1
  56. package/dist/components/verdocs-field-signature.js +1 -1
  57. package/dist/components/verdocs-field-textarea.js +1 -1
  58. package/dist/components/verdocs-field-textbox.js +1 -1
  59. package/dist/components/verdocs-field-timestamp.js +1 -1
  60. package/dist/components/verdocs-preview.js +1 -1
  61. package/dist/components/verdocs-sign.js +12 -0
  62. package/dist/components/verdocs-sign.js.map +1 -1
  63. package/dist/components/verdocs-template-document-page.js +1 -1
  64. package/dist/components/verdocs-template-fields.js +1 -1
  65. package/dist/custom-elements.json +4 -0
  66. package/dist/esm/loader.js +1 -1
  67. package/dist/esm/verdocs-field-attachment_11.entry.js +10 -10
  68. package/dist/esm/verdocs-field-payment.entry.js +1 -1
  69. package/dist/esm/verdocs-field-payment.entry.js.map +1 -1
  70. package/dist/esm/verdocs-sign.entry.js +11 -0
  71. package/dist/esm/verdocs-sign.entry.js.map +1 -1
  72. package/dist/esm/verdocs-web-sdk.js +1 -1
  73. package/dist/esm-es5/loader.js +1 -1
  74. package/dist/esm-es5/verdocs-field-attachment_11.entry.js +1 -1
  75. package/dist/esm-es5/verdocs-field-attachment_11.entry.js.map +1 -1
  76. package/dist/esm-es5/verdocs-field-payment.entry.js +1 -1
  77. package/dist/esm-es5/verdocs-field-payment.entry.js.map +1 -1
  78. package/dist/esm-es5/verdocs-sign.entry.js +1 -1
  79. package/dist/esm-es5/verdocs-sign.entry.js.map +1 -1
  80. package/dist/esm-es5/verdocs-web-sdk.js +1 -1
  81. package/dist/globals.css +0 -34
  82. package/dist/types/components/embeds/verdocs-sign/verdocs-sign.d.ts +5 -0
  83. package/dist/types/components.d.ts +10 -0
  84. package/dist/verdocs-web-sdk/p-0c44babf.entry.js +2 -0
  85. package/dist/verdocs-web-sdk/{p-7a2be757.entry.js.map → p-0c44babf.entry.js.map} +1 -1
  86. package/dist/verdocs-web-sdk/p-12b52a41.system.entry.js +2 -0
  87. package/dist/verdocs-web-sdk/{p-7389986e.system.entry.js.map → p-12b52a41.system.entry.js.map} +1 -1
  88. package/dist/verdocs-web-sdk/p-25b78718.entry.js +2 -0
  89. package/dist/verdocs-web-sdk/p-25b78718.entry.js.map +1 -0
  90. package/dist/verdocs-web-sdk/p-5c23d14c.system.entry.js +2 -0
  91. package/dist/verdocs-web-sdk/{p-c3bb84d8.system.entry.js.map → p-5c23d14c.system.entry.js.map} +1 -1
  92. package/dist/verdocs-web-sdk/p-90fcf375.system.entry.js +2 -0
  93. package/dist/verdocs-web-sdk/p-90fcf375.system.entry.js.map +1 -0
  94. package/dist/verdocs-web-sdk/p-B8zpaHu-.system.js +1 -1
  95. package/dist/verdocs-web-sdk/p-DCmU8D0L.system.js.map +1 -0
  96. package/dist/verdocs-web-sdk/p-DN3bkUUK.system.js.map +1 -0
  97. package/dist/verdocs-web-sdk/p-_TAvrUHE.system.js.map +1 -0
  98. package/dist/verdocs-web-sdk/p-c07b3b07.entry.js +2 -0
  99. package/dist/verdocs-web-sdk/{p-d478a7ca.entry.js.map → p-c07b3b07.entry.js.map} +1 -1
  100. package/dist/verdocs-web-sdk/verdocs-field-payment.entry.esm.js.map +1 -1
  101. package/dist/verdocs-web-sdk/verdocs-sign.entry.esm.js.map +1 -1
  102. package/dist/verdocs-web-sdk/verdocs-web-sdk.css +1 -31
  103. package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +1 -1
  104. package/package.json +2 -2
  105. package/dist/components/p-5G9qfsgg.js.map +0 -1
  106. package/dist/components/p-B06G5G5z.js.map +0 -1
  107. package/dist/components/p-BvPd1sPA.js.map +0 -1
  108. package/dist/components/p-C3q4mHaq.js.map +0 -1
  109. package/dist/components/p-CwQbtCPx.js +0 -219
  110. package/dist/components/p-CwQbtCPx.js.map +0 -1
  111. package/dist/components/p-DGVgIkrO.js.map +0 -1
  112. package/dist/components/p-DqoBcfqq.js.map +0 -1
  113. package/dist/components/p-DzWIeBDx.js.map +0 -1
  114. package/dist/components/p-UPW-U544.js.map +0 -1
  115. package/dist/components/p-Y0OyTFqS.js.map +0 -1
  116. package/dist/verdocs-web-sdk/p-7389986e.system.entry.js +0 -2
  117. package/dist/verdocs-web-sdk/p-7a2be757.entry.js +0 -2
  118. package/dist/verdocs-web-sdk/p-9d724511.system.entry.js +0 -2
  119. package/dist/verdocs-web-sdk/p-9d724511.system.entry.js.map +0 -1
  120. package/dist/verdocs-web-sdk/p-Bcp-PA2y.system.js.map +0 -1
  121. package/dist/verdocs-web-sdk/p-Bzd59d_Y.system.js.map +0 -1
  122. package/dist/verdocs-web-sdk/p-CZvsfJja.system.js.map +0 -1
  123. package/dist/verdocs-web-sdk/p-c3bb84d8.system.entry.js +0 -2
  124. package/dist/verdocs-web-sdk/p-d478a7ca.entry.js +0 -2
  125. package/dist/verdocs-web-sdk/p-ffb92531.entry.js +0 -2
  126. package/dist/verdocs-web-sdk/p-ffb92531.entry.js.map +0 -1
@@ -23,6 +23,9 @@ verdocs-field-attachment {
23
23
  }
24
24
  verdocs-field-attachment.focused {
25
25
  animation: verdocs-field-pulse 0.4s 1;
26
+ box-shadow: inset 0 0 0 2px var(--verdocs-primary-color, #0065ff);
27
+ border-radius: 4px;
28
+ transition: box-shadow 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
26
29
  }
27
30
  verdocs-field-attachment label {
28
31
  top: -14px;
@@ -92,14 +95,11 @@ verdocs-field-attachment .settings-icon:hover {
92
95
  opacity: 1;
93
96
  }
94
97
 
95
- @keyframes verdocs-field-pulse {
98
+ @keyframes verdocs-field-pulse-blue {
96
99
  0% {
97
- background-color: rgba(0, 0, 0, 0.35);
98
- }
99
- 50% {
100
- background-color: rgba(0, 0, 0, 0);
100
+ box-shadow: 0 0 0 3px #0065ff, 0 0 0 5px rgba(0, 101, 255, 0.5), 0 0 10px rgba(0, 101, 255, 0.6);
101
101
  }
102
102
  100% {
103
- background-color: rgba(0, 0, 0, 0.35);
103
+ box-shadow: 0 0 0 3px #0065ff, 0 0 0 6px rgba(0, 101, 255, 0.7), 0 0 20px rgba(0, 101, 255, 0.9);
104
104
  }
105
105
  }
@@ -45,6 +45,9 @@ verdocs-field-checkbox.disabled label {
45
45
  }
46
46
  verdocs-field-checkbox.focused {
47
47
  animation: verdocs-field-pulse 0.4s 1;
48
+ box-shadow: inset 0 0 0 2px var(--verdocs-primary-color, #0065ff);
49
+ border-radius: 4px;
50
+ transition: box-shadow 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
48
51
  }
49
52
  verdocs-field-checkbox label > input[type=checkbox] {
50
53
  display: none;
@@ -79,6 +82,9 @@ verdocs-field-checkbox.hide {
79
82
  }
80
83
  verdocs-field-checkbox.focused {
81
84
  animation: verdocs-field-pulse 0.4s 1;
85
+ box-shadow: inset 0 0 0 2px var(--verdocs-primary-color, #0065ff);
86
+ border-radius: 4px;
87
+ transition: box-shadow 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
82
88
  }
83
89
  verdocs-field-checkbox verdocs-button-panel {
84
90
  display: block;
@@ -101,14 +107,11 @@ verdocs-field-checkbox .settings-icon:hover {
101
107
  opacity: 1;
102
108
  }
103
109
 
104
- @keyframes verdocs-field-pulse {
110
+ @keyframes verdocs-field-pulse-blue {
105
111
  0% {
106
- background-color: rgba(0, 0, 0, 0.35);
107
- }
108
- 50% {
109
- background-color: rgba(0, 0, 0, 0);
112
+ box-shadow: 0 0 0 3px #0065ff, 0 0 0 5px rgba(0, 101, 255, 0.5), 0 0 10px rgba(0, 101, 255, 0.6);
110
113
  }
111
114
  100% {
112
- background-color: rgba(0, 0, 0, 0.35);
115
+ box-shadow: 0 0 0 3px #0065ff, 0 0 0 6px rgba(0, 101, 255, 0.7), 0 0 20px rgba(0, 101, 255, 0.9);
113
116
  }
114
117
  }
@@ -23,6 +23,9 @@ verdocs-field-date {
23
23
  }
24
24
  verdocs-field-date.focused {
25
25
  animation: verdocs-field-pulse 0.4s 1;
26
+ box-shadow: inset 0 0 0 2px var(--verdocs-primary-color, #0065ff);
27
+ border-radius: 4px;
28
+ transition: box-shadow 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
26
29
  }
27
30
  verdocs-field-date label {
28
31
  top: -14px;
@@ -926,4 +929,12 @@ verdocs-field-date .settings-icon:hover {
926
929
  100% {
927
930
  background-color: rgba(0, 0, 0, 0.35);
928
931
  }
932
+ }
933
+ @keyframes verdocs-field-pulse-blue {
934
+ 0% {
935
+ box-shadow: 0 0 0 3px #0065ff, 0 0 0 5px rgba(0, 101, 255, 0.5), 0 0 10px rgba(0, 101, 255, 0.6);
936
+ }
937
+ 100% {
938
+ box-shadow: 0 0 0 3px #0065ff, 0 0 0 6px rgba(0, 101, 255, 0.7), 0 0 20px rgba(0, 101, 255, 0.9);
939
+ }
929
940
  }
@@ -67,6 +67,9 @@ verdocs-field-dropdown.required select {
67
67
  }
68
68
  verdocs-field-dropdown.focused {
69
69
  animation: verdocs-field-pulse 0.4s 1;
70
+ box-shadow: inset 0 0 0 2px var(--verdocs-primary-color, #0065ff);
71
+ border-radius: 4px;
72
+ transition: box-shadow 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
70
73
  }
71
74
  verdocs-field-dropdown verdocs-button-panel {
72
75
  display: block;
@@ -89,14 +92,11 @@ verdocs-field-dropdown .settings-icon:hover {
89
92
  opacity: 1;
90
93
  }
91
94
 
92
- @keyframes verdocs-field-pulse {
95
+ @keyframes verdocs-field-pulse-blue {
93
96
  0% {
94
- background-color: rgba(0, 0, 0, 0.35);
95
- }
96
- 50% {
97
- background-color: rgba(0, 0, 0, 0);
97
+ box-shadow: 0 0 0 3px #0065ff, 0 0 0 5px rgba(0, 101, 255, 0.5), 0 0 10px rgba(0, 101, 255, 0.6);
98
98
  }
99
99
  100% {
100
- background-color: rgba(0, 0, 0, 0.35);
100
+ box-shadow: 0 0 0 3px #0065ff, 0 0 0 6px rgba(0, 101, 255, 0.7), 0 0 20px rgba(0, 101, 255, 0.9);
101
101
  }
102
102
  }
@@ -120,6 +120,9 @@ verdocs-field-initial.required {
120
120
  }
121
121
  verdocs-field-initial.focused {
122
122
  animation: verdocs-field-pulse 0.4s 1;
123
+ box-shadow: inset 0 0 0 2px var(--verdocs-primary-color, #0065ff);
124
+ border-radius: 4px;
125
+ transition: box-shadow 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
123
126
  }
124
127
  verdocs-field-initial.filled {
125
128
  border: none !important;
@@ -189,14 +192,11 @@ verdocs-field-initial .edge-bottom {
189
192
  height: 5px;
190
193
  }
191
194
 
192
- @keyframes verdocs-field-pulse {
195
+ @keyframes verdocs-field-pulse-blue {
193
196
  0% {
194
- background-color: rgba(0, 0, 0, 0.35);
195
- }
196
- 50% {
197
- background-color: rgba(0, 0, 0, 0);
197
+ box-shadow: 0 0 0 3px #0065ff, 0 0 0 5px rgba(0, 101, 255, 0.5), 0 0 10px rgba(0, 101, 255, 0.6);
198
198
  }
199
199
  100% {
200
- background-color: rgba(0, 0, 0, 0.35);
200
+ box-shadow: 0 0 0 3px #0065ff, 0 0 0 6px rgba(0, 101, 255, 0.7), 0 0 20px rgba(0, 101, 255, 0.9);
201
201
  }
202
202
  }
@@ -66,6 +66,9 @@ verdocs-field-payment .frame img {
66
66
  }
67
67
  verdocs-field-payment.focused {
68
68
  animation: verdocs-field-pulse 0.4s 1;
69
+ box-shadow: inset 0 0 0 2px var(--verdocs-primary-color, #0065ff);
70
+ border-radius: 4px;
71
+ transition: box-shadow 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
69
72
  }
70
73
  verdocs-field-payment .settings-icon {
71
74
  position: absolute;
@@ -82,14 +85,11 @@ verdocs-field-payment .settings-icon:hover {
82
85
  opacity: 1;
83
86
  }
84
87
 
85
- @keyframes verdocs-field-pulse {
88
+ @keyframes verdocs-field-pulse-blue {
86
89
  0% {
87
- background-color: rgba(0, 0, 0, 0.35);
88
- }
89
- 50% {
90
- background-color: rgba(0, 0, 0, 0);
90
+ box-shadow: 0 0 0 3px #0065ff, 0 0 0 5px rgba(0, 101, 255, 0.5), 0 0 10px rgba(0, 101, 255, 0.6);
91
91
  }
92
92
  100% {
93
- background-color: rgba(0, 0, 0, 0.35);
93
+ box-shadow: 0 0 0 3px #0065ff, 0 0 0 6px rgba(0, 101, 255, 0.7), 0 0 20px rgba(0, 101, 255, 0.9);
94
94
  }
95
95
  }
@@ -22,6 +22,9 @@ verdocs-field-radio {
22
22
  }
23
23
  verdocs-field-radio.focused {
24
24
  animation: verdocs-field-pulse 0.4s 1;
25
+ box-shadow: inset 0 0 0 2px var(--verdocs-primary-color, #0065ff);
26
+ border-radius: 4px;
27
+ transition: box-shadow 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
25
28
  }
26
29
  verdocs-field-radio svg {
27
30
  margin-top: 4px;
@@ -109,6 +112,9 @@ verdocs-field-radio.hide {
109
112
  }
110
113
  verdocs-field-radio.focused {
111
114
  animation: verdocs-field-pulse 0.4s 1;
115
+ box-shadow: inset 0 0 0 2px var(--verdocs-primary-color, #0065ff);
116
+ border-radius: 4px;
117
+ transition: box-shadow 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
112
118
  }
113
119
  verdocs-field-radio verdocs-button-panel {
114
120
  margin-left: -20px;
@@ -130,14 +136,11 @@ verdocs-field-radio .settings-icon:hover {
130
136
  opacity: 1;
131
137
  }
132
138
 
133
- @keyframes verdocs-field-pulse {
139
+ @keyframes verdocs-field-pulse-blue {
134
140
  0% {
135
- background-color: rgba(0, 0, 0, 0.35);
136
- }
137
- 50% {
138
- background-color: rgba(0, 0, 0, 0);
141
+ box-shadow: 0 0 0 3px #0065ff, 0 0 0 5px rgba(0, 101, 255, 0.5), 0 0 10px rgba(0, 101, 255, 0.6);
139
142
  }
140
143
  100% {
141
- background-color: rgba(0, 0, 0, 0.35);
144
+ box-shadow: 0 0 0 3px #0065ff, 0 0 0 6px rgba(0, 101, 255, 0.7), 0 0 20px rgba(0, 101, 255, 0.9);
142
145
  }
143
146
  }
@@ -120,6 +120,9 @@ verdocs-field-signature.required {
120
120
  }
121
121
  verdocs-field-signature.focused {
122
122
  animation: verdocs-field-pulse 0.4s 1;
123
+ box-shadow: inset 0 0 0 2px var(--verdocs-primary-color, #0065ff);
124
+ border-radius: 4px;
125
+ transition: box-shadow 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
123
126
  }
124
127
  verdocs-field-signature.filled {
125
128
  border: none !important;
@@ -189,14 +192,11 @@ verdocs-field-signature .edge-bottom {
189
192
  height: 5px;
190
193
  }
191
194
 
192
- @keyframes verdocs-field-pulse {
195
+ @keyframes verdocs-field-pulse-blue {
193
196
  0% {
194
- background-color: rgba(0, 0, 0, 0.35);
195
- }
196
- 50% {
197
- background-color: rgba(0, 0, 0, 0);
197
+ box-shadow: 0 0 0 3px #0065ff, 0 0 0 5px rgba(0, 101, 255, 0.5), 0 0 10px rgba(0, 101, 255, 0.6);
198
198
  }
199
199
  100% {
200
- background-color: rgba(0, 0, 0, 0.35);
200
+ box-shadow: 0 0 0 3px #0065ff, 0 0 0 6px rgba(0, 101, 255, 0.7), 0 0 20px rgba(0, 101, 255, 0.9);
201
201
  }
202
202
  }
@@ -62,6 +62,9 @@ verdocs-field-textarea.required.required {
62
62
  }
63
63
  verdocs-field-textarea.focused {
64
64
  animation: verdocs-field-pulse 0.4s 1;
65
+ box-shadow: inset 0 0 0 2px var(--verdocs-primary-color, #0065ff);
66
+ border-radius: 4px;
67
+ transition: box-shadow 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
65
68
  }
66
69
  verdocs-field-textarea verdocs-button-panel {
67
70
  top: -3px;
@@ -96,14 +99,11 @@ verdocs-field-textarea .settings-icon:hover {
96
99
  opacity: 1;
97
100
  }
98
101
 
99
- @keyframes verdocs-field-pulse {
102
+ @keyframes verdocs-field-pulse-blue {
100
103
  0% {
101
- background-color: rgba(0, 0, 0, 0.35);
102
- }
103
- 50% {
104
- background-color: rgba(0, 0, 0, 0);
104
+ box-shadow: 0 0 0 3px #0065ff, 0 0 0 5px rgba(0, 101, 255, 0.5), 0 0 10px rgba(0, 101, 255, 0.6);
105
105
  }
106
106
  100% {
107
- background-color: rgba(0, 0, 0, 0.35);
107
+ box-shadow: 0 0 0 3px #0065ff, 0 0 0 6px rgba(0, 101, 255, 0.7), 0 0 20px rgba(0, 101, 255, 0.9);
108
108
  }
109
109
  }
@@ -116,6 +116,9 @@ verdocs-field-textbox.required.required {
116
116
  }
117
117
  verdocs-field-textbox.focused {
118
118
  animation: verdocs-field-pulse 0.4s 1;
119
+ box-shadow: inset 0 0 0 2px var(--verdocs-primary-color, #0065ff);
120
+ border-radius: 4px;
121
+ transition: box-shadow 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
119
122
  }
120
123
  verdocs-field-textbox verdocs-button-panel {
121
124
  top: -3px;
@@ -153,14 +156,11 @@ verdocs-field-textbox .settings-icon:hover {
153
156
  opacity: 1;
154
157
  }
155
158
 
156
- @keyframes verdocs-field-pulse {
159
+ @keyframes verdocs-field-pulse-blue {
157
160
  0% {
158
- background-color: rgba(0, 0, 0, 0.35);
159
- }
160
- 50% {
161
- background-color: rgba(0, 0, 0, 0);
161
+ box-shadow: 0 0 0 3px #0065ff, 0 0 0 5px rgba(0, 101, 255, 0.5), 0 0 10px rgba(0, 101, 255, 0.6);
162
162
  }
163
163
  100% {
164
- background-color: rgba(0, 0, 0, 0.35);
164
+ box-shadow: 0 0 0 3px #0065ff, 0 0 0 6px rgba(0, 101, 255, 0.7), 0 0 20px rgba(0, 101, 255, 0.9);
165
165
  }
166
166
  }
@@ -59,6 +59,9 @@ verdocs-field-timestamp.required {
59
59
  }
60
60
  verdocs-field-timestamp.focused {
61
61
  animation: verdocs-field-pulse 0.4s 1;
62
+ box-shadow: inset 0 0 0 2px var(--verdocs-primary-color, #0065ff);
63
+ border-radius: 4px;
64
+ transition: box-shadow 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
62
65
  }
63
66
  verdocs-field-timestamp verdocs-button-panel {
64
67
  top: -3px;
@@ -91,4 +94,13 @@ verdocs-field-timestamp .settings-icon svg {
91
94
  }
92
95
  verdocs-field-timestamp .settings-icon:hover {
93
96
  opacity: 1;
97
+ }
98
+
99
+ @keyframes verdocs-field-pulse-blue {
100
+ 0% {
101
+ box-shadow: 0 0 0 3px #0065ff, 0 0 0 5px rgba(0, 101, 255, 0.5), 0 0 10px rgba(0, 101, 255, 0.6);
102
+ }
103
+ 100% {
104
+ box-shadow: 0 0 0 3px #0065ff, 0 0 0 6px rgba(0, 101, 255, 0.7), 0 0 20px rgba(0, 101, 255, 0.9);
105
+ }
94
106
  }
@@ -11,7 +11,7 @@ import { d as defineCustomElement$3 } from './p-QDVFg2YR.js';
11
11
  import { d as defineCustomElement$2 } from './p-C4OPC14W.js';
12
12
  import { d as defineCustomElement$1 } from './p-CbtdkfOR.js';
13
13
 
14
- const verdocsFieldDropdownCss = "@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-field-dropdown{font-family:var(--verdocs-primary-font, \"Inter\", \"Barlow\", sans-serif);width:85px;height:20px;display:block;font-size:11px;position:relative;scroll-margin:20px 0;background-color:var(--verdocs-field-background, transparent);-webkit-transform-origin:bottom left;transform-origin:bottom left;border-radius:var(--verdocs-field-radius)}verdocs-field-dropdown label{top:-14px;left:0;height:14px;color:white;padding:0 4px;font-size:9px;line-height:13px;position:absolute;background:#4a4a99;border-top-left-radius:2px;border-top-right-radius:2px}verdocs-field-dropdown select{cursor:inherit;position:absolute;background:linear-gradient(55deg, transparent 50%, var(--verdocs-field-text-color, #333) 50%), linear-gradient(125deg, var(--verdocs-field-text-color, #333) 50%, transparent 50%), linear-gradient(to right, transparent, transparent);background-position:calc(100% - 7px) 6px, calc(100% - 3px) 6px, 100% 0;background-size:5px 5px, 5px 5px, 2.5em 2.5em;background-repeat:no-repeat;-webkit-appearance:none;-moz-appearance:none;appearance:none;-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--verdocs-field-text-color, rgba(0, 0, 0, 0.87));font-weight:500;-webkit-transform-origin:0 0;transform-origin:0 0;height:100%;width:100%;font-size:11px;border:var(--verdocs-field-border, 1px solid rgba(0, 0, 0, 0.2));border-radius:var(--verdocs-field-radius);padding:0 5px}verdocs-field-dropdown select:focus{outline:none}verdocs-field-dropdown select.hide{display:none}verdocs-field-dropdown.disabled select{opacity:0.5}verdocs-field-dropdown.required select{border:1px solid var(--verdocs-required-field-border)}verdocs-field-dropdown.focused{-webkit-animation:verdocs-field-pulse 0.4s 1;animation:verdocs-field-pulse 0.4s 1}verdocs-field-dropdown verdocs-button-panel{display:block;margin-left:-33px;margin-top:-1px;-webkit-transform:scale(0.7);transform:scale(0.7)}verdocs-field-dropdown .settings-icon{position:absolute;top:-2px;left:-20px;display:inline-block;cursor:pointer;opacity:0.3}verdocs-field-dropdown .settings-icon svg{fill:#707ae5}verdocs-field-dropdown .settings-icon:hover{opacity:1}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}";
14
+ const verdocsFieldDropdownCss = "@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-field-dropdown{font-family:var(--verdocs-primary-font, \"Inter\", \"Barlow\", sans-serif);width:85px;height:20px;display:block;font-size:11px;position:relative;scroll-margin:20px 0;background-color:var(--verdocs-field-background, transparent);-webkit-transform-origin:bottom left;transform-origin:bottom left;border-radius:var(--verdocs-field-radius)}verdocs-field-dropdown label{top:-14px;left:0;height:14px;color:white;padding:0 4px;font-size:9px;line-height:13px;position:absolute;background:#4a4a99;border-top-left-radius:2px;border-top-right-radius:2px}verdocs-field-dropdown select{cursor:inherit;position:absolute;background:linear-gradient(55deg, transparent 50%, var(--verdocs-field-text-color, #333) 50%), linear-gradient(125deg, var(--verdocs-field-text-color, #333) 50%, transparent 50%), linear-gradient(to right, transparent, transparent);background-position:calc(100% - 7px) 6px, calc(100% - 3px) 6px, 100% 0;background-size:5px 5px, 5px 5px, 2.5em 2.5em;background-repeat:no-repeat;-webkit-appearance:none;-moz-appearance:none;appearance:none;-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--verdocs-field-text-color, rgba(0, 0, 0, 0.87));font-weight:500;-webkit-transform-origin:0 0;transform-origin:0 0;height:100%;width:100%;font-size:11px;border:var(--verdocs-field-border, 1px solid rgba(0, 0, 0, 0.2));border-radius:var(--verdocs-field-radius);padding:0 5px}verdocs-field-dropdown select:focus{outline:none}verdocs-field-dropdown select.hide{display:none}verdocs-field-dropdown.disabled select{opacity:0.5}verdocs-field-dropdown.required select{border:1px solid var(--verdocs-required-field-border)}verdocs-field-dropdown.focused{-webkit-animation:verdocs-field-pulse 0.4s 1;animation:verdocs-field-pulse 0.4s 1;-webkit-box-shadow:inset 0 0 0 2px var(--verdocs-primary-color, #0065ff);box-shadow:inset 0 0 0 2px var(--verdocs-primary-color, #0065ff);border-radius:4px;-webkit-transition:-webkit-box-shadow 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), -webkit-transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);transition:-webkit-box-shadow 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), -webkit-transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);transition:box-shadow 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);transition:box-shadow 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), -webkit-box-shadow 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), -webkit-transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1)}verdocs-field-dropdown verdocs-button-panel{display:block;margin-left:-33px;margin-top:-1px;-webkit-transform:scale(0.7);transform:scale(0.7)}verdocs-field-dropdown .settings-icon{position:absolute;top:-2px;left:-20px;display:inline-block;cursor:pointer;opacity:0.3}verdocs-field-dropdown .settings-icon svg{fill:#707ae5}verdocs-field-dropdown .settings-icon:hover{opacity:1}@-webkit-keyframes verdocs-field-pulse-blue{0%{-webkit-box-shadow:0 0 0 3px #0065ff, 0 0 0 5px rgba(0, 101, 255, 0.5), 0 0 10px rgba(0, 101, 255, 0.6);box-shadow:0 0 0 3px #0065ff, 0 0 0 5px rgba(0, 101, 255, 0.5), 0 0 10px rgba(0, 101, 255, 0.6)}100%{-webkit-box-shadow:0 0 0 3px #0065ff, 0 0 0 6px rgba(0, 101, 255, 0.7), 0 0 20px rgba(0, 101, 255, 0.9);box-shadow:0 0 0 3px #0065ff, 0 0 0 6px rgba(0, 101, 255, 0.7), 0 0 20px rgba(0, 101, 255, 0.9)}}@keyframes verdocs-field-pulse-blue{0%{-webkit-box-shadow:0 0 0 3px #0065ff, 0 0 0 5px rgba(0, 101, 255, 0.5), 0 0 10px rgba(0, 101, 255, 0.6);box-shadow:0 0 0 3px #0065ff, 0 0 0 5px rgba(0, 101, 255, 0.5), 0 0 10px rgba(0, 101, 255, 0.6)}100%{-webkit-box-shadow:0 0 0 3px #0065ff, 0 0 0 6px rgba(0, 101, 255, 0.7), 0 0 20px rgba(0, 101, 255, 0.9);box-shadow:0 0 0 3px #0065ff, 0 0 0 6px rgba(0, 101, 255, 0.7), 0 0 20px rgba(0, 101, 255, 0.9)}}";
15
15
 
16
16
  const VerdocsFieldDropdown = /*@__PURE__*/ proxyCustomElement(class VerdocsFieldDropdown extends H {
17
17
  constructor(registerHost) {
@@ -207,6 +207,6 @@ function defineCustomElement() {
207
207
  }
208
208
 
209
209
  export { VerdocsFieldDropdown as V, defineCustomElement as d };
210
- //# sourceMappingURL=p-DqoBcfqq.js.map
210
+ //# sourceMappingURL=p-8jKCYn3R.js.map
211
211
 
212
- //# sourceMappingURL=p-DqoBcfqq.js.map
212
+ //# sourceMappingURL=p-8jKCYn3R.js.map
@@ -0,0 +1 @@
1
+ {"file":"p-8jKCYn3R.js","mappings":";;;;;;;;;;;;;AAAA,MAAM,uBAAuB,GAAG,2/HAA2/H;;MCa9gI,oBAAoB,iBAAAA,kBAAA,CAAA,MAAA,oBAAA,SAAAC,CAAA,CAAA;AALjC,IAAA,WAAA,CAAA,YAAA,EAAA;;;;;;;;AAQE;;AAEG;AACoB,QAAA,IAAM,CAAA,MAAA,GAA4B,UAAU;AAEnE;;AAEG;AACoB,QAAA,IAAQ,CAAA,QAAA,GAAW,EAAE;AAE5C;;AAEG;AACoB,QAAA,IAAS,CAAA,SAAA,GAAW,EAAE;AAE7C;;;AAGG;AACK,QAAA,IAAK,CAAA,KAAA,GAAsC,IAAI;AAEvD;;AAEG;AACoB,QAAA,IAAQ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;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement"],"sources":["src/components/fields/verdocs-field-dropdown/verdocs-field-dropdown.scss?tag=verdocs-field-dropdown","src/components/fields/verdocs-field-dropdown/verdocs-field-dropdown.tsx"],"sourcesContent":["@import '../../../theme.scss';\n\nverdocs-field-dropdown {\n font-family: $verdocs-primary-font;\n width: 85px;\n height: 20px;\n display: block;\n font-size: 11px;\n position: relative;\n scroll-margin: 20px 0;\n background-color: var(--verdocs-field-background, transparent);\n transform-origin: bottom left;\n border-radius: var(--verdocs-field-radius);\n\n label {\n top: -14px;\n left: 0;\n height: 14px;\n color: white;\n padding: 0 4px;\n font-size: 9px;\n line-height: 13px;\n position: absolute;\n background: #4a4a99;\n border-top-left-radius: 2px;\n border-top-right-radius: 2px;\n }\n\n select {\n // This is needed to bring down the cursor from the parent element, which is where interactjs applies it\n cursor: inherit;\n\n position: absolute;\n background:\n linear-gradient(55deg, transparent 50%, var(--verdocs-field-text-color, #333) 50%), linear-gradient(125deg, var(--verdocs-field-text-color, #333) 50%, transparent 50%),\n linear-gradient(to right, transparent, transparent);\n background-position:\n calc(100% - 7px) 6px,\n calc(100% - 3px) 6px,\n 100% 0;\n background-size:\n 5px 5px,\n 5px 5px,\n 2.5em 2.5em;\n background-repeat: no-repeat;\n appearance: none;\n\n box-sizing: border-box;\n color: var(--verdocs-field-text-color, rgba(0, 0, 0, 0.87));\n font-weight: 500;\n transform-origin: 0 0;\n height: 100%;\n width: 100%;\n font-size: 11px;\n border: var(--verdocs-field-border, 1px solid rgba(0, 0, 0, 0.2));\n border-radius: var(--verdocs-field-radius);\n padding: 0 5px;\n\n &:focus {\n outline: none;\n }\n\n &.hide {\n display: none;\n }\n }\n\n &.disabled select {\n opacity: 0.5;\n }\n\n &.required {\n select {\n border: 1px solid var(--verdocs-required-field-border);\n }\n }\n\n &.focused {\n animation: verdocs-field-pulse 0.4s 1;\n box-shadow: inset 0 0 0 2px var(--verdocs-primary-color, #0065ff);\n border-radius: 4px;\n transition: box-shadow 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);\n }\n\n verdocs-button-panel {\n display: block;\n margin-left: -33px;\n margin-top: -1px;\n transform: scale(0.7);\n }\n\n .settings-icon {\n position: absolute;\n top: -2px;\n left: -20px;\n display: inline-block;\n cursor: pointer;\n opacity: 0.3;\n\n svg {\n fill: $border-color;\n }\n\n &:hover {\n opacity: 1;\n }\n }\n}\n\n@keyframes verdocs-field-pulse-blue {\n 0% {\n box-shadow:\n 0 0 0 3px #0065ff,\n 0 0 0 5px rgba(0, 101, 255, 0.5),\n 0 0 10px rgba(0, 101, 255, 0.6);\n }\n\n 100% {\n box-shadow:\n 0 0 0 3px #0065ff,\n 0 0 0 6px rgba(0, 101, 255, 0.7),\n 0 0 20px rgba(0, 101, 255, 0.9);\n }\n}","import {ITemplateField, IEnvelopeField} from '@verdocs/js-sdk';\nimport {Component, Event, EventEmitter, h, Host, Method, Prop, Fragment, State} from '@stencil/core';\nimport {SettingsIcon} from '../../../utils/Icons';\nimport {Store} from '../../../utils/Datastore';\n\n/**\n * Displays a dropdown field that allows the user to choose one of a list of options.\n */\n@Component({\n tag: 'verdocs-field-dropdown',\n styleUrl: 'verdocs-field-dropdown.scss',\n shadow: false,\n})\nexport class VerdocsFieldDropdown {\n selectEl: HTMLSelectElement;\n\n /**\n * Fields may be attached to templates or envelopes, but only template fields may be edited.\n */\n @Prop({reflect: true}) source: 'template' | 'envelope' = 'template';\n\n /**\n * The source template or envelope ID the field is found in.\n */\n @Prop({reflect: true}) sourceid: string = '';\n\n /**\n * The name of the field to display.\n */\n @Prop({reflect: true}) fieldname: string = '';\n\n /**\n * Override the field's settings. This is intended to be used during signing when fields are being\n * mutated.\n */\n @Prop() field: IEnvelopeField | null | undefined = null;\n\n /**\n * If set, overrides the field's settings object. Primarily used to support \"preview\" modes where all fields are disabled.\n */\n @Prop({reflect: true}) disabled?: boolean = false;\n\n /**\n * If set, a settings icon will be displayed on hover. The settings shown allow the field's recipient and other settings to be\n * changed, so it should typically only be enabled in the Builder.\n */\n @Prop({reflect: true}) editable?: boolean = false;\n\n /**\n * If set, the field may be dragged to a new location. This should only be enabled in the Builder, or for self-placed fields.\n */\n @Prop({reflect: true}) moveable?: boolean = false;\n\n /**\n * If set, the field is considered \"done\" and is drawn in a display-final-value state.\n */\n @Prop({reflect: true}) done?: boolean = false;\n\n /**\n * If set, the field will be be scaled horizontally by this factor.\n */\n @Prop({reflect: true}) xscale?: number = 1;\n\n /**\n * If set, the field will be be scaled vertically by this factor.\n */\n @Prop({reflect: true}) yscale?: number = 1;\n\n /**\n * The page the field is on\n */\n @Prop({reflect: true}) pagenumber?: number = 1;\n\n /**\n * Event fired when the input field value changes. Note that this will only be fired on blur, tab-out, ENTER key press, etc.\n * It is generally the best event to subscribe to than `input` for most cases EXCEPT autocomplete fields that need to see every\n * keypress.\n */\n @Event({composed: true}) fieldChange: EventEmitter<string>;\n\n /**\n * Event fired when the field's settings are changed.\n */\n @Event({composed: true}) settingsChanged: EventEmitter<{fieldName: string; field: ITemplateField}>;\n\n /**\n * Event fired when the field is deleted.\n */\n @Event({composed: true}) deleted: EventEmitter<{fieldName: string}>;\n\n @State() showingProperties?: boolean = false;\n @State() focused = false;\n\n @Method()\n async focusField() {\n // Our input field is fake, so we fake the flash too\n this.focused = true;\n setTimeout(() => {\n this.focused = false;\n }, 500);\n\n const {source, sourceid, fieldname} = this;\n const {field} = Store.getField(source, sourceid, fieldname, this.field);\n const {readonly = false} = field || {};\n\n if (!readonly) {\n this.selectEl?.showPicker();\n }\n }\n\n handleChange(e: any) {\n this.fieldChange.emit(e.target.value);\n }\n\n @Method()\n async showSettingsPanel() {\n const settingsPanel = document.getElementById(`verdocs-settings-panel-${this.fieldname}`) as any;\n if (settingsPanel && settingsPanel.showPanel) {\n settingsPanel.showPanel();\n }\n }\n\n @Method()\n async hideSettingsPanel() {\n const settingsPanel = document.getElementById(`verdocs-settings-panel-${this.fieldname}`) as any;\n if (settingsPanel && settingsPanel.hidePanel) {\n settingsPanel.hidePanel();\n }\n }\n\n render() {\n const {source, sourceid, fieldname, editable = false, done = false, disabled = false, focused, xscale = 1, yscale = 1} = this;\n\n const {index, field} = Store.getField(source, sourceid, fieldname, this.field);\n let {required = false, value = '', label = '', options, readonly = false} = field || {};\n const signerClass = `signer-${(index % 10) + 1}`;\n\n // TODO: Consolidate value/defaultValue handling between template and envelope fields.\n if ((field as any)?.value) {\n value = (field as any)?.value;\n }\n\n if (done) {\n return <Host class={{done}}>{value}</Host>;\n }\n\n // TODO: Look for other places this mistaken assumption was made.\n // Defaults only apply in destructuring if undefined. null doesn't trigger it.\n options ||= [];\n\n return (\n <Host class={{required, disabled, done, focused, [signerClass]: true}}>\n {label && <label>{label}</label>}\n\n <select disabled={readonly || disabled} onChange={e => this.handleChange(e)} ref={el => (this.selectEl = el as HTMLSelectElement)}>\n <option value=\"\">Select...</option>\n {options.map(option => (\n <option value={option.id} selected={option.id === value}>\n {option.label}\n </option>\n ))}\n {!options.length && (\n <option value=\"NA\" selected={'NA' === value}>\n N/A\n </option>\n )}\n </select>\n\n {editable && (\n <Fragment>\n <div\n id={`verdocs-settings-panel-trigger-${fieldname}`}\n style={{transform: `scale(${Math.floor((1 / xscale) * 1000) / 1000}, ${Math.floor((1 / yscale) * 1000) / 1000})`}}\n class=\"settings-icon\"\n innerHTML={SettingsIcon}\n onClick={(e: any) => {\n e.stopPropagation();\n this.showingProperties = !this.showingProperties;\n }}\n />\n\n {this.showingProperties && (\n <verdocs-portal anchor={`verdocs-settings-panel-trigger-${fieldname}`} onClickAway={() => (this.showingProperties = false)}>\n <verdocs-template-field-properties\n templateId={sourceid}\n fieldName={fieldname}\n onClose={() => (this.showingProperties = false)}\n onDelete={() => {\n this.deleted?.emit({fieldName: fieldname});\n return this.hideSettingsPanel();\n }}\n onSettingsChanged={e => {\n this.settingsChanged?.emit(e.detail);\n return this.hideSettingsPanel();\n }}\n helpText={\"Dropdowns are used to capture a recipient's selection of one of several options.\"}\n />\n </verdocs-portal>\n )}\n </Fragment>\n )}\n </Host>\n );\n }\n}\n"],"version":3}
@@ -6,16 +6,16 @@ import { d as defineCustomElement$n } from './p-CfODrICH.js';
6
6
  import { d as defineCustomElement$m } from './p-mThpW9TM.js';
7
7
  import { d as defineCustomElement$l } from './p-DQ-sUhlC.js';
8
8
  import { d as defineCustomElement$k } from './p-CxLtKV1w.js';
9
- import { d as defineCustomElement$j } from './p-C3q4mHaq.js';
10
- import { d as defineCustomElement$i } from './p-UPW-U544.js';
11
- import { d as defineCustomElement$h } from './p-CwQbtCPx.js';
12
- import { d as defineCustomElement$g } from './p-DqoBcfqq.js';
13
- import { d as defineCustomElement$f } from './p-Y0OyTFqS.js';
14
- import { d as defineCustomElement$e } from './p-BvPd1sPA.js';
15
- import { d as defineCustomElement$d } from './p-5G9qfsgg.js';
16
- import { d as defineCustomElement$c } from './p-DzWIeBDx.js';
17
- import { d as defineCustomElement$b } from './p-B06G5G5z.js';
18
- import { d as defineCustomElement$a } from './p-DGVgIkrO.js';
9
+ import { d as defineCustomElement$j } from './p-CPICiOIr.js';
10
+ import { d as defineCustomElement$i } from './p-DCxaHidf.js';
11
+ import { d as defineCustomElement$h } from './p-CRklYgtI.js';
12
+ import { d as defineCustomElement$g } from './p-8jKCYn3R.js';
13
+ import { d as defineCustomElement$f } from './p-CIHZgqAi.js';
14
+ import { d as defineCustomElement$e } from './p-DjY5uZW4.js';
15
+ import { d as defineCustomElement$d } from './p-BPjGK9sw.js';
16
+ import { d as defineCustomElement$c } from './p-M6mFqtZi.js';
17
+ import { d as defineCustomElement$b } from './p-zrsP4O_G.js';
18
+ import { d as defineCustomElement$a } from './p-BMyljYq7.js';
19
19
  import { d as defineCustomElement$9 } from './p-CHLvWYEx.js';
20
20
  import { d as defineCustomElement$8 } from './p-D9zjm5AL.js';
21
21
  import { d as defineCustomElement$7 } from './p-ypE1cZc7.js';
@@ -383,6 +383,6 @@ function defineCustomElement() {
383
383
  }
384
384
 
385
385
  export { VerdocsTemplateDocumentPage as V, defineCustomElement as d };
386
- //# sourceMappingURL=p-Dz20noaY.js.map
386
+ //# sourceMappingURL=p-B2SBl93W.js.map
387
387
 
388
- //# sourceMappingURL=p-Dz20noaY.js.map
388
+ //# sourceMappingURL=p-B2SBl93W.js.map
@@ -1 +1 @@
1
- {"file":"p-Dz20noaY.js","mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,MAAM,8BAA8B,GAAG,g3BAAg3B;;MCmB14B,2BAA2B,iBAAAA,kBAAA,CAAA,MAAA,2BAAA,SAAAC,CAAA,CAAA;AALxC,IAAA,WAAA,CAAA,YAAA,EAAA;;;;;;AAMU,QAAA,IAAkB,CAAA,kBAAA,GAAG,IAAI;AAKjC;;AAEG;AACK,QAAA,IAAA,CAAA,QAAQ,GAAoB,eAAe,CAAC,UAAU,EAAE;AAEhE;;AAEG;AACK,QAAA,IAAQ,CAAA,QAAA,GAAG,KAAK;AAExB;;AAEG;AACK,QAAA,IAAQ,CAAA,QAAA,GAAG,KAAK;AAExB;;AAEG;AACK,QAAA,IAAI,CAAA,IAAA,GAAG,KAAK;AAEpB;;AAEG;AACK,QAAA,IAAU,CAAA,UAAA,GAAW,EAAE;AAE/B;;AAEG;AACK,QAAA,IAAU,CAAA,UAAA,GAAW,EAAE;AAE/B;;AAEG;AACK,QAAA,IAAU,CAAA,UAAA,GAAW,CAAC;AAE9B;;;AAGG;AACK,QAAA,IAAY,CAAA,YAAA,GAAW,GAAG;AAElC;;;AAGG;AACoB,QAAA,IAAa,CAAA,aAAA,GAAW,GAAG;AAElD;;;;;;;;;;;AAWG;AACK,QAAA,IAAA,CAAA,MAAM,GAAiB,CAAC,EAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAC,CAAC;QAOtD,IAAA,CAAA,WAAW,GAAG,CAAA,sBAAA,EAAyB,IAAI,CAAC,MAAM,EAAE,CAAC,QAAQ,C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C,CACF,IACJ,IAAI,CAAC,cAAc,IACrB,CACE,CAAA,KAAA,EAAA,EAAA,KAAK,EAAC,0CAA0C,EAChD,EAAE,EAAE,CAAG,EAAA,IAAI,CAAC,WAAW,CAAI,CAAA,EAAA,KAAK,CAAC,IAAI,CAAE,CAAA,EACvC,GAAG,EAAE,IAAI,CAAC,cAAc,EACxB,GAAG,EAAE,CAAQ,KAAA,EAAA,IAAI,CAAC,UAAU,CAAE,CAAA,EACjB,aAAA,EAAA,IAAI,EACjB,OAAO,EAAC,MAAM,EACd,MAAM,EAAE,CAAC,CAAM,KAAI;;;;;;;;oBAQjB,IAAI,CAAC,YAAY,GAAG,CAAC,CAAC,MAAM,CAAC,YAAY;oBACzC,IAAI,CAAC,aAAa,GAAG,CAAC,CAAC,MAAM,CAAC,aAAa;oBAC3C,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,aAAa;oBACzD,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,WAAW;AACzD,oBAAA,IAAI,CAAC,cAAc,GAAG,CAAC,CAAC,MAAM,CAAC,WAAW,GAAG,IAAI,CAAC,WAAW;AAC/D,iBAAC,EAAA,CACD,KAEF,CAAA,CAAA,KAAA,EAAA,IAAA,CAAW,CACZ;SAAA,CACF,CACI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement"],"sources":["src/components/templates/verdocs-template-document-page/verdocs-template-document-page.scss?tag=verdocs-template-document-page","src/components/templates/verdocs-template-document-page/verdocs-template-document-page.tsx"],"sourcesContent":["@import '../../../theme.scss';\n\nverdocs-template-document-page {\n width: 100%;\n position: relative;\n\n .verdocs-template-document-page-layer {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n box-shadow: 0 0 10px 5px #0000000f;\n\n &.img {\n width: 100%;\n }\n }\n\n .placeholder {\n opacity: 0.1;\n width: 612px;\n height: 792px;\n box-shadow: 0 0 10px 5px #0000000f;\n }\n}\n","// NOTE: This component does not have a story because it's not intended for external use.\n\nimport {getTemplate, getTemplateDocumentPageDisplayUri, type ITemplate, VerdocsEndpoint} from '@verdocs/js-sdk';\nimport {Component, h, Host, Prop, Event, EventEmitter, State, Element, Fragment} from '@stencil/core';\nimport {IDocumentPageInfo, IPageLayer} from '../../../utils/Types';\nimport {getControlStyles, getFieldId} from '../../../utils/utils';\nimport {throttle} from '../../../utils/utils';\nimport {Store} from '../../../utils/Datastore';\n\n/**\n * Represents one document page. This is primarily a layout container used to coordinate positions of\n * page-related layers such as the page itself, signature fields, etc. It is not intended to be used\n * on its own as an individual component.\n */\n@Component({\n tag: 'verdocs-template-document-page',\n styleUrl: 'verdocs-template-document-page.scss',\n shadow: false,\n})\nexport class VerdocsTemplateDocumentPage {\n private templateListenerId = null;\n private resizeObserver: ResizeObserver;\n\n @Element() container: HTMLElement;\n\n /**\n * The endpoint to load from.\n */\n @Prop() endpoint: VerdocsEndpoint = VerdocsEndpoint.getDefault();\n\n /**\n * Whether the fields should be editable (Builder)\n */\n @Prop() editable = false;\n\n /**\n * Whether the fields should be disabled (Builder)\n */\n @Prop() disabled = false;\n\n /**\n * Whether the field are interactable (done/submitted disables this)\n */\n @Prop() done = false;\n\n /**\n * The ID of the template the document is for.\n */\n @Prop() templateId: string = '';\n\n /**\n * The ID of the document to display.\n */\n @Prop() documentId: string = '';\n\n /**\n * The page number being rendered. (Reminder: page numbers are 1-based.)\n */\n @Prop() pageNumber: number = 1;\n\n /**\n * The \"virtual\" width of the page canvas. Defaults to 612 which at 72dpi is 8.5\" wide. This is used to compute\n * the aspect ratio of the final rendered element when scaling up/down.\n */\n @Prop() virtualWidth: number = 612;\n\n /**\n * The \"virtual\" height of the page canvas. Defaults to 792 which at 72dpi is 11\" tall. This is used to compute\n * the aspect ratio of the final rendered element when scaling up/down.\n */\n @Prop({mutable: true}) virtualHeight: number = 792;\n\n /**\n * The layers that will be rendered. The DOM structure will be a DIV container with one child DIV for each layer.\n * The parent DIV will have a unique ID, and each child DIV will have that ID with the layer name appended, e.g.\n * if `pages` was ['page', 'fields'] the structure will be:\n *\n * ```\n * <div id=\"verdocs-document-page-ker2fr1p9\">\n * <div id=\"verdocs-document-page-ker2fr1p9-page\"></div>\n * <div id=\"verdocs-document-page-ker2fr1p9-fields\"></div>\n * </div>\n * ```\n */\n @Prop() layers: IPageLayer[] = [{name: 'page', type: 'canvas'}];\n\n /**\n * Fired when a page has been rendered. This is also fired when the page is resized.\n */\n @Event() pageRendered: EventEmitter<IDocumentPageInfo>;\n\n @State() containerId = `verdocs-document-page-${Math.random().toString(36).substring(2, 11)}`;\n @State() renderedWidth: number = this.virtualWidth;\n @State() renderedHeight: number = this.virtualHeight;\n @State() naturalWidth: number = this.virtualWidth;\n @State() naturalHeight: number = this.virtualHeight;\n @State() aspectRatio: number = this.virtualWidth / this.virtualHeight;\n @State() skipFirstNotification = true;\n @State() pageDisplayUri = '';\n @State() xScale = 1;\n @State() yScale = 1;\n\n @State() loading = true;\n @State() template: ITemplate | null = null;\n\n async componentWillLoad() {\n this.pageDisplayUri = await getTemplateDocumentPageDisplayUri(this.endpoint, this.documentId, this.pageNumber);\n this.listenToTemplate();\n }\n\n componentDidLoad() {\n this.resizeObserver = new ResizeObserver(\n throttle(entries => {\n for (const entry of entries) {\n const renderedWidth = entry.contentRect.width;\n this.renderedWidth = renderedWidth;\n this.renderedHeight = this.virtualHeight * (renderedWidth / this.virtualWidth);\n }\n\n this.notifyRenderedSize();\n }, 100),\n );\n\n this.resizeObserver.observe(this.container);\n }\n\n componentDidUpdate() {\n // This is fired when fields are updated and triggers the parent to re-attach behaviors like drag-and-drop\n this.notifyRenderedSize();\n }\n\n disconnectedCallback() {\n this.resizeObserver?.disconnect();\n this.unlistenToTemplate();\n }\n\n async listenToTemplate() {\n this.unlistenToTemplate();\n Store.subscribe(\n 'templates',\n this.templateId,\n () => getTemplate(this.endpoint, this.templateId),\n false,\n (template: ITemplate) => {\n this.template = template;\n this.loading = false;\n },\n );\n }\n\n unlistenToTemplate() {\n if (this.templateListenerId) {\n Store.store.delListener(this.templateListenerId);\n this.templateListenerId = null;\n }\n }\n\n notifyRenderedSize() {\n // We skip one notification because by default we will always get at least two, one when rendering the initial size\n // and a second once we're able to compute the scale size, when the resizeObserver sets renderedWidth/renderedHeight.\n if (this.skipFirstNotification) {\n this.skipFirstNotification = false;\n return;\n }\n\n const xScale = this.renderedWidth / this.virtualWidth;\n if (this.xScale !== xScale) {\n this.xScale = xScale;\n }\n\n const yScale = this.renderedHeight / this.virtualHeight;\n if (this.yScale !== yScale) {\n this.yScale = yScale;\n }\n\n this.pageRendered.emit({\n // container: this.container,\n containerId: this.containerId,\n documentId: this.documentId,\n pageNumber: this.pageNumber,\n virtualWidth: this.virtualWidth,\n virtualHeight: this.virtualHeight,\n renderedWidth: this.renderedWidth,\n renderedHeight: this.renderedHeight,\n naturalWidth: this.naturalWidth,\n naturalHeight: this.naturalHeight,\n aspectRatio: this.aspectRatio,\n xScale,\n yScale,\n });\n }\n\n render() {\n if (this.loading) {\n return (\n <Host>\n <img src=\"https://public-assets.verdocs.com/loading-placeholder.png\" class=\"placeholder\" alt=\"Placeholder page\" />\n </Host>\n );\n }\n\n const height = `${this.renderedHeight}px`;\n\n return (\n <Host id={`${this.containerId}`} style={{height, flex: `0 0 ${height}`}}>\n {this.layers.map(layer =>\n layer.type === 'div' ? (\n <div class=\"verdocs-template-document-page-layer\" id={`${this.containerId}-${layer.name}`} style={{height}}>\n {layer.name === 'controls' &&\n (this.template?.fields || [])\n .filter(field => field && field.document_id === this.documentId && field.page === this.pageNumber)\n .map(field => {\n const id = getFieldId(field);\n let {name, type, multiline} = field;\n const {xScale, yScale, templateId, editable, disabled, done, pageNumber} = this;\n if (field['setting']?.leading > 0 || field['settings']?.leading > 0) {\n type = 'textarea';\n multiline = true;\n }\n switch (type as any) {\n case 'textbox':\n return (\n <verdocs-field-textbox\n id={id}\n fieldname={name}\n source=\"template\"\n sourceid={templateId}\n editable={editable}\n multiline={multiline}\n disabled={disabled}\n done={done}\n xscale={xScale}\n yscale={yScale}\n pagenumber={pageNumber}\n style={getControlStyles(field, xScale, yScale)}\n />\n );\n case 'textarea':\n return (\n <verdocs-field-textarea\n id={id}\n fieldname={name}\n source=\"template\"\n sourceid={templateId}\n editable={editable}\n disabled={disabled}\n done={done}\n xscale={xScale}\n yscale={yScale}\n pagenumber={pageNumber}\n style={getControlStyles(field, xScale, yScale)}\n />\n );\n case 'date':\n return (\n <verdocs-field-date\n id={id}\n fieldname={name}\n source=\"template\"\n sourceid={templateId}\n editable={editable}\n disabled={disabled}\n done={done}\n xscale={xScale}\n yscale={yScale}\n pagenumber={pageNumber}\n style={getControlStyles(field, xScale, yScale)}\n />\n );\n case 'attachment':\n return (\n <verdocs-field-attachment\n id={id}\n fieldname={name}\n source=\"template\"\n sourceid={templateId}\n editable={editable}\n disabled={disabled}\n done={done}\n xscale={xScale}\n yscale={yScale}\n pagenumber={pageNumber}\n style={getControlStyles(field, xScale, yScale)}\n />\n );\n case 'dropdown':\n return (\n <verdocs-field-dropdown\n id={id}\n fieldname={name}\n source=\"template\"\n sourceid={templateId}\n editable={editable}\n disabled={disabled}\n done={done}\n xscale={xScale}\n yscale={yScale}\n pagenumber={pageNumber}\n style={getControlStyles(field, xScale, yScale)}\n />\n );\n case 'initial':\n return (\n <verdocs-field-initial\n id={id}\n fieldname={name}\n source=\"template\"\n sourceid={templateId}\n editable={editable}\n disabled={disabled}\n done={done}\n xscale={xScale}\n yscale={yScale}\n pagenumber={pageNumber}\n style={getControlStyles(field, xScale, yScale)}\n />\n );\n case 'signature':\n return (\n <verdocs-field-signature\n id={id}\n fieldname={name}\n source=\"template\"\n sourceid={templateId}\n editable={editable}\n disabled={disabled}\n done={done}\n xscale={xScale}\n yscale={yScale}\n pagenumber={pageNumber}\n style={getControlStyles(field, this.xScale, this.yScale)}\n />\n );\n case 'timestamp':\n return (\n <verdocs-field-timestamp\n id={id}\n fieldname={name}\n source=\"template\"\n sourceid={templateId}\n editable={editable}\n disabled={disabled}\n done={done}\n xscale={xScale}\n yscale={yScale}\n pagenumber={pageNumber}\n style={getControlStyles(field, xScale, yScale)}\n />\n );\n case 'checkbox':\n return (\n <verdocs-field-checkbox\n id={id}\n fieldname={name}\n source=\"template\"\n sourceid={templateId}\n editable={editable}\n disabled={disabled}\n done={done}\n xscale={xScale}\n yscale={yScale}\n pagenumber={pageNumber}\n style={getControlStyles(field, xScale, yScale)}\n />\n );\n case 'radio':\n return (\n <verdocs-field-radio\n id={id}\n fieldname={name}\n source=\"template\"\n sourceid={templateId}\n editable={editable}\n disabled={disabled}\n done={done}\n xscale={xScale}\n yscale={yScale}\n pagenumber={pageNumber}\n style={getControlStyles(field, xScale, yScale)}\n />\n );\n default:\n return <Fragment>{name}</Fragment>;\n }\n })}\n </div>\n ) : this.pageDisplayUri ? (\n <img\n class=\"verdocs-template-document-page-layer img\"\n id={`${this.containerId}-${layer.name}`}\n src={this.pageDisplayUri}\n alt={`Page ${this.pageNumber}`}\n aria-hidden={true}\n loading=\"lazy\"\n onLoad={(e: any) => {\n // Note that all we really care about is the aspect ratio. We track the natural Width and Height but they aren't really that\n // useful as individual values. The image will already have been scaled down to fit a DIV for display (100%, auto height).\n // Builder places fields offset into the rendered display area, not the original document's dimensions. So its X/Y values\n // for a field are based on the responsive Web view the Template editor was seeing. The IMG was scaled down there in the\n // exact same way, so we just honor it. We capture the natural width and height here more as information. Then we use the\n // aspect ratio to adjust the \"virtual\" height in case the page is not 8.5\"x11\".\n // TODO: Store this in the DB with each page.\n this.naturalWidth = e.target.naturalWidth;\n this.naturalHeight = e.target.naturalHeight;\n this.aspectRatio = this.naturalWidth / this.naturalHeight;\n this.virtualHeight = this.virtualWidth / this.aspectRatio;\n this.renderedHeight = e.target.offsetWidth / this.aspectRatio;\n }}\n />\n ) : (\n <div></div>\n ),\n )}\n </Host>\n );\n }\n}\n"],"version":3}
1
+ {"file":"p-B2SBl93W.js","mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,MAAM,8BAA8B,GAAG,g3BAAg3B;;MCmB14B,2BAA2B,iBAAAA,kBAAA,CAAA,MAAA,2BAAA,SAAAC,CAAA,CAAA;AALxC,IAAA,WAAA,CAAA,YAAA,EAAA;;;;;;AAMU,QAAA,IAAkB,CAAA,kBAAA,GAAG,IAAI;AAKjC;;AAEG;AACK,QAAA,IAAA,CAAA,QAAQ,GAAoB,eAAe,CAAC,UAAU,EAAE;AAEhE;;AAEG;AACK,QAAA,IAAQ,CAAA,QAAA,GAAG,KAAK;AAExB;;AAEG;AACK,QAAA,IAAQ,CAAA,QAAA,GAAG,KAAK;AAExB;;AAEG;AACK,QAAA,IAAI,CAAA,IAAA,GAAG,KAAK;AAEpB;;AAEG;AACK,QAAA,IAAU,CAAA,UAAA,GAAW,EAAE;AAE/B;;AAEG;AACK,QAAA,IAAU,CAAA,UAAA,GAAW,EAAE;AAE/B;;AAEG;AACK,QAAA,IAAU,CAAA,UAAA,GAAW,CAAC;AAE9B;;;AAGG;AACK,QAAA,IAAY,CAAA,YAAA,GAAW,GAAG;AAElC;;;AAGG;AACoB,QAAA,IAAa,CAAA,aAAA,GAAW,GAAG;AAElD;;;;;;;;;;;AAWG;AACK,QAAA,IAAA,CAAA,MAAM,GAAiB,CAAC,EAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAC,CAAC;QAOtD,IAAA,CAAA,WAAW,GAAG,CAAA,sBAAA,EAAyB,IAAI,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC,EAAE,EAAE,CAAC,CAAA,CAAE;AACpF,QAAA,IAAA,CAAA,aAAa,G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E,CAAG,EAAA,IAAI,CAAC,WAAW,CAAI,CAAA,EAAA,KAAK,CAAC,IAAI,CAAE,CAAA,EACvC,GAAG,EAAE,IAAI,CAAC,cAAc,EACxB,GAAG,EAAE,CAAQ,KAAA,EAAA,IAAI,CAAC,UAAU,CAAE,CAAA,EACjB,aAAA,EAAA,IAAI,EACjB,OAAO,EAAC,MAAM,EACd,MAAM,EAAE,CAAC,CAAM,KAAI;;;;;;;;oBAQjB,IAAI,CAAC,YAAY,GAAG,CAAC,CAAC,MAAM,CAAC,YAAY;oBACzC,IAAI,CAAC,aAAa,GAAG,CAAC,CAAC,MAAM,CAAC,aAAa;oBAC3C,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,aAAa;oBACzD,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,WAAW;AACzD,oBAAA,IAAI,CAAC,cAAc,GAAG,CAAC,CAAC,MAAM,CAAC,WAAW,GAAG,IAAI,CAAC,WAAW;AAC/D,iBAAC,EAAA,CACD,KAEF,CAAA,CAAA,KAAA,EAAA,IAAA,CAAW,CACZ;SAAA,CACF,CACI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement"],"sources":["src/components/templates/verdocs-template-document-page/verdocs-template-document-page.scss?tag=verdocs-template-document-page","src/components/templates/verdocs-template-document-page/verdocs-template-document-page.tsx"],"sourcesContent":["@import '../../../theme.scss';\n\nverdocs-template-document-page {\n width: 100%;\n position: relative;\n\n .verdocs-template-document-page-layer {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n box-shadow: 0 0 10px 5px #0000000f;\n\n &.img {\n width: 100%;\n }\n }\n\n .placeholder {\n opacity: 0.1;\n width: 612px;\n height: 792px;\n box-shadow: 0 0 10px 5px #0000000f;\n }\n}\n","// NOTE: This component does not have a story because it's not intended for external use.\n\nimport {getTemplate, getTemplateDocumentPageDisplayUri, type ITemplate, VerdocsEndpoint} from '@verdocs/js-sdk';\nimport {Component, h, Host, Prop, Event, EventEmitter, State, Element, Fragment} from '@stencil/core';\nimport {IDocumentPageInfo, IPageLayer} from '../../../utils/Types';\nimport {getControlStyles, getFieldId} from '../../../utils/utils';\nimport {throttle} from '../../../utils/utils';\nimport {Store} from '../../../utils/Datastore';\n\n/**\n * Represents one document page. This is primarily a layout container used to coordinate positions of\n * page-related layers such as the page itself, signature fields, etc. It is not intended to be used\n * on its own as an individual component.\n */\n@Component({\n tag: 'verdocs-template-document-page',\n styleUrl: 'verdocs-template-document-page.scss',\n shadow: false,\n})\nexport class VerdocsTemplateDocumentPage {\n private templateListenerId = null;\n private resizeObserver: ResizeObserver;\n\n @Element() container: HTMLElement;\n\n /**\n * The endpoint to load from.\n */\n @Prop() endpoint: VerdocsEndpoint = VerdocsEndpoint.getDefault();\n\n /**\n * Whether the fields should be editable (Builder)\n */\n @Prop() editable = false;\n\n /**\n * Whether the fields should be disabled (Builder)\n */\n @Prop() disabled = false;\n\n /**\n * Whether the field are interactable (done/submitted disables this)\n */\n @Prop() done = false;\n\n /**\n * The ID of the template the document is for.\n */\n @Prop() templateId: string = '';\n\n /**\n * The ID of the document to display.\n */\n @Prop() documentId: string = '';\n\n /**\n * The page number being rendered. (Reminder: page numbers are 1-based.)\n */\n @Prop() pageNumber: number = 1;\n\n /**\n * The \"virtual\" width of the page canvas. Defaults to 612 which at 72dpi is 8.5\" wide. This is used to compute\n * the aspect ratio of the final rendered element when scaling up/down.\n */\n @Prop() virtualWidth: number = 612;\n\n /**\n * The \"virtual\" height of the page canvas. Defaults to 792 which at 72dpi is 11\" tall. This is used to compute\n * the aspect ratio of the final rendered element when scaling up/down.\n */\n @Prop({mutable: true}) virtualHeight: number = 792;\n\n /**\n * The layers that will be rendered. The DOM structure will be a DIV container with one child DIV for each layer.\n * The parent DIV will have a unique ID, and each child DIV will have that ID with the layer name appended, e.g.\n * if `pages` was ['page', 'fields'] the structure will be:\n *\n * ```\n * <div id=\"verdocs-document-page-ker2fr1p9\">\n * <div id=\"verdocs-document-page-ker2fr1p9-page\"></div>\n * <div id=\"verdocs-document-page-ker2fr1p9-fields\"></div>\n * </div>\n * ```\n */\n @Prop() layers: IPageLayer[] = [{name: 'page', type: 'canvas'}];\n\n /**\n * Fired when a page has been rendered. This is also fired when the page is resized.\n */\n @Event() pageRendered: EventEmitter<IDocumentPageInfo>;\n\n @State() containerId = `verdocs-document-page-${Math.random().toString(36).substring(2, 11)}`;\n @State() renderedWidth: number = this.virtualWidth;\n @State() renderedHeight: number = this.virtualHeight;\n @State() naturalWidth: number = this.virtualWidth;\n @State() naturalHeight: number = this.virtualHeight;\n @State() aspectRatio: number = this.virtualWidth / this.virtualHeight;\n @State() skipFirstNotification = true;\n @State() pageDisplayUri = '';\n @State() xScale = 1;\n @State() yScale = 1;\n\n @State() loading = true;\n @State() template: ITemplate | null = null;\n\n async componentWillLoad() {\n this.pageDisplayUri = await getTemplateDocumentPageDisplayUri(this.endpoint, this.documentId, this.pageNumber);\n this.listenToTemplate();\n }\n\n componentDidLoad() {\n this.resizeObserver = new ResizeObserver(\n throttle(entries => {\n for (const entry of entries) {\n const renderedWidth = entry.contentRect.width;\n this.renderedWidth = renderedWidth;\n this.renderedHeight = this.virtualHeight * (renderedWidth / this.virtualWidth);\n }\n\n this.notifyRenderedSize();\n }, 100),\n );\n\n this.resizeObserver.observe(this.container);\n }\n\n componentDidUpdate() {\n // This is fired when fields are updated and triggers the parent to re-attach behaviors like drag-and-drop\n this.notifyRenderedSize();\n }\n\n disconnectedCallback() {\n this.resizeObserver?.disconnect();\n this.unlistenToTemplate();\n }\n\n async listenToTemplate() {\n this.unlistenToTemplate();\n Store.subscribe(\n 'templates',\n this.templateId,\n () => getTemplate(this.endpoint, this.templateId),\n false,\n (template: ITemplate) => {\n this.template = template;\n this.loading = false;\n },\n );\n }\n\n unlistenToTemplate() {\n if (this.templateListenerId) {\n Store.store.delListener(this.templateListenerId);\n this.templateListenerId = null;\n }\n }\n\n notifyRenderedSize() {\n // We skip one notification because by default we will always get at least two, one when rendering the initial size\n // and a second once we're able to compute the scale size, when the resizeObserver sets renderedWidth/renderedHeight.\n if (this.skipFirstNotification) {\n this.skipFirstNotification = false;\n return;\n }\n\n const xScale = this.renderedWidth / this.virtualWidth;\n if (this.xScale !== xScale) {\n this.xScale = xScale;\n }\n\n const yScale = this.renderedHeight / this.virtualHeight;\n if (this.yScale !== yScale) {\n this.yScale = yScale;\n }\n\n this.pageRendered.emit({\n // container: this.container,\n containerId: this.containerId,\n documentId: this.documentId,\n pageNumber: this.pageNumber,\n virtualWidth: this.virtualWidth,\n virtualHeight: this.virtualHeight,\n renderedWidth: this.renderedWidth,\n renderedHeight: this.renderedHeight,\n naturalWidth: this.naturalWidth,\n naturalHeight: this.naturalHeight,\n aspectRatio: this.aspectRatio,\n xScale,\n yScale,\n });\n }\n\n render() {\n if (this.loading) {\n return (\n <Host>\n <img src=\"https://public-assets.verdocs.com/loading-placeholder.png\" class=\"placeholder\" alt=\"Placeholder page\" />\n </Host>\n );\n }\n\n const height = `${this.renderedHeight}px`;\n\n return (\n <Host id={`${this.containerId}`} style={{height, flex: `0 0 ${height}`}}>\n {this.layers.map(layer =>\n layer.type === 'div' ? (\n <div class=\"verdocs-template-document-page-layer\" id={`${this.containerId}-${layer.name}`} style={{height}}>\n {layer.name === 'controls' &&\n (this.template?.fields || [])\n .filter(field => field && field.document_id === this.documentId && field.page === this.pageNumber)\n .map(field => {\n const id = getFieldId(field);\n let {name, type, multiline} = field;\n const {xScale, yScale, templateId, editable, disabled, done, pageNumber} = this;\n if (field['setting']?.leading > 0 || field['settings']?.leading > 0) {\n type = 'textarea';\n multiline = true;\n }\n switch (type as any) {\n case 'textbox':\n return (\n <verdocs-field-textbox\n id={id}\n fieldname={name}\n source=\"template\"\n sourceid={templateId}\n editable={editable}\n multiline={multiline}\n disabled={disabled}\n done={done}\n xscale={xScale}\n yscale={yScale}\n pagenumber={pageNumber}\n style={getControlStyles(field, xScale, yScale)}\n />\n );\n case 'textarea':\n return (\n <verdocs-field-textarea\n id={id}\n fieldname={name}\n source=\"template\"\n sourceid={templateId}\n editable={editable}\n disabled={disabled}\n done={done}\n xscale={xScale}\n yscale={yScale}\n pagenumber={pageNumber}\n style={getControlStyles(field, xScale, yScale)}\n />\n );\n case 'date':\n return (\n <verdocs-field-date\n id={id}\n fieldname={name}\n source=\"template\"\n sourceid={templateId}\n editable={editable}\n disabled={disabled}\n done={done}\n xscale={xScale}\n yscale={yScale}\n pagenumber={pageNumber}\n style={getControlStyles(field, xScale, yScale)}\n />\n );\n case 'attachment':\n return (\n <verdocs-field-attachment\n id={id}\n fieldname={name}\n source=\"template\"\n sourceid={templateId}\n editable={editable}\n disabled={disabled}\n done={done}\n xscale={xScale}\n yscale={yScale}\n pagenumber={pageNumber}\n style={getControlStyles(field, xScale, yScale)}\n />\n );\n case 'dropdown':\n return (\n <verdocs-field-dropdown\n id={id}\n fieldname={name}\n source=\"template\"\n sourceid={templateId}\n editable={editable}\n disabled={disabled}\n done={done}\n xscale={xScale}\n yscale={yScale}\n pagenumber={pageNumber}\n style={getControlStyles(field, xScale, yScale)}\n />\n );\n case 'initial':\n return (\n <verdocs-field-initial\n id={id}\n fieldname={name}\n source=\"template\"\n sourceid={templateId}\n editable={editable}\n disabled={disabled}\n done={done}\n xscale={xScale}\n yscale={yScale}\n pagenumber={pageNumber}\n style={getControlStyles(field, xScale, yScale)}\n />\n );\n case 'signature':\n return (\n <verdocs-field-signature\n id={id}\n fieldname={name}\n source=\"template\"\n sourceid={templateId}\n editable={editable}\n disabled={disabled}\n done={done}\n xscale={xScale}\n yscale={yScale}\n pagenumber={pageNumber}\n style={getControlStyles(field, this.xScale, this.yScale)}\n />\n );\n case 'timestamp':\n return (\n <verdocs-field-timestamp\n id={id}\n fieldname={name}\n source=\"template\"\n sourceid={templateId}\n editable={editable}\n disabled={disabled}\n done={done}\n xscale={xScale}\n yscale={yScale}\n pagenumber={pageNumber}\n style={getControlStyles(field, xScale, yScale)}\n />\n );\n case 'checkbox':\n return (\n <verdocs-field-checkbox\n id={id}\n fieldname={name}\n source=\"template\"\n sourceid={templateId}\n editable={editable}\n disabled={disabled}\n done={done}\n xscale={xScale}\n yscale={yScale}\n pagenumber={pageNumber}\n style={getControlStyles(field, xScale, yScale)}\n />\n );\n case 'radio':\n return (\n <verdocs-field-radio\n id={id}\n fieldname={name}\n source=\"template\"\n sourceid={templateId}\n editable={editable}\n disabled={disabled}\n done={done}\n xscale={xScale}\n yscale={yScale}\n pagenumber={pageNumber}\n style={getControlStyles(field, xScale, yScale)}\n />\n );\n default:\n return <Fragment>{name}</Fragment>;\n }\n })}\n </div>\n ) : this.pageDisplayUri ? (\n <img\n class=\"verdocs-template-document-page-layer img\"\n id={`${this.containerId}-${layer.name}`}\n src={this.pageDisplayUri}\n alt={`Page ${this.pageNumber}`}\n aria-hidden={true}\n loading=\"lazy\"\n onLoad={(e: any) => {\n // Note that all we really care about is the aspect ratio. We track the natural Width and Height but they aren't really that\n // useful as individual values. The image will already have been scaled down to fit a DIV for display (100%, auto height).\n // Builder places fields offset into the rendered display area, not the original document's dimensions. So its X/Y values\n // for a field are based on the responsive Web view the Template editor was seeing. The IMG was scaled down there in the\n // exact same way, so we just honor it. We capture the natural width and height here more as information. Then we use the\n // aspect ratio to adjust the \"virtual\" height in case the page is not 8.5\"x11\".\n // TODO: Store this in the DB with each page.\n this.naturalWidth = e.target.naturalWidth;\n this.naturalHeight = e.target.naturalHeight;\n this.aspectRatio = this.naturalWidth / this.naturalHeight;\n this.virtualHeight = this.virtualWidth / this.aspectRatio;\n this.renderedHeight = e.target.offsetWidth / this.aspectRatio;\n }}\n />\n ) : (\n <div></div>\n ),\n )}\n </Host>\n );\n }\n}\n"],"version":3}
@@ -15,7 +15,7 @@ import { d as defineCustomElement$1 } from './p-CbtdkfOR.js';
15
15
 
16
16
  var formatExports = /*@__PURE__*/ requireFormat();
17
17
 
18
- const verdocsFieldTimestampCss = "@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-field-timestamp{width:160px;height:15px;display:block;font-size:9px;position:relative;scroll-margin:20px 0;background-color:var(--verdocs-field-background, transparent);-webkit-transform-origin:bottom left;transform-origin:bottom left;font-family:var(--verdocs-primary-font, \"Inter\", \"Barlow\", sans-serif)}verdocs-field-timestamp.done{opacity:1}verdocs-field-timestamp input{position:absolute;cursor:inherit;opacity:0.5;width:100%;height:100%;font-size:9px;background:none;font-weight:500;-webkit-transform-origin:0 0;transform-origin:0 0;-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--verdocs-field-text-color, rgba(0, 0, 0, 0.87));border:var(--verdocs-field-border, 1px solid rgba(0, 0, 0, 0.2));border-radius:var(--verdocs-field-radius)}verdocs-field-timestamp input.hide{display:none}verdocs-field-timestamp label{top:-14px;left:-1px;height:14px;color:white;padding:0 4px;font-size:9px;line-height:13px;position:absolute;background:#4a4a99;border-top-left-radius:2px;border-top-right-radius:2px}verdocs-field-timestamp.required{border:1px solid var(--verdocs-required-field-border)}verdocs-field-timestamp.focused{-webkit-animation:verdocs-field-pulse 0.4s 1;animation:verdocs-field-pulse 0.4s 1}verdocs-field-timestamp 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-timestamp verdocs-button-panel[data-active],verdocs-field-timestamp verdocs-button-panel:hover{opacity:1}verdocs-field-timestamp verdocs-button-panel .icon svg{fill:#333333}verdocs-field-timestamp verdocs-button-panel .icon:hover svg{fill:#000000}verdocs-field-timestamp .settings-icon{position:absolute;top:-3px;left:-20px;display:inline-block;cursor:pointer;opacity:0.3}verdocs-field-timestamp .settings-icon svg{fill:#707ae5}verdocs-field-timestamp .settings-icon:hover{opacity:1}";
18
+ const verdocsFieldTimestampCss = "@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-field-timestamp{width:160px;height:15px;display:block;font-size:9px;position:relative;scroll-margin:20px 0;background-color:var(--verdocs-field-background, transparent);-webkit-transform-origin:bottom left;transform-origin:bottom left;font-family:var(--verdocs-primary-font, \"Inter\", \"Barlow\", sans-serif)}verdocs-field-timestamp.done{opacity:1}verdocs-field-timestamp input{position:absolute;cursor:inherit;opacity:0.5;width:100%;height:100%;font-size:9px;background:none;font-weight:500;-webkit-transform-origin:0 0;transform-origin:0 0;-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--verdocs-field-text-color, rgba(0, 0, 0, 0.87));border:var(--verdocs-field-border, 1px solid rgba(0, 0, 0, 0.2));border-radius:var(--verdocs-field-radius)}verdocs-field-timestamp input.hide{display:none}verdocs-field-timestamp label{top:-14px;left:-1px;height:14px;color:white;padding:0 4px;font-size:9px;line-height:13px;position:absolute;background:#4a4a99;border-top-left-radius:2px;border-top-right-radius:2px}verdocs-field-timestamp.required{border:1px solid var(--verdocs-required-field-border)}verdocs-field-timestamp.focused{-webkit-animation:verdocs-field-pulse 0.4s 1;animation:verdocs-field-pulse 0.4s 1;-webkit-box-shadow:inset 0 0 0 2px var(--verdocs-primary-color, #0065ff);box-shadow:inset 0 0 0 2px var(--verdocs-primary-color, #0065ff);border-radius:4px;-webkit-transition:-webkit-box-shadow 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), -webkit-transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);transition:-webkit-box-shadow 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), -webkit-transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);transition:box-shadow 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);transition:box-shadow 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), -webkit-box-shadow 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), -webkit-transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1)}verdocs-field-timestamp 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-timestamp verdocs-button-panel[data-active],verdocs-field-timestamp verdocs-button-panel:hover{opacity:1}verdocs-field-timestamp verdocs-button-panel .icon svg{fill:#333333}verdocs-field-timestamp verdocs-button-panel .icon:hover svg{fill:#000000}verdocs-field-timestamp .settings-icon{position:absolute;top:-3px;left:-20px;display:inline-block;cursor:pointer;opacity:0.3}verdocs-field-timestamp .settings-icon svg{fill:#707ae5}verdocs-field-timestamp .settings-icon:hover{opacity:1}@-webkit-keyframes verdocs-field-pulse-blue{0%{-webkit-box-shadow:0 0 0 3px #0065ff, 0 0 0 5px rgba(0, 101, 255, 0.5), 0 0 10px rgba(0, 101, 255, 0.6);box-shadow:0 0 0 3px #0065ff, 0 0 0 5px rgba(0, 101, 255, 0.5), 0 0 10px rgba(0, 101, 255, 0.6)}100%{-webkit-box-shadow:0 0 0 3px #0065ff, 0 0 0 6px rgba(0, 101, 255, 0.7), 0 0 20px rgba(0, 101, 255, 0.9);box-shadow:0 0 0 3px #0065ff, 0 0 0 6px rgba(0, 101, 255, 0.7), 0 0 20px rgba(0, 101, 255, 0.9)}}@keyframes verdocs-field-pulse-blue{0%{-webkit-box-shadow:0 0 0 3px #0065ff, 0 0 0 5px rgba(0, 101, 255, 0.5), 0 0 10px rgba(0, 101, 255, 0.6);box-shadow:0 0 0 3px #0065ff, 0 0 0 5px rgba(0, 101, 255, 0.5), 0 0 10px rgba(0, 101, 255, 0.6)}100%{-webkit-box-shadow:0 0 0 3px #0065ff, 0 0 0 6px rgba(0, 101, 255, 0.7), 0 0 20px rgba(0, 101, 255, 0.9);box-shadow:0 0 0 3px #0065ff, 0 0 0 6px rgba(0, 101, 255, 0.7), 0 0 20px rgba(0, 101, 255, 0.9)}}";
19
19
 
20
20
  const VerdocsFieldTimestamp = /*@__PURE__*/ proxyCustomElement(class VerdocsFieldTimestamp extends H {
21
21
  constructor(registerHost) {
@@ -189,6 +189,6 @@ function defineCustomElement() {
189
189
  }
190
190
 
191
191
  export { VerdocsFieldTimestamp as V, defineCustomElement as d };
192
- //# sourceMappingURL=p-DGVgIkrO.js.map
192
+ //# sourceMappingURL=p-BMyljYq7.js.map
193
193
 
194
- //# sourceMappingURL=p-DGVgIkrO.js.map
194
+ //# sourceMappingURL=p-BMyljYq7.js.map
@@ -0,0 +1 @@
1
+ {"file":"p-BMyljYq7.js","mappings":";;;;;;;;;;;;;;;;;AAAA,MAAM,wBAAwB,GAAG,ixHAAixH;;MCgBryH,qBAAqB,iBAAAA,kBAAA,CAAA,MAAA,qBAAA,SAAAC,CAAA,CAAA;AALlC,IAAA,WAAA,CAAA,YAAA,EAAA;;;;;;;AAQE;;AAEG;AACoB,QAAA,IAAM,CAAA,MAAA,GAA4B,UAAU;AAEnE;;AAEG;AACoB,QAAA,IAAQ,CAAA,QAAA,GAAW,EAAE;AAE5C;;AAEG;AACoB,QAAA,IAAS,CAAA,SAAA,GAAW,EAAE;AAE7C;;;AAGG;AACK,QAAA,IAAK,CAAA,KAAA,GAAsC,IAAI;AAEvD;;AAEG;AACoB,QAAA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ACQ,CACZ,CACI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement","format"],"sources":["src/components/fields/verdocs-field-timestamp/verdocs-field-timestamp.scss?tag=verdocs-field-timestamp","src/components/fields/verdocs-field-timestamp/verdocs-field-timestamp.tsx"],"sourcesContent":["@import '../../../theme.scss';\n\nverdocs-field-timestamp {\n width: 160px;\n height: 15px;\n display: block;\n font-size: 9px;\n position: relative;\n scroll-margin: 20px 0;\n background-color: var(--verdocs-field-background, transparent);\n transform-origin: bottom left;\n font-family: $verdocs-primary-font;\n\n &.done {\n opacity: 1;\n }\n\n input {\n position: absolute;\n\n // This is needed to bring down the cursor from the parent element, which is where interactjs applies it\n cursor: inherit;\n\n opacity: 0.5;\n width: 100%;\n height: 100%;\n font-size: 9px;\n background: none;\n font-weight: 500;\n transform-origin: 0 0;\n box-sizing: border-box;\n color: var(--verdocs-field-text-color, rgba(0, 0, 0, 0.87));\n border: var(--verdocs-field-border, 1px solid rgba(0, 0, 0, 0.2));\n border-radius: var(--verdocs-field-radius);\n\n &.hide {\n display: none;\n }\n }\n\n label {\n top: -14px;\n left: -1px;\n height: 14px;\n color: white;\n padding: 0 4px;\n font-size: 9px;\n line-height: 13px;\n position: absolute;\n background: #4a4a99;\n border-top-left-radius: 2px;\n border-top-right-radius: 2px;\n }\n\n &.required {\n border: 1px solid var(--verdocs-required-field-border);\n }\n\n &.focused {\n animation: verdocs-field-pulse 0.4s 1;\n box-shadow: inset 0 0 0 2px var(--verdocs-primary-color, #0065ff);\n border-radius: 4px;\n transition: box-shadow 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);\n }\n\n verdocs-button-panel {\n top: -3px;\n left: -2px;\n opacity: 0.5;\n z-index: 1000;\n cursor: pointer;\n position: absolute;\n transform: scale(0.6);\n\n &[data-active],\n &:hover {\n opacity: 1;\n }\n\n .icon {\n svg {\n fill: #333333;\n }\n\n &:hover {\n svg {\n fill: #000000;\n }\n }\n }\n }\n\n .settings-icon {\n position: absolute;\n top: -3px;\n left: -20px;\n display: inline-block;\n cursor: pointer;\n opacity: 0.3;\n\n svg {\n fill: $border-color;\n }\n\n &:hover {\n opacity: 1;\n }\n }\n}\n\n@keyframes verdocs-field-pulse-blue {\n 0% {\n box-shadow:\n 0 0 0 3px #0065ff,\n 0 0 0 5px rgba(0, 101, 255, 0.5),\n 0 0 10px rgba(0, 101, 255, 0.6);\n }\n 100% {\n box-shadow:\n 0 0 0 3px #0065ff,\n 0 0 0 6px rgba(0, 101, 255, 0.7),\n 0 0 20px rgba(0, 101, 255, 0.9);\n }\n}\n","import {format} from 'date-fns/format';\nimport {ITemplateField, IEnvelopeField} from '@verdocs/js-sdk';\nimport {Component, h, Host, Prop, Method, Event, EventEmitter, Fragment, State} from '@stencil/core';\nimport {FORMAT_TIMESTAMP} from '../../../utils/Types';\nimport {SettingsIcon} from '../../../utils/Icons';\nimport {Store} from '../../../utils/Datastore';\n\n/**\n * Display a timestamp. Timestamps are not editable by signers. Instead, they are automatically\n * filled when the signer submits the document.\n */\n@Component({\n tag: 'verdocs-field-timestamp',\n styleUrl: 'verdocs-field-timestamp.scss',\n shadow: false,\n})\nexport class VerdocsFieldTimestamp {\n private el: HTMLInputElement;\n\n /**\n * Fields may be attached to templates or envelopes, but only template fields may be edited.\n */\n @Prop({reflect: true}) source: 'template' | 'envelope' = 'template';\n\n /**\n * The source template or envelope ID the field is found in.\n */\n @Prop({reflect: true}) sourceid: string = '';\n\n /**\n * The name of the field to display.\n */\n @Prop({reflect: true}) fieldname: string = '';\n\n /**\n * Override the field's settings. This is intended to be used during signing when fields are being\n * mutated.\n */\n @Prop() field: IEnvelopeField | null | undefined = null;\n\n /**\n * If set, overrides the field's settings object. Primarily used to support \"preview\" modes where all fields are disabled.\n */\n @Prop({reflect: true}) disabled?: boolean = false;\n\n /**\n * If set, a settings icon will be displayed on hover. The settings shown allow the field's recipient and other settings to be\n * changed, so it should typically only be enabled in the Builder.\n */\n @Prop({reflect: true}) editable?: boolean = false;\n\n /**\n * If set, the field may be dragged to a new location. This should only be enabled in the Builder, or for self-placed fields.\n */\n @Prop({reflect: true}) moveable?: boolean = false;\n\n /**\n * If set, the field is considered \"done\" and is drawn in a display-final-value state.\n */\n @Prop({reflect: true}) done?: boolean = false;\n\n /**\n * If set, the field will be be scaled horizontally by this factor.\n */\n @Prop({reflect: true}) xscale?: number = 1;\n\n /**\n * If set, the field will be be scaled vertically by this factor.\n */\n @Prop({reflect: true}) yscale?: number = 1;\n\n /**\n * The page the field is on\n */\n @Prop() pagenumber?: number = 1;\n\n /**\n * Event fired when the field's settings are changed.\n */\n @Event({composed: true}) settingsChanged: EventEmitter<{fieldName: string; field: ITemplateField}>;\n\n /**\n * Event fired when the field is deleted.\n */\n @Event({composed: true}) deleted: EventEmitter<{fieldName: string}>;\n\n @State() showingProperties?: boolean = false;\n\n @Method() async focusField() {\n this.el.focus();\n }\n\n @Method()\n async showSettingsPanel() {\n const settingsPanel = document.getElementById(`verdocs-settings-panel-${this.fieldname}`) as any;\n if (settingsPanel && settingsPanel.showPanel) {\n settingsPanel.showPanel();\n }\n }\n\n @Method()\n async hideSettingsPanel() {\n const settingsPanel = document.getElementById(`verdocs-settings-panel-${this.fieldname}`) as any;\n if (settingsPanel && settingsPanel.hidePanel) {\n settingsPanel.hidePanel();\n }\n this.showingProperties = false;\n }\n\n render() {\n const {source, sourceid, fieldname, editable = false, done = false, disabled = false, xscale = 1, yscale = 1} = this;\n\n const {index, field} = Store.getField(source, sourceid, fieldname, this.field);\n const {required = false, placeholder = '', value = '', label = ''} = field || {};\n const signerClass = `signer-${(index % 10) + 1}`;\n\n const formatted = format(new Date(value || new Date().toISOString()), FORMAT_TIMESTAMP);\n\n if (done) {\n return <Host class={{done}}>{formatted}</Host>;\n }\n\n return (\n <Host class={{required, disabled, done, [signerClass]: true}}>\n {label && <label>{label}</label>}\n <input type=\"text\" placeholder={placeholder} value={formatted} disabled={true} ref={el => (this.el = el)} />\n\n {editable && (\n <Fragment>\n <div\n id={`verdocs-settings-panel-trigger-${fieldname}`}\n style={{transform: `scale(${Math.floor((1 / xscale) * 1000) / 1000}, ${Math.floor((1 / yscale) * 1000) / 1000})`}}\n class=\"settings-icon\"\n innerHTML={SettingsIcon}\n onClick={(e: any) => {\n e.stopPropagation();\n this.showingProperties = !this.showingProperties;\n }}\n />\n\n {this.showingProperties && (\n <verdocs-portal anchor={`verdocs-settings-panel-trigger-${fieldname}`} onClickAway={() => (this.showingProperties = false)}>\n <verdocs-template-field-properties\n templateId={sourceid}\n fieldName={fieldname}\n onClose={() => this.hideSettingsPanel()}\n onDelete={() => {\n this.deleted?.emit({fieldName: fieldname});\n return this.hideSettingsPanel();\n }}\n onSettingsChanged={e => {\n this.settingsChanged?.emit(e.detail);\n return this.hideSettingsPanel();\n }}\n helpText={'Time stamps are automatically set when the recipient signs the document.'}\n />\n </verdocs-portal>\n )}\n </Fragment>\n )}\n </Host>\n );\n }\n}\n"],"version":3}