@internetarchive/elements 1.4.1-webdev-9540.0 → 1.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (273) hide show
  1. package/dist/src/elements/ia-book-actions/assets/data/archive-logo.d.ts +2 -0
  2. package/dist/src/elements/ia-book-actions/assets/data/archive-logo.d.ts.map +1 -0
  3. package/dist/src/elements/ia-book-actions/assets/data/archive-logo.js +32 -0
  4. package/dist/src/elements/ia-book-actions/assets/data/archive-logo.js.map +1 -0
  5. package/dist/src/elements/ia-book-actions/assets/data/dropdown-arrow.d.ts +3 -0
  6. package/dist/src/elements/ia-book-actions/assets/data/dropdown-arrow.d.ts.map +1 -0
  7. package/dist/src/elements/ia-book-actions/assets/data/dropdown-arrow.js +24 -0
  8. package/dist/src/elements/ia-book-actions/assets/data/dropdown-arrow.js.map +1 -0
  9. package/dist/src/elements/ia-book-actions/assets/data/info-icon.d.ts +2 -0
  10. package/dist/src/elements/ia-book-actions/assets/data/info-icon.d.ts.map +1 -0
  11. package/dist/src/elements/ia-book-actions/assets/data/info-icon.js +17 -0
  12. package/dist/src/elements/ia-book-actions/assets/data/info-icon.js.map +1 -0
  13. package/dist/src/elements/ia-book-actions/assets/data/purchase.d.ts +2 -0
  14. package/dist/src/elements/ia-book-actions/assets/data/purchase.d.ts.map +1 -0
  15. package/dist/src/elements/ia-book-actions/assets/data/purchase.js +23 -0
  16. package/dist/src/elements/ia-book-actions/assets/data/purchase.js.map +1 -0
  17. package/dist/src/elements/ia-book-actions/assets/styles/collapsible-action-group.d.ts +3 -0
  18. package/dist/src/elements/ia-book-actions/assets/styles/collapsible-action-group.d.ts.map +1 -0
  19. package/dist/src/elements/ia-book-actions/assets/styles/collapsible-action-group.js +167 -0
  20. package/dist/src/elements/ia-book-actions/assets/styles/collapsible-action-group.js.map +1 -0
  21. package/dist/src/elements/ia-book-actions/assets/styles/ia-button.d.ts +3 -0
  22. package/dist/src/elements/ia-book-actions/assets/styles/ia-button.d.ts.map +1 -0
  23. package/dist/src/elements/ia-book-actions/assets/styles/ia-button.js +102 -0
  24. package/dist/src/elements/ia-book-actions/assets/styles/ia-button.js.map +1 -0
  25. package/dist/src/elements/ia-book-actions/core/config/analytics-event-and-category.d.ts +33 -0
  26. package/dist/src/elements/ia-book-actions/core/config/analytics-event-and-category.d.ts.map +1 -0
  27. package/dist/src/elements/ia-book-actions/core/config/analytics-event-and-category.js +33 -0
  28. package/dist/src/elements/ia-book-actions/core/config/analytics-event-and-category.js.map +1 -0
  29. package/dist/src/elements/ia-book-actions/core/config/constants.d.ts +9 -0
  30. package/dist/src/elements/ia-book-actions/core/config/constants.d.ts.map +1 -0
  31. package/dist/src/elements/ia-book-actions/core/config/constants.js +9 -0
  32. package/dist/src/elements/ia-book-actions/core/config/constants.js.map +1 -0
  33. package/dist/src/elements/ia-book-actions/core/config/ia-lending-intervals.d.ts +2 -0
  34. package/dist/src/elements/ia-book-actions/core/config/ia-lending-intervals.d.ts.map +1 -0
  35. package/dist/src/elements/ia-book-actions/core/config/ia-lending-intervals.js +54 -0
  36. package/dist/src/elements/ia-book-actions/core/config/ia-lending-intervals.js.map +1 -0
  37. package/dist/src/elements/ia-book-actions/core/config/sentry-events.d.ts +17 -0
  38. package/dist/src/elements/ia-book-actions/core/config/sentry-events.d.ts.map +1 -0
  39. package/dist/src/elements/ia-book-actions/core/config/sentry-events.js +17 -0
  40. package/dist/src/elements/ia-book-actions/core/config/sentry-events.js.map +1 -0
  41. package/dist/src/elements/ia-book-actions/core/config/url-helper.d.ts +31 -0
  42. package/dist/src/elements/ia-book-actions/core/config/url-helper.d.ts.map +1 -0
  43. package/dist/src/elements/ia-book-actions/core/config/url-helper.js +79 -0
  44. package/dist/src/elements/ia-book-actions/core/config/url-helper.js.map +1 -0
  45. package/dist/src/elements/ia-book-actions/core/services/actions-config.d.ts +65 -0
  46. package/dist/src/elements/ia-book-actions/core/services/actions-config.d.ts.map +1 -0
  47. package/dist/src/elements/ia-book-actions/core/services/actions-config.js +231 -0
  48. package/dist/src/elements/ia-book-actions/core/services/actions-config.js.map +1 -0
  49. package/dist/src/elements/ia-book-actions/core/services/actions-handler/actions-handler-service.d.ts +35 -0
  50. package/dist/src/elements/ia-book-actions/core/services/actions-handler/actions-handler-service.d.ts.map +1 -0
  51. package/dist/src/elements/ia-book-actions/core/services/actions-handler/actions-handler-service.js +140 -0
  52. package/dist/src/elements/ia-book-actions/core/services/actions-handler/actions-handler-service.js.map +1 -0
  53. package/dist/src/elements/ia-book-actions/core/services/actions-handler/actions-handler.d.ts +78 -0
  54. package/dist/src/elements/ia-book-actions/core/services/actions-handler/actions-handler.d.ts.map +1 -0
  55. package/dist/src/elements/ia-book-actions/core/services/actions-handler/actions-handler.js +372 -0
  56. package/dist/src/elements/ia-book-actions/core/services/actions-handler/actions-handler.js.map +1 -0
  57. package/dist/src/elements/ia-book-actions/core/services/doc-cookies.d.ts +42 -0
  58. package/dist/src/elements/ia-book-actions/core/services/doc-cookies.d.ts.map +1 -0
  59. package/dist/src/elements/ia-book-actions/core/services/doc-cookies.js +75 -0
  60. package/dist/src/elements/ia-book-actions/core/services/doc-cookies.js.map +1 -0
  61. package/dist/src/elements/ia-book-actions/core/services/get-lending-actions.d.ts +72 -0
  62. package/dist/src/elements/ia-book-actions/core/services/get-lending-actions.d.ts.map +1 -0
  63. package/dist/src/elements/ia-book-actions/core/services/get-lending-actions.js +392 -0
  64. package/dist/src/elements/ia-book-actions/core/services/get-lending-actions.js.map +1 -0
  65. package/dist/src/elements/ia-book-actions/core/services/loan-analytics.d.ts +59 -0
  66. package/dist/src/elements/ia-book-actions/core/services/loan-analytics.d.ts.map +1 -0
  67. package/dist/src/elements/ia-book-actions/core/services/loan-analytics.js +134 -0
  68. package/dist/src/elements/ia-book-actions/core/services/loan-analytics.js.map +1 -0
  69. package/dist/src/elements/ia-book-actions/core/services/loan-renew-helper.d.ts +58 -0
  70. package/dist/src/elements/ia-book-actions/core/services/loan-renew-helper.d.ts.map +1 -0
  71. package/dist/src/elements/ia-book-actions/core/services/loan-renew-helper.js +135 -0
  72. package/dist/src/elements/ia-book-actions/core/services/loan-renew-helper.js.map +1 -0
  73. package/dist/src/elements/ia-book-actions/core/services/loan-token-poller.d.ts +73 -0
  74. package/dist/src/elements/ia-book-actions/core/services/loan-token-poller.d.ts.map +1 -0
  75. package/dist/src/elements/ia-book-actions/core/services/loan-token-poller.js +143 -0
  76. package/dist/src/elements/ia-book-actions/core/services/loan-token-poller.js.map +1 -0
  77. package/dist/src/elements/ia-book-actions/core/services/logger.d.ts +18 -0
  78. package/dist/src/elements/ia-book-actions/core/services/logger.d.ts.map +1 -0
  79. package/dist/src/elements/ia-book-actions/core/services/logger.js +26 -0
  80. package/dist/src/elements/ia-book-actions/core/services/logger.js.map +1 -0
  81. package/dist/src/elements/ia-book-actions/core/services/sentry-report.d.ts +19 -0
  82. package/dist/src/elements/ia-book-actions/core/services/sentry-report.d.ts.map +1 -0
  83. package/dist/src/elements/ia-book-actions/core/services/sentry-report.js +25 -0
  84. package/dist/src/elements/ia-book-actions/core/services/sentry-report.js.map +1 -0
  85. package/dist/src/elements/ia-book-actions/globals.d.ts +38 -0
  86. package/dist/src/elements/ia-book-actions/globals.d.ts.map +1 -0
  87. package/dist/src/elements/ia-book-actions/globals.js +6 -0
  88. package/dist/src/elements/ia-book-actions/globals.js.map +1 -0
  89. package/dist/src/elements/ia-book-actions/ia-book-actions-collapsible-action-group.d.ts +97 -0
  90. package/dist/src/elements/ia-book-actions/ia-book-actions-collapsible-action-group.d.ts.map +1 -0
  91. package/dist/src/elements/ia-book-actions/ia-book-actions-collapsible-action-group.js +308 -0
  92. package/dist/src/elements/ia-book-actions/ia-book-actions-collapsible-action-group.js.map +1 -0
  93. package/dist/src/elements/ia-book-actions/ia-book-actions-info-icon.d.ts +14 -0
  94. package/dist/src/elements/ia-book-actions/ia-book-actions-info-icon.d.ts.map +1 -0
  95. package/dist/src/elements/ia-book-actions/ia-book-actions-info-icon.js +58 -0
  96. package/dist/src/elements/ia-book-actions/ia-book-actions-info-icon.js.map +1 -0
  97. package/dist/src/elements/ia-book-actions/ia-book-actions-text-group.d.ts +13 -0
  98. package/dist/src/elements/ia-book-actions/ia-book-actions-text-group.d.ts.map +1 -0
  99. package/dist/src/elements/ia-book-actions/ia-book-actions-text-group.js +45 -0
  100. package/dist/src/elements/ia-book-actions/ia-book-actions-text-group.js.map +1 -0
  101. package/dist/src/elements/ia-book-actions/ia-book-actions-timer-countdown.d.ts +20 -0
  102. package/dist/src/elements/ia-book-actions/ia-book-actions-timer-countdown.d.ts.map +1 -0
  103. package/dist/src/elements/ia-book-actions/ia-book-actions-timer-countdown.js +92 -0
  104. package/dist/src/elements/ia-book-actions/ia-book-actions-timer-countdown.js.map +1 -0
  105. package/dist/src/elements/ia-book-actions/ia-book-actions-title-bar.d.ts +41 -0
  106. package/dist/src/elements/ia-book-actions/ia-book-actions-title-bar.d.ts.map +1 -0
  107. package/dist/src/elements/ia-book-actions/ia-book-actions-title-bar.js +86 -0
  108. package/dist/src/elements/ia-book-actions/ia-book-actions-title-bar.js.map +1 -0
  109. package/dist/src/elements/ia-book-actions/ia-book-actions.d.ts +270 -0
  110. package/dist/src/elements/ia-book-actions/ia-book-actions.d.ts.map +1 -0
  111. package/dist/src/elements/ia-book-actions/ia-book-actions.js +1156 -0
  112. package/dist/src/elements/ia-book-actions/ia-book-actions.js.map +1 -0
  113. package/dist/src/elements/ia-book-actions/models.d.ts +206 -0
  114. package/dist/src/elements/ia-book-actions/models.d.ts.map +1 -0
  115. package/dist/src/elements/ia-book-actions/models.js +2 -0
  116. package/dist/src/elements/ia-book-actions/models.js.map +1 -0
  117. package/dist/src/elements/ia-donation-form/analytics.d.ts +12 -0
  118. package/dist/src/elements/ia-donation-form/analytics.d.ts.map +1 -0
  119. package/dist/src/elements/ia-donation-form/analytics.js +2 -0
  120. package/dist/src/elements/ia-donation-form/analytics.js.map +1 -0
  121. package/dist/src/elements/ia-donation-form/braintree/payment-providers/paypal/paypal.d.ts.map +1 -1
  122. package/dist/src/elements/ia-donation-form/braintree/payment-providers/paypal/paypal.js +4 -3
  123. package/dist/src/elements/ia-donation-form/braintree/payment-providers/paypal/paypal.js.map +1 -1
  124. package/dist/src/elements/ia-donation-form/flow-handlers/donation-flow-modal-manager.d.ts +118 -0
  125. package/dist/src/elements/ia-donation-form/flow-handlers/donation-flow-modal-manager.d.ts.map +1 -0
  126. package/dist/src/elements/ia-donation-form/flow-handlers/donation-flow-modal-manager.js +194 -0
  127. package/dist/src/elements/ia-donation-form/flow-handlers/donation-flow-modal-manager.js.map +1 -0
  128. package/dist/src/elements/ia-donation-form/flow-handlers/handlers/apple-pay-flow-handler.d.ts +24 -0
  129. package/dist/src/elements/ia-donation-form/flow-handlers/handlers/apple-pay-flow-handler.d.ts.map +1 -0
  130. package/dist/src/elements/ia-donation-form/flow-handlers/handlers/apple-pay-flow-handler.js +78 -0
  131. package/dist/src/elements/ia-donation-form/flow-handlers/handlers/apple-pay-flow-handler.js.map +1 -0
  132. package/dist/src/elements/ia-donation-form/flow-handlers/handlers/credit-card-flow-handler.d.ts +44 -0
  133. package/dist/src/elements/ia-donation-form/flow-handlers/handlers/credit-card-flow-handler.d.ts.map +1 -0
  134. package/dist/src/elements/ia-donation-form/flow-handlers/handlers/credit-card-flow-handler.js +116 -0
  135. package/dist/src/elements/ia-donation-form/flow-handlers/handlers/credit-card-flow-handler.js.map +1 -0
  136. package/dist/src/elements/ia-donation-form/flow-handlers/handlers/google-pay-flow-handler.d.ts +24 -0
  137. package/dist/src/elements/ia-donation-form/flow-handlers/handlers/google-pay-flow-handler.d.ts.map +1 -0
  138. package/dist/src/elements/ia-donation-form/flow-handlers/handlers/google-pay-flow-handler.js +74 -0
  139. package/dist/src/elements/ia-donation-form/flow-handlers/handlers/google-pay-flow-handler.js.map +1 -0
  140. package/dist/src/elements/ia-donation-form/flow-handlers/handlers/paypal-flow-handler.d.ts +47 -0
  141. package/dist/src/elements/ia-donation-form/flow-handlers/handlers/paypal-flow-handler.d.ts.map +1 -0
  142. package/dist/src/elements/ia-donation-form/flow-handlers/handlers/paypal-flow-handler.js +212 -0
  143. package/dist/src/elements/ia-donation-form/flow-handlers/handlers/paypal-flow-handler.js.map +1 -0
  144. package/dist/src/elements/ia-donation-form/flow-handlers/handlers/venmo-flow-handler.d.ts +30 -0
  145. package/dist/src/elements/ia-donation-form/flow-handlers/handlers/venmo-flow-handler.d.ts.map +1 -0
  146. package/dist/src/elements/ia-donation-form/flow-handlers/handlers/venmo-flow-handler.js +77 -0
  147. package/dist/src/elements/ia-donation-form/flow-handlers/handlers/venmo-flow-handler.js.map +1 -0
  148. package/dist/src/elements/ia-donation-form/flow-handlers/payment-flow-handlers.d.ts +80 -0
  149. package/dist/src/elements/ia-donation-form/flow-handlers/payment-flow-handlers.d.ts.map +1 -0
  150. package/dist/src/elements/ia-donation-form/flow-handlers/payment-flow-handlers.js +72 -0
  151. package/dist/src/elements/ia-donation-form/flow-handlers/payment-flow-handlers.js.map +1 -0
  152. package/dist/src/elements/ia-donation-form/form-elements/contact-form/autocomplete-field-options.d.ts +2 -0
  153. package/dist/src/elements/ia-donation-form/form-elements/contact-form/autocomplete-field-options.d.ts.map +1 -0
  154. package/dist/src/elements/ia-donation-form/form-elements/contact-form/autocomplete-field-options.js +2 -0
  155. package/dist/src/elements/ia-donation-form/form-elements/contact-form/autocomplete-field-options.js.map +1 -0
  156. package/dist/src/elements/ia-donation-form/form-elements/contact-form/countries.d.ts +3 -0
  157. package/dist/src/elements/ia-donation-form/form-elements/contact-form/countries.d.ts.map +1 -0
  158. package/dist/src/elements/ia-donation-form/form-elements/contact-form/countries.js +254 -0
  159. package/dist/src/elements/ia-donation-form/form-elements/contact-form/countries.js.map +1 -0
  160. package/dist/src/elements/ia-donation-form/form-elements/contact-form/ia-donation-contact-form.d.ts +68 -0
  161. package/dist/src/elements/ia-donation-form/form-elements/contact-form/ia-donation-contact-form.d.ts.map +1 -0
  162. package/dist/src/elements/ia-donation-form/form-elements/contact-form/ia-donation-contact-form.js +489 -0
  163. package/dist/src/elements/ia-donation-form/form-elements/contact-form/ia-donation-contact-form.js.map +1 -0
  164. package/dist/src/elements/ia-donation-form/form-elements/ia-donation-badged-input.d.ts +26 -0
  165. package/dist/src/elements/ia-donation-form/form-elements/ia-donation-badged-input.d.ts.map +1 -0
  166. package/dist/src/elements/ia-donation-form/form-elements/ia-donation-badged-input.js +165 -0
  167. package/dist/src/elements/ia-donation-form/form-elements/ia-donation-badged-input.js.map +1 -0
  168. package/dist/src/elements/ia-donation-form/form-elements/ia-donation-credit-card-fields.d.ts +39 -0
  169. package/dist/src/elements/ia-donation-form/form-elements/ia-donation-credit-card-fields.d.ts.map +1 -0
  170. package/dist/src/elements/ia-donation-form/form-elements/ia-donation-credit-card-fields.js +212 -0
  171. package/dist/src/elements/ia-donation-form/form-elements/ia-donation-credit-card-fields.js.map +1 -0
  172. package/dist/src/elements/ia-donation-form/form-elements/ia-donation-header.d.ts +31 -0
  173. package/dist/src/elements/ia-donation-form/form-elements/ia-donation-header.d.ts.map +1 -0
  174. package/dist/src/elements/ia-donation-form/form-elements/ia-donation-header.js +93 -0
  175. package/dist/src/elements/ia-donation-form/form-elements/ia-donation-header.js.map +1 -0
  176. package/dist/src/elements/ia-donation-form/form-elements/ia-donation-payment-selector.d.ts +33 -0
  177. package/dist/src/elements/ia-donation-form/form-elements/ia-donation-payment-selector.d.ts.map +1 -0
  178. package/dist/src/elements/ia-donation-form/form-elements/ia-donation-payment-selector.js +379 -0
  179. package/dist/src/elements/ia-donation-form/form-elements/ia-donation-payment-selector.js.map +1 -0
  180. package/dist/src/elements/ia-donation-form/form-elements/ia-donation-summary.d.ts +11 -0
  181. package/dist/src/elements/ia-donation-form/form-elements/ia-donation-summary.d.ts.map +1 -0
  182. package/dist/src/elements/ia-donation-form/form-elements/ia-donation-summary.js +59 -0
  183. package/dist/src/elements/ia-donation-form/form-elements/ia-donation-summary.js.map +1 -0
  184. package/dist/src/elements/ia-donation-form/form-elements/ia-donation-total-amount.d.ts +10 -0
  185. package/dist/src/elements/ia-donation-form/form-elements/ia-donation-total-amount.d.ts.map +1 -0
  186. package/dist/src/elements/ia-donation-form/form-elements/ia-donation-total-amount.js +75 -0
  187. package/dist/src/elements/ia-donation-form/form-elements/ia-donation-total-amount.js.map +1 -0
  188. package/dist/src/elements/ia-donation-form/ia-donation-form-controller.d.ts +111 -0
  189. package/dist/src/elements/ia-donation-form/ia-donation-form-controller.d.ts.map +1 -0
  190. package/dist/src/elements/ia-donation-form/ia-donation-form-controller.js +522 -0
  191. package/dist/src/elements/ia-donation-form/ia-donation-form-controller.js.map +1 -0
  192. package/dist/src/elements/ia-donation-form/ia-donation-form.d.ts +95 -0
  193. package/dist/src/elements/ia-donation-form/ia-donation-form.d.ts.map +1 -0
  194. package/dist/src/elements/ia-donation-form/ia-donation-form.js +523 -0
  195. package/dist/src/elements/ia-donation-form/ia-donation-form.js.map +1 -0
  196. package/dist/src/elements/ia-donation-form/icons.d.ts +13 -0
  197. package/dist/src/elements/ia-donation-form/icons.d.ts.map +1 -0
  198. package/dist/src/elements/ia-donation-form/icons.js +21 -0
  199. package/dist/src/elements/ia-donation-form/icons.js.map +1 -0
  200. package/dist/src/elements/ia-donation-form/modals/ia-donation-confirm-modal.d.ts +27 -0
  201. package/dist/src/elements/ia-donation-form/modals/ia-donation-confirm-modal.d.ts.map +1 -0
  202. package/dist/src/elements/ia-donation-form/modals/ia-donation-confirm-modal.js +195 -0
  203. package/dist/src/elements/ia-donation-form/modals/ia-donation-confirm-modal.js.map +1 -0
  204. package/dist/src/elements/ia-donation-form/modals/ia-donation-error-modal-content.d.ts +7 -0
  205. package/dist/src/elements/ia-donation-form/modals/ia-donation-error-modal-content.d.ts.map +1 -0
  206. package/dist/src/elements/ia-donation-form/modals/ia-donation-error-modal-content.js +63 -0
  207. package/dist/src/elements/ia-donation-form/modals/ia-donation-error-modal-content.js.map +1 -0
  208. package/dist/src/elements/ia-donation-form/modals/ia-donation-upsell-modal-content.d.ts +28 -0
  209. package/dist/src/elements/ia-donation-form/modals/ia-donation-upsell-modal-content.d.ts.map +1 -0
  210. package/dist/src/elements/ia-donation-form/modals/ia-donation-upsell-modal-content.js +313 -0
  211. package/dist/src/elements/ia-donation-form/modals/ia-donation-upsell-modal-content.js.map +1 -0
  212. package/dist/src/elements/ia-feature-feedback/assets/img/thumb-down.d.ts +2 -0
  213. package/dist/src/elements/ia-feature-feedback/assets/img/thumb-down.d.ts.map +1 -0
  214. package/dist/src/elements/ia-feature-feedback/assets/img/thumb-down.js +8 -0
  215. package/dist/src/elements/ia-feature-feedback/assets/img/thumb-down.js.map +1 -0
  216. package/dist/src/elements/ia-feature-feedback/assets/img/thumb-up.d.ts +2 -0
  217. package/dist/src/elements/ia-feature-feedback/assets/img/thumb-up.d.ts.map +1 -0
  218. package/dist/src/elements/ia-feature-feedback/assets/img/thumb-up.js +4 -0
  219. package/dist/src/elements/ia-feature-feedback/assets/img/thumb-up.js.map +1 -0
  220. package/dist/src/elements/ia-feature-feedback/feature-feedback-service.d.ts +54 -0
  221. package/dist/src/elements/ia-feature-feedback/feature-feedback-service.d.ts.map +1 -0
  222. package/dist/src/elements/ia-feature-feedback/feature-feedback-service.js +79 -0
  223. package/dist/src/elements/ia-feature-feedback/feature-feedback-service.js.map +1 -0
  224. package/dist/src/elements/ia-feature-feedback/ia-feature-feedback-survey-comment.d.ts +99 -0
  225. package/dist/src/elements/ia-feature-feedback/ia-feature-feedback-survey-comment.d.ts.map +1 -0
  226. package/dist/src/elements/ia-feature-feedback/ia-feature-feedback-survey-comment.js +224 -0
  227. package/dist/src/elements/ia-feature-feedback/ia-feature-feedback-survey-comment.js.map +1 -0
  228. package/dist/src/elements/ia-feature-feedback/ia-feature-feedback-survey-extra.d.ts +41 -0
  229. package/dist/src/elements/ia-feature-feedback/ia-feature-feedback-survey-extra.d.ts.map +1 -0
  230. package/dist/src/elements/ia-feature-feedback/ia-feature-feedback-survey-extra.js +61 -0
  231. package/dist/src/elements/ia-feature-feedback/ia-feature-feedback-survey-extra.js.map +1 -0
  232. package/dist/src/elements/ia-feature-feedback/ia-feature-feedback-survey-vote.d.ts +141 -0
  233. package/dist/src/elements/ia-feature-feedback/ia-feature-feedback-survey-vote.d.ts.map +1 -0
  234. package/dist/src/elements/ia-feature-feedback/ia-feature-feedback-survey-vote.js +447 -0
  235. package/dist/src/elements/ia-feature-feedback/ia-feature-feedback-survey-vote.js.map +1 -0
  236. package/dist/src/elements/ia-feature-feedback/ia-feature-feedback-survey.d.ts +273 -0
  237. package/dist/src/elements/ia-feature-feedback/ia-feature-feedback-survey.d.ts.map +1 -0
  238. package/dist/src/elements/ia-feature-feedback/ia-feature-feedback-survey.js +879 -0
  239. package/dist/src/elements/ia-feature-feedback/ia-feature-feedback-survey.js.map +1 -0
  240. package/dist/src/elements/ia-feature-feedback/ia-feature-feedback.d.ts +100 -0
  241. package/dist/src/elements/ia-feature-feedback/ia-feature-feedback.d.ts.map +1 -0
  242. package/dist/src/elements/ia-feature-feedback/ia-feature-feedback.js +779 -0
  243. package/dist/src/elements/ia-feature-feedback/ia-feature-feedback.js.map +1 -0
  244. package/dist/src/elements/ia-feature-feedback/mocks/mock-feature-feedback-service.d.ts +34 -0
  245. package/dist/src/elements/ia-feature-feedback/mocks/mock-feature-feedback-service.d.ts.map +1 -0
  246. package/dist/src/elements/ia-feature-feedback/mocks/mock-feature-feedback-service.js +21 -0
  247. package/dist/src/elements/ia-feature-feedback/mocks/mock-feature-feedback-service.js.map +1 -0
  248. package/dist/src/elements/ia-feature-feedback/mocks/mock-recaptcha-manager.d.ts +11 -0
  249. package/dist/src/elements/ia-feature-feedback/mocks/mock-recaptcha-manager.d.ts.map +1 -0
  250. package/dist/src/elements/ia-feature-feedback/mocks/mock-recaptcha-manager.js +11 -0
  251. package/dist/src/elements/ia-feature-feedback/mocks/mock-recaptcha-manager.js.map +1 -0
  252. package/dist/src/elements/ia-feature-feedback/mocks/mock-recaptcha-widget.d.ts +5 -0
  253. package/dist/src/elements/ia-feature-feedback/mocks/mock-recaptcha-widget.d.ts.map +1 -0
  254. package/dist/src/elements/ia-feature-feedback/mocks/mock-recaptcha-widget.js +6 -0
  255. package/dist/src/elements/ia-feature-feedback/mocks/mock-recaptcha-widget.js.map +1 -0
  256. package/dist/src/elements/ia-feature-feedback/models.d.ts +109 -0
  257. package/dist/src/elements/ia-feature-feedback/models.d.ts.map +1 -0
  258. package/dist/src/elements/ia-feature-feedback/models.js +31 -0
  259. package/dist/src/elements/ia-feature-feedback/models.js.map +1 -0
  260. package/dist/src/elements/ia-feature-feedback/utils/timed-promise.d.ts +29 -0
  261. package/dist/src/elements/ia-feature-feedback/utils/timed-promise.d.ts.map +1 -0
  262. package/dist/src/elements/ia-feature-feedback/utils/timed-promise.js +32 -0
  263. package/dist/src/elements/ia-feature-feedback/utils/timed-promise.js.map +1 -0
  264. package/dist/src/elements/ia-topnav/dropdown-menu.d.ts +1 -1
  265. package/dist/src/elements/ia-topnav/ia-topnav-media-menu.d.ts +1 -1
  266. package/dist/src/elements/ia-topnav/ia-topnav-primary-nav.d.ts.map +1 -1
  267. package/dist/src/elements/ia-topnav/ia-topnav-primary-nav.js +7 -4
  268. package/dist/src/elements/ia-topnav/ia-topnav-primary-nav.js.map +1 -1
  269. package/dist/src/locales/es.d.ts +31 -0
  270. package/dist/src/locales/es.d.ts.map +1 -1
  271. package/dist/src/locales/es.js +31 -0
  272. package/dist/src/locales/es.js.map +1 -1
  273. package/package.json +5 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ia-donation-upsell-modal-content.js","sourceRoot":"","sources":["../../../../../src/elements/ia-donation-form/modals/ia-donation-upsell-modal-content.ts"],"names":[],"mappings":";AAAA,OAAO,EACL,GAAG,EACH,IAAI,EACJ,UAAU,EACV,OAAO,GAGR,MAAM,KAAK,CAAC;AACb,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,aAAa,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,CAAC,kCAAkC,CAAC;GACrC,4BAA4B,CAqSxC","sourcesContent":["import {\n css,\n html,\n LitElement,\n nothing,\n type CSSResultGroup,\n type TemplateResult,\n} from 'lit';\nimport { property, query } from 'lit/decorators.js';\nimport { customElement } from '@src/util/custom-element';\nimport { msg } from '@lit/localize';\n\nimport themeStyles from '@src/themes/theme-styles';\nimport { CurrencyValidator } from '../currency-validator';\n\n/** How the \"yes\" side of the upsell is offered: our own button, or a slot for the PayPal button. */\nexport const UpsellModalCTAMode = {\n YesButton: 'YesButton',\n PayPalUpsellSlot: 'PayPalUpsellSlot',\n} as const;\n\nexport type UpsellModalCTAMode =\n (typeof UpsellModalCTAMode)[keyof typeof UpsellModalCTAMode];\n\n/**\n * The content of the upsell modal shown after a one-time donation: a thank\n * you, a monthly amount field, and a yes button (or the PayPal button, when\n * the donation came through PayPal).\n */\n@customElement('ia-donation-upsell-modal-content')\nexport class IADonationUpsellModalContent extends LitElement {\n @property({ type: String }) yesButtonMode: UpsellModalCTAMode =\n UpsellModalCTAMode.YesButton;\n\n @property({ type: Number }) amount = 5;\n\n @property({ type: Object }) error?: TemplateResult;\n\n @query('#amount-input') amountInput!: HTMLInputElement;\n\n private currencyValidator: CurrencyValidator = new CurrencyValidator();\n\n render(): TemplateResult {\n return html`\n <h3>${msg('Thank you for donating!')}</h3>\n <button @click=${this.noThanksSelected} class=\"cta-button\" id=\"no-button\">\n ${msg('Continue')}\n </button>\n <p class=\"or_separator\"><span>${msg('or')}</span></p>\n <h3>${msg('Join our Monthly Giving Circle')}</h3>\n <p class=\"appeal\">\n ${msg('Monthly support helps us reliably plan for the future.')}\n </p>\n <div class=\"monthly-amount\">\n <h1>${msg('Enter your monthly amount')}</h1>\n <div class=\"amount-input\">\n <span class=\"dollar-symbol\">$</span>\n <input\n id=\"amount-input\"\n type=\"text\"\n tabindex=\"0\"\n aria-label=${msg('Monthly amount in dollars')}\n value=${this.amount}\n @input=${this.amountChanged}\n @keydown=${this.currencyValidator.keydown}\n />\n </div>\n <div class=\"error ${this.error ? '' : 'hidden'}\">${this.error}</div>\n </div>\n\n ${this.yesButton}\n `;\n }\n\n private get yesButton(): TemplateResult | typeof nothing {\n switch (this.yesButtonMode) {\n case UpsellModalCTAMode.YesButton:\n return html`\n <button\n class=\"cta-button\"\n tabindex=\"0\"\n id=\"yes-button\"\n @click=${this.yesSelected}\n .disabled=${this.error !== undefined}\n >\n ${msg(\"YES, I'll donate monthly\")}\n </button>\n `;\n case UpsellModalCTAMode.PayPalUpsellSlot:\n return html`\n <div class=\"paypal-upsell-slot-container\">\n <div\n class=\"paypal-upsell-slot-blocker ${this.error ? '' : 'hidden'}\"\n ></div>\n <button class=\"cta-button\" id=\"paypal-cover-button\">\n ${msg(\"YES, I'll donate monthly\")}\n </button>\n <slot class=\"paypal-upsell-slot\"></slot>\n </div>\n `;\n default:\n return nothing;\n }\n }\n\n private amountChanged(e: Event): void {\n const target = e.target as HTMLInputElement;\n const amount = target.value;\n if (amount.length === 0) {\n return;\n }\n this.handleCustomAmountInput(amount);\n }\n\n private handleCustomAmountInput(value: string): void {\n const amount = parseFloat(value);\n if (isNaN(amount)) {\n this.error = html`${msg('Please enter a valid amount.')}`;\n } else {\n this.processAmount(amount);\n }\n }\n\n private processAmount(amount: number): void {\n if (amount >= 10000) {\n this.error = msg(html`\n To make a donation of $10,000 or more, please contact our philanthropy\n department at\n <a href=\"mailto:donations@archive.org\">donations@archive.org</a>\n `);\n return;\n }\n\n if (amount < 1) {\n if (this.amountInput && this.amountInput.value.length > 0) {\n this.error = html`${msg('The minimum donation amount is $1.')}`;\n }\n return;\n }\n\n this.error = undefined;\n\n this.amount = amount;\n\n const event = new CustomEvent('amountChanged', {\n detail: { amount: this.amount },\n });\n this.dispatchEvent(event);\n }\n\n private yesSelected(): void {\n const event = new CustomEvent('yesSelected', {\n detail: { amount: this.amount },\n });\n this.dispatchEvent(event);\n }\n\n private noThanksSelected(): void {\n this.dispatchEvent(new Event('noThanksSelected'));\n }\n\n static get styles(): CSSResultGroup {\n return [\n themeStyles,\n css`\n :host {\n --donation-upsell-base-font-size--: var(\n --ia-donation-form-base-font-size,\n 10px\n );\n --donation-upsell-cta-color--: var(\n --ia-donation-upsell-cta-button-color,\n var(--navy-blue)\n );\n --donation-upsell-cta-disabled-color--: var(\n --ia-donation-upsell-cta-button-disabled-color,\n rgba(109, 148, 201, 0.5)\n );\n /* Shifts the amount field left a little so the dollar sign and field read as centred */\n --donation-upsell-amount-input-offset--: var(\n --ia-donation-upsell-amount-input-offset,\n calc(var(--donation-upsell-base-font-size--) * -1)\n );\n --donation-upsell-error-color--: var(--color-danger);\n }\n\n .monthly-amount {\n background-color: var(--true-white);\n padding: var(--padding-sm) 0.625rem;\n border-radius: 5px;\n text-align: center;\n margin-bottom: var(--padding-sm);\n margin-top: 0;\n }\n\n .monthly-amount h1 {\n font-size: calc(var(--donation-upsell-base-font-size--) * 1.8);\n font-weight: bold;\n text-align: center;\n line-height: 1.2em;\n margin: 0;\n padding: var(--padding-sm) 0 0 0;\n }\n\n .hidden {\n display: none;\n }\n\n h3 {\n text-align: center;\n font-size: calc(var(--donation-upsell-base-font-size--) * 1.8);\n margin: 0 var(--donation-upsell-base-font-size--) var(--padding-sm)\n var(--donation-upsell-base-font-size--);\n }\n\n .appeal {\n text-align: center;\n font-size: calc(var(--donation-upsell-base-font-size--) * 1.6);\n margin: var(--padding-sm) var(--donation-upsell-base-font-size--);\n }\n\n .amount-input {\n transform: translate(var(--donation-upsell-amount-input-offset--), 0);\n }\n\n .amount-input .dollar-symbol {\n font-size: calc(var(--donation-upsell-base-font-size--) * 1.8);\n font-weight: bold;\n }\n\n .amount-input input {\n width: 100px;\n text-align: center;\n border: none;\n border-bottom: 1px solid gray;\n font-weight: bold;\n font-size: calc(var(--donation-upsell-base-font-size--) * 3.4);\n }\n\n .cta-button {\n font-size: calc(var(--donation-upsell-base-font-size--) * 2);\n display: block;\n width: 100%;\n margin-top: var(--padding-sm);\n padding: var(--donation-upsell-base-font-size--)\n calc(var(--donation-upsell-base-font-size--) * 2);\n background-color: var(--donation-upsell-cta-color--);\n color: var(--true-white);\n border-radius: 5px;\n border: 0;\n font-weight: bold;\n line-height: normal;\n outline: none;\n cursor: pointer;\n }\n\n .cta-button:disabled {\n background-color: var(--donation-upsell-cta-disabled-color--);\n cursor: not-allowed;\n }\n\n .paypal-upsell-slot {\n text-align: center;\n }\n\n .paypal-upsell-slot-blocker {\n position: absolute;\n width: 100%;\n height: calc(var(--donation-upsell-base-font-size--) * 4.5);\n bottom: 0;\n z-index: 250;\n cursor: not-allowed;\n background-color: rgba(255, 255, 255, 0.5);\n }\n\n .paypal-upsell-slot-blocker.hidden {\n display: none;\n }\n\n #paypal-cover-button {\n position: absolute;\n width: 100%;\n bottom: 0;\n }\n\n .paypal-upsell-slot-container {\n position: relative;\n }\n\n .error {\n font-size: calc(var(--donation-upsell-base-font-size--) * 1.4);\n margin: var(--padding-sm) 0;\n color: var(--donation-upsell-error-color--);\n }\n\n .or_separator {\n position: relative;\n margin: 0 calc(var(--donation-upsell-base-font-size--) * 2);\n font-size: calc(var(--donation-upsell-base-font-size--) * 2.6);\n font-weight: bold;\n text-transform: uppercase;\n text-align: center;\n }\n\n .or_separator:before {\n position: absolute;\n top: calc(50% - 1px);\n right: 0;\n left: 0;\n height: 2px;\n content: '';\n background: var(--mid-gray);\n }\n\n .or_separator span {\n display: inline-block;\n position: relative;\n padding: 0 var(--donation-upsell-base-font-size--);\n background: #f5f5f7;\n }\n `,\n ];\n }\n}\n"]}
@@ -0,0 +1,2 @@
1
+ export declare const thumbsDown: import("lit").TemplateResult<2>;
2
+ //# sourceMappingURL=thumb-down.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"thumb-down.d.ts","sourceRoot":"","sources":["../../../../../../src/elements/ia-feature-feedback/assets/img/thumb-down.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,UAAU,iCAKtB,CAAC"}
@@ -0,0 +1,8 @@
1
+ import { svg } from 'lit';
2
+ export const thumbsDown = svg `
3
+ <svg viewBox="0 0 100 100"
4
+ xmlns="http://www.w3.org/2000/svg">
5
+ <path d="m51.5960452 0c5.420012 0 6.7920618 2.72313378 8.1300179 9.28391016 2.9793915 19.21608984-2.9793915 28.94849474 0 31.58229234 1.2215505 1.079857 1.8678662.7924226 3.2997314.0773518l.2153069-.1075882c2.1016905-1.0490161 5.8499713-2.8359661 14.9013153-2.8359661l2.3393989.00075c14.0694555.01425 14.2569231.29925 18.0062757 5.99925 0 3.2648986.9924719 9.5-3.9698878 9.5 4.9623597 0 7.9397755 15.5 0 15.5 7.9397755 0 6.9473035 15.5-.9924719 15.5 7.9397754 0 5.9548316 12 2.9774158 13-1.1342536.5714286-1.9876793 1.0011812-2.627102 1.3222794l-.3279542.1645673c-1.5889262.796641-1.5747062.7780161-1.4530457.6832252l.0244872-.0190992c.0041709-.0032756.0083532-.0065808.0124967-.0098908l.0239934-.0197196c.1060465-.0904428.1029348-.1457697-1.111471.3786377h-55.0821921c-3.3082398-3.0266004-4.9623597-5.0266004-4.9623597-6v-33.4737525c5.5882429-8.3508317 10.6469206-21.2754909 15.1760333-38.7739777v-17.92948326c0-2.54852436 1.8066707-3.82278654 5.4200119-3.82278654zm-27.5960452 56c2.209139 0 4 1.790861 4 4v36c0 2.209139-1.790861 4-4 4h-20c-2.209139 0-4-1.790861-4-4v-36c0-2.209139 1.790861-4 4-4z" fill-rule="evenodd" transform="matrix(-1 0 0 -1 100 100)"/>
6
+ </svg>
7
+ `;
8
+ //# sourceMappingURL=thumb-down.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"thumb-down.js","sourceRoot":"","sources":["../../../../../../src/elements/ia-feature-feedback/assets/img/thumb-down.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,MAAM,CAAC,MAAM,UAAU,GAAG,GAAG,CAAA;;;;;CAK5B,CAAC","sourcesContent":["import { svg } from 'lit';\n\nexport const thumbsDown = svg`\n<svg viewBox=\"0 0 100 100\"\n xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"m51.5960452 0c5.420012 0 6.7920618 2.72313378 8.1300179 9.28391016 2.9793915 19.21608984-2.9793915 28.94849474 0 31.58229234 1.2215505 1.079857 1.8678662.7924226 3.2997314.0773518l.2153069-.1075882c2.1016905-1.0490161 5.8499713-2.8359661 14.9013153-2.8359661l2.3393989.00075c14.0694555.01425 14.2569231.29925 18.0062757 5.99925 0 3.2648986.9924719 9.5-3.9698878 9.5 4.9623597 0 7.9397755 15.5 0 15.5 7.9397755 0 6.9473035 15.5-.9924719 15.5 7.9397754 0 5.9548316 12 2.9774158 13-1.1342536.5714286-1.9876793 1.0011812-2.627102 1.3222794l-.3279542.1645673c-1.5889262.796641-1.5747062.7780161-1.4530457.6832252l.0244872-.0190992c.0041709-.0032756.0083532-.0065808.0124967-.0098908l.0239934-.0197196c.1060465-.0904428.1029348-.1457697-1.111471.3786377h-55.0821921c-3.3082398-3.0266004-4.9623597-5.0266004-4.9623597-6v-33.4737525c5.5882429-8.3508317 10.6469206-21.2754909 15.1760333-38.7739777v-17.92948326c0-2.54852436 1.8066707-3.82278654 5.4200119-3.82278654zm-27.5960452 56c2.209139 0 4 1.790861 4 4v36c0 2.209139-1.790861 4-4 4h-20c-2.209139 0-4-1.790861-4-4v-36c0-2.209139 1.790861-4 4-4z\" fill-rule=\"evenodd\" transform=\"matrix(-1 0 0 -1 100 100)\"/>\n</svg>\n`;\n"]}
@@ -0,0 +1,2 @@
1
+ export declare const thumbsUp: import("lit").TemplateResult<2>;
2
+ //# sourceMappingURL=thumb-up.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"thumb-up.d.ts","sourceRoot":"","sources":["../../../../../../src/elements/ia-feature-feedback/assets/img/thumb-up.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,QAAQ,iCACipC,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { svg } from 'lit';
2
+ export const thumbsUp = svg `
3
+ <svg viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"><path d="m51.5960452 0c5.420012 0 6.7920618 2.72313378 8.1300179 9.28391016 2.9793915 19.21608984-2.9793915 28.94849474 0 31.58229234 1.2215505 1.079857 1.8678662.7924226 3.2997314.0773518l.2153069-.1075882c2.1016905-1.0490161 5.8499713-2.8359661 14.9013153-2.8359661l2.3393989.00075c14.0694555.01425 14.2569231.29925 18.0062757 5.99925 0 3.2648986.9924719 9.5-3.9698878 9.5 4.9623597 0 7.9397755 15.5 0 15.5 7.9397755 0 6.9473035 15.5-.9924719 15.5 7.9397754 0 5.9548316 12 2.9774158 13-1.1342536.5714286-1.9876793 1.0011812-2.627102 1.3222794l-.3279542.1645673c-1.5889262.796641-1.5747062.7780161-1.4530457.6832252l.0244872-.0190992c.0041709-.0032756.0083532-.0065808.0124967-.0098908l.0239934-.0197196c.1060465-.0904428.1029348-.1457697-1.111471.3786377h-55.0821921c-3.3082398-3.0266004-4.9623597-5.0266004-4.9623597-6v-33.4737525c5.5882429-8.3508317 10.6469206-21.2754909 15.1760333-38.7739777v-17.92948326c0-2.54852436 1.8066707-3.82278654 5.4200119-3.82278654zm-27.5960452 56c2.209139 0 4 1.790861 4 4v36c0 2.209139-1.790861 4-4 4h-20c-2.209139 0-4-1.790861-4-4v-36c0-2.209139 1.790861-4 4-4z" fill-rule="evenodd"/></svg>`;
4
+ //# sourceMappingURL=thumb-up.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"thumb-up.js","sourceRoot":"","sources":["../../../../../../src/elements/ia-feature-feedback/assets/img/thumb-up.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,MAAM,CAAC,MAAM,QAAQ,GAAG,GAAG,CAAA;sqCAC2oC,CAAC","sourcesContent":["import { svg } from 'lit';\n\nexport const thumbsUp = svg`\n<svg viewBox=\"0 0 100 100\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"m51.5960452 0c5.420012 0 6.7920618 2.72313378 8.1300179 9.28391016 2.9793915 19.21608984-2.9793915 28.94849474 0 31.58229234 1.2215505 1.079857 1.8678662.7924226 3.2997314.0773518l.2153069-.1075882c2.1016905-1.0490161 5.8499713-2.8359661 14.9013153-2.8359661l2.3393989.00075c14.0694555.01425 14.2569231.29925 18.0062757 5.99925 0 3.2648986.9924719 9.5-3.9698878 9.5 4.9623597 0 7.9397755 15.5 0 15.5 7.9397755 0 6.9473035 15.5-.9924719 15.5 7.9397754 0 5.9548316 12 2.9774158 13-1.1342536.5714286-1.9876793 1.0011812-2.627102 1.3222794l-.3279542.1645673c-1.5889262.796641-1.5747062.7780161-1.4530457.6832252l.0244872-.0190992c.0041709-.0032756.0083532-.0065808.0124967-.0098908l.0239934-.0197196c.1060465-.0904428.1029348-.1457697-1.111471.3786377h-55.0821921c-3.3082398-3.0266004-4.9623597-5.0266004-4.9623597-6v-33.4737525c5.5882429-8.3508317 10.6469206-21.2754909 15.1760333-38.7739777v-17.92948326c0-2.54852436 1.8066707-3.82278654 5.4200119-3.82278654zm-27.5960452 56c2.209139 0 4 1.790861 4 4v36c0 2.209139-1.790861 4-4 4h-20c-2.209139 0-4-1.790861-4-4v-36c0-2.209139 1.790861-4 4-4z\" fill-rule=\"evenodd\"/></svg>`;\n"]}
@@ -0,0 +1,54 @@
1
+ import type { Result } from '../../services/result-type/result-type.js';
2
+ import type { IASurveyQuestionResponse, Vote } from './models.js';
3
+ export interface FeatureFeedbackServiceInterface {
4
+ /**
5
+ * Submits a feedback entry to the configured service URL.
6
+ * @param options Details about the survey:
7
+ * - `featureIdentifier`: Internal identifier for the feature being rated
8
+ * - `vote`: The up/down rating for the feature
9
+ * - `comments`: (Optional) A text comment about the feature
10
+ * - `recaptchaToken`: Token generated by the ReCAPTCHA service
11
+ */
12
+ submitFeedback(options: {
13
+ featureIdentifier: string;
14
+ vote: Vote;
15
+ comments?: string;
16
+ recaptchaToken: string;
17
+ }): Promise<Result<boolean, Error>>;
18
+ /**
19
+ * Submits a set of survey responses to the configured service URL.
20
+ * @param options Details about the survey:
21
+ * - `surveyIdentifier`: Internal identifier of the survey to be submitted
22
+ * - `responses`: List of responses to the survey questions
23
+ * - `recaptchaToken`: Token generated by the ReCAPTCHA service
24
+ */
25
+ submitSurvey(options: {
26
+ surveyIdentifier: string;
27
+ responses: IASurveyQuestionResponse[];
28
+ recaptchaToken: string;
29
+ }): Promise<Result<boolean, Error>>;
30
+ }
31
+ export declare class FeatureFeedbackService implements FeatureFeedbackServiceInterface {
32
+ private serviceUrl;
33
+ constructor(options: {
34
+ serviceUrl: string;
35
+ });
36
+ /**
37
+ * @inheritdoc
38
+ */
39
+ submitFeedback(options: {
40
+ featureIdentifier: string;
41
+ vote: Vote;
42
+ comments?: string | undefined;
43
+ recaptchaToken: string;
44
+ }): Promise<Result<boolean, Error>>;
45
+ /**
46
+ * @inheritdoc
47
+ */
48
+ submitSurvey(options: {
49
+ surveyIdentifier: string;
50
+ responses: IASurveyQuestionResponse[];
51
+ recaptchaToken: string;
52
+ }): Promise<Result<boolean, Error>>;
53
+ }
54
+ //# sourceMappingURL=feature-feedback-service.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"feature-feedback-service.d.ts","sourceRoot":"","sources":["../../../../src/elements/ia-feature-feedback/feature-feedback-service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,uCAAuC,CAAC;AACpE,OAAO,KAAK,EAAE,wBAAwB,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAE/D,MAAM,WAAW,+BAA+B;IAC9C;;;;;;;OAOG;IACH,cAAc,CAAC,OAAO,EAAE;QACtB,iBAAiB,EAAE,MAAM,CAAC;QAC1B,IAAI,EAAE,IAAI,CAAC;QACX,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,cAAc,EAAE,MAAM,CAAC;KACxB,GAAG,OAAO,CAAC,MAAM,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC,CAAC;IAEpC;;;;;;OAMG;IACH,YAAY,CAAC,OAAO,EAAE;QACpB,gBAAgB,EAAE,MAAM,CAAC;QACzB,SAAS,EAAE,wBAAwB,EAAE,CAAC;QACtC,cAAc,EAAE,MAAM,CAAC;KACxB,GAAG,OAAO,CAAC,MAAM,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC,CAAC;CACrC;AAED,qBAAa,sBAAuB,YAAW,+BAA+B;IAC5E,OAAO,CAAC,UAAU,CAAS;gBAEf,OAAO,EAAE;QAAE,UAAU,EAAE,MAAM,CAAA;KAAE;IAI3C;;OAEG;IACG,cAAc,CAAC,OAAO,EAAE;QAC5B,iBAAiB,EAAE,MAAM,CAAC;QAC1B,IAAI,EAAE,IAAI,CAAC;QACX,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;QAC9B,cAAc,EAAE,MAAM,CAAC;KACxB,GAAG,OAAO,CAAC,MAAM,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;IA6BnC;;OAEG;IACG,YAAY,CAAC,OAAO,EAAE;QAC1B,gBAAgB,EAAE,MAAM,CAAC;QACzB,SAAS,EAAE,wBAAwB,EAAE,CAAC;QACtC,cAAc,EAAE,MAAM,CAAC;KACxB,GAAG,OAAO,CAAC,MAAM,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;CAoCpC"}
@@ -0,0 +1,79 @@
1
+ export class FeatureFeedbackService {
2
+ constructor(options) {
3
+ this.serviceUrl = options.serviceUrl;
4
+ }
5
+ /**
6
+ * @inheritdoc
7
+ */
8
+ async submitFeedback(options) {
9
+ const url = new URL(this.serviceUrl);
10
+ url.searchParams.append('featureId', options.featureIdentifier);
11
+ url.searchParams.append('rating', options.vote);
12
+ if (options.comments) {
13
+ url.searchParams.append('comment', options.comments);
14
+ }
15
+ url.searchParams.append('token', options.recaptchaToken);
16
+ try {
17
+ const response = await fetch(url.href);
18
+ const json = await response.json();
19
+ return json;
20
+ }
21
+ catch (error) {
22
+ let err;
23
+ if (error instanceof Error) {
24
+ err = error;
25
+ }
26
+ else if (typeof error === 'string') {
27
+ err = new Error(error);
28
+ }
29
+ else {
30
+ err = new Error('Unknown error');
31
+ }
32
+ return {
33
+ success: false,
34
+ error: err,
35
+ };
36
+ }
37
+ }
38
+ /**
39
+ * @inheritdoc
40
+ */
41
+ async submitSurvey(options) {
42
+ const url = new URL(this.serviceUrl);
43
+ url.searchParams.append('surveyId', options.surveyIdentifier);
44
+ url.searchParams.append('token', options.recaptchaToken);
45
+ const body = JSON.stringify({
46
+ surveyResponses: options.responses.map((resp) => ({
47
+ name: resp.name,
48
+ ...(resp.rating ? { rating: resp.rating } : {}),
49
+ ...(resp.comment ? { comment: resp.comment } : {}),
50
+ })),
51
+ });
52
+ try {
53
+ const response = await fetch(url.href, {
54
+ method: 'POST',
55
+ headers: { 'Content-Type': 'application/json' },
56
+ body,
57
+ });
58
+ const json = await response.json();
59
+ return json;
60
+ }
61
+ catch (error) {
62
+ let err;
63
+ if (error instanceof Error) {
64
+ err = error;
65
+ }
66
+ else if (typeof error === 'string') {
67
+ err = new Error(error);
68
+ }
69
+ else {
70
+ err = new Error('Unknown error');
71
+ }
72
+ return {
73
+ success: false,
74
+ error: err,
75
+ };
76
+ }
77
+ }
78
+ }
79
+ //# sourceMappingURL=feature-feedback-service.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"feature-feedback-service.js","sourceRoot":"","sources":["../../../../src/elements/ia-feature-feedback/feature-feedback-service.ts"],"names":[],"mappings":"AAiCA,MAAM,OAAO,sBAAsB;IAGjC,YAAY,OAA+B;QACzC,IAAI,CAAC,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC;IACvC,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,cAAc,CAAC,OAKpB;QACC,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QACrC,GAAG,CAAC,YAAY,CAAC,MAAM,CAAC,WAAW,EAAE,OAAO,CAAC,iBAAiB,CAAC,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Response, Vote } from './models';\n\nexport interface FeatureFeedbackServiceInterface {\n /**\n * Submits a feedback entry to the configured service URL.\n * @param options Details about the survey:\n * - `featureIdentifier`: Internal identifier for the feature being rated\n * - `vote`: The up/down rating for the feature\n * - `comments`: (Optional) A text comment about the feature\n * - `recaptchaToken`: Token generated by the ReCAPTCHA service\n */\n submitFeedback(options: {\n featureIdentifier: string;\n vote: Vote;\n comments?: string;\n recaptchaToken: string;\n }): Promise<Result<boolean, Error>>;\n\n /**\n * Submits a set of survey responses to the configured service URL.\n * @param options Details about the survey:\n * - `surveyIdentifier`: Internal identifier of the survey to be submitted\n * - `responses`: List of responses to the survey questions\n * - `recaptchaToken`: Token generated by the ReCAPTCHA service\n */\n submitSurvey(options: {\n surveyIdentifier: string;\n responses: IASurveyQuestionResponse[];\n recaptchaToken: string;\n }): Promise<Result<boolean, Error>>;\n}\n\nexport class FeatureFeedbackService implements FeatureFeedbackServiceInterface {\n private serviceUrl: string;\n\n constructor(options: { serviceUrl: string }) {\n this.serviceUrl = options.serviceUrl;\n }\n\n /**\n * @inheritdoc\n */\n async submitFeedback(options: {\n featureIdentifier: string;\n vote: Vote;\n comments?: string | undefined;\n recaptchaToken: string;\n }): Promise<Result<boolean, Error>> {\n const url = new URL(this.serviceUrl);\n url.searchParams.append('featureId', options.featureIdentifier);\n url.searchParams.append('rating', options.vote);\n if (options.comments) {\n url.searchParams.append('comment', options.comments);\n }\n url.searchParams.append('token', options.recaptchaToken);\n try {\n const response = await fetch(url.href);\n const json = await response.json();\n return json as Result<boolean, Error>;\n } catch (error) {\n let err: Error;\n if (error instanceof Error) {\n err = error;\n } else if (typeof error === 'string') {\n err = new Error(error);\n } else {\n err = new Error('Unknown error');\n }\n\n return {\n success: false,\n error: err,\n };\n }\n }\n\n /**\n * @inheritdoc\n */\n async submitSurvey(options: {\n surveyIdentifier: string;\n responses: IASurveyQuestionResponse[];\n recaptchaToken: string;\n }): Promise<Result<boolean, Error>> {\n const url = new URL(this.serviceUrl);\n url.searchParams.append('surveyId', options.surveyIdentifier);\n url.searchParams.append('token', options.recaptchaToken);\n const body = JSON.stringify({\n surveyResponses: options.responses.map((resp) => ({\n name: resp.name,\n ...(resp.rating ? { rating: resp.rating } : {}),\n ...(resp.comment ? { comment: resp.comment } : {}),\n })),\n });\n\n try {\n const response = await fetch(url.href, {\n method: 'POST',\n headers: { 'Content-Type': 'application/json' },\n body,\n });\n const json = await response.json();\n return json as Result<boolean, Error>;\n } catch (error) {\n let err: Error;\n if (error instanceof Error) {\n err = error;\n } else if (typeof error === 'string') {\n err = new Error(error);\n } else {\n err = new Error('Unknown error');\n }\n\n return {\n success: false,\n error: err,\n };\n }\n }\n}\n"]}
@@ -0,0 +1,99 @@
1
+ import { CSSResultGroup, TemplateResult, LitElement, PropertyValues } from 'lit';
2
+ import { IASurveyQuestionInterface, IASurveyQuestionResponse } from './models.js';
3
+ export declare class IAFeatureFeedbackSurveyComment extends LitElement implements IASurveyQuestionInterface {
4
+ /**
5
+ * The prompt text to show for this question.
6
+ * If empty, no prompt text element will be rendered.
7
+ */
8
+ prompt: string;
9
+ /**
10
+ * The current comment text for this question.
11
+ */
12
+ value: string;
13
+ /**
14
+ * Whether this question must be answered in order to submit its parent survey.
15
+ * Default false.
16
+ */
17
+ required: boolean;
18
+ /**
19
+ * @inheritdoc
20
+ */
21
+ disabled: boolean;
22
+ /**
23
+ * Whether to omit the question number before this question's prompt text.
24
+ * If true, this question will be skipped entirely in the numbering order.
25
+ * Default false.
26
+ */
27
+ skipNumber: boolean;
28
+ /**
29
+ * Optional placeholder text to use for the comment field.
30
+ */
31
+ placeholder?: string;
32
+ /**
33
+ * The textarea holding this question's comment text.
34
+ */
35
+ private commentBox;
36
+ /**
37
+ * Default placeholder text for required respones.
38
+ */
39
+ private static get DEFAULT_PLACEHOLDER_REQUIRED();
40
+ /**
41
+ * Default placeholder text for optional responses.
42
+ */
43
+ private static get DEFAULT_PLACEHOLDER_OPTIONAL();
44
+ /**
45
+ * @inheritdoc
46
+ */
47
+ readonly visible = true;
48
+ private readonly internals;
49
+ static readonly formAssociated = true;
50
+ static shadowRootOptions: {
51
+ delegatesFocus: boolean;
52
+ clonable?: boolean;
53
+ customElementRegistry?: CustomElementRegistry;
54
+ mode: ShadowRootMode;
55
+ serializable?: boolean;
56
+ slotAssignment?: SlotAssignmentMode;
57
+ customElements?: CustomElementRegistry;
58
+ registry?: CustomElementRegistry;
59
+ };
60
+ constructor();
61
+ render(): TemplateResult<1>;
62
+ willUpdate(changed: PropertyValues): void;
63
+ /**
64
+ * @inheritdoc
65
+ */
66
+ validate(): boolean;
67
+ /**
68
+ * @inheritdoc
69
+ */
70
+ get numbered(): boolean;
71
+ /**
72
+ * @inheritdoc
73
+ */
74
+ get response(): IASurveyQuestionResponse;
75
+ /**
76
+ * Template for this question's prompt text, if applicable.
77
+ * Will be preceded by the question number, unless the `skipNumber` flag is set.
78
+ */
79
+ private get promptTextTemplate();
80
+ /**
81
+ * Template for the comment <textarea> for this question.
82
+ */
83
+ private get commentBoxTemplate();
84
+ /**
85
+ * Handler for when the value of the comments textarea changes.
86
+ */
87
+ private commentChanged;
88
+ /**
89
+ * Emits a `responseChanged` event to notify parents of a new response value.
90
+ */
91
+ private emitResponseChangedEvent;
92
+ static get styles(): CSSResultGroup;
93
+ }
94
+ declare global {
95
+ interface HTMLElementTagNameMap {
96
+ 'ia-feature-feedback-survey-comment': IAFeatureFeedbackSurveyComment;
97
+ }
98
+ }
99
+ //# sourceMappingURL=ia-feature-feedback-survey-comment.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ia-feature-feedback-survey-comment.d.ts","sourceRoot":"","sources":["../../../../src/elements/ia-feature-feedback/ia-feature-feedback-survey-comment.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,cAAc,EACd,cAAc,EACd,UAAU,EACV,cAAc,EACf,MAAM,KAAK,CAAC;AAIb,OAAO,EAAE,yBAAyB,EAAE,wBAAwB,EAAE,MAAM,UAAU,CAAC;AAE/E,qBAEa,8BACX,SAAQ,UACR,YAAW,yBAAyB;IAEpC;;;OAGG;IACyB,MAAM,SAAM;IAExC;;OAEG;IACyB,KAAK,SAAM;IAEvC;;;OAGG;IACyC,QAAQ,UAAS;IAE7D;;OAEG;IACyC,QAAQ,UAAS;IAE7D;;;;OAIG;IACyC,UAAU,UAAS;IAE/D;;OAEG;IACyB,WAAW,CAAC,EAAE,MAAM,CAAC;IAEjD;;OAEG;IACiB,OAAO,CAAC,UAAU,CAAuB;IAE7D;;OAEG;IACH,OAAO,CAAC,MAAM,KAAK,4BAA4B,GAE9C;IAED;;OAEG;IACH,OAAO,CAAC,MAAM,KAAK,4BAA4B,GAE9C;IAED;;OAEG;IACH,QAAQ,CAAC,OAAO,QAAQ;IAExB,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAC;IAE3B,MAAM,CAAC,QAAQ,CAAC,cAAc,QAAQ;IAEtC,MAAM,CAAC,iBAAiB;;;;;;;;;MAGtB;;IAWF,MAAM;IAQN,UAAU,CAAC,OAAO,EAAE,cAAc,GAAG,IAAI;IASzC;;OAEG;IACH,QAAQ;IAaR;;OAEG;IACH,IAAI,QAAQ,IAAI,OAAO,CAEtB;IAED;;OAEG;IACH,IAAI,QAAQ,IAAI,wBAAwB,CAKvC;IAED;;;OAGG;IACH,OAAO,KAAK,kBAAkB,GAQ7B;IAED;;OAEG;IACH,OAAO,KAAK,kBAAkB,GAmB7B;IAED;;OAEG;IACH,OAAO,CAAC,cAAc;IAStB;;OAEG;IACH,OAAO,CAAC,wBAAwB;IAQhC,MAAM,KAAK,MAAM,IAAI,cAAc,CA4ClC;CACF;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,oCAAoC,EAAE,8BAA8B,CAAC;KACtE;CACF"}
@@ -0,0 +1,224 @@
1
+ var IAFeatureFeedbackSurveyComment_1;
2
+ import { __decorate } from "tslib";
3
+ import { html, css, nothing, LitElement, } from 'lit';
4
+ import { property, query } from 'lit/decorators.js';
5
+ import { customElement } from '../../util/custom-element.js';
6
+ import { localized, msg } from '@lit/localize';
7
+ let IAFeatureFeedbackSurveyComment = IAFeatureFeedbackSurveyComment_1 = class IAFeatureFeedbackSurveyComment extends LitElement {
8
+ /**
9
+ * Default placeholder text for required respones.
10
+ */
11
+ static get DEFAULT_PLACEHOLDER_REQUIRED() {
12
+ return msg('Comments');
13
+ }
14
+ /**
15
+ * Default placeholder text for optional responses.
16
+ */
17
+ static get DEFAULT_PLACEHOLDER_OPTIONAL() {
18
+ return msg('Comments (optional)');
19
+ }
20
+ //
21
+ // METHODS
22
+ //
23
+ constructor() {
24
+ super();
25
+ /**
26
+ * The prompt text to show for this question.
27
+ * If empty, no prompt text element will be rendered.
28
+ */
29
+ this.prompt = '';
30
+ /**
31
+ * The current comment text for this question.
32
+ */
33
+ this.value = '';
34
+ /**
35
+ * Whether this question must be answered in order to submit its parent survey.
36
+ * Default false.
37
+ */
38
+ this.required = false;
39
+ /**
40
+ * @inheritdoc
41
+ */
42
+ this.disabled = false;
43
+ /**
44
+ * Whether to omit the question number before this question's prompt text.
45
+ * If true, this question will be skipped entirely in the numbering order.
46
+ * Default false.
47
+ */
48
+ this.skipNumber = false;
49
+ /**
50
+ * @inheritdoc
51
+ */
52
+ this.visible = true;
53
+ this.internals = this.attachInternals();
54
+ }
55
+ render() {
56
+ return html `
57
+ <div id="container">
58
+ ${this.promptTextTemplate}${this.commentBoxTemplate}
59
+ </div>
60
+ `;
61
+ }
62
+ willUpdate(changed) {
63
+ if (changed.has('required')) {
64
+ this.internals.ariaRequired = this.required.toString();
65
+ }
66
+ if (changed.has('disabled')) {
67
+ this.internals.ariaDisabled = this.disabled.toString();
68
+ }
69
+ }
70
+ /**
71
+ * @inheritdoc
72
+ */
73
+ validate() {
74
+ const isValid = !this.required || !!this.commentBox.value;
75
+ if (isValid) {
76
+ this.internals.setValidity({});
77
+ }
78
+ else {
79
+ this.internals.setValidity({ valueMissing: true }, msg('A comment is required.'));
80
+ }
81
+ return this.internals.reportValidity();
82
+ }
83
+ /**
84
+ * @inheritdoc
85
+ */
86
+ get numbered() {
87
+ return !this.skipNumber;
88
+ }
89
+ /**
90
+ * @inheritdoc
91
+ */
92
+ get response() {
93
+ return {
94
+ name: this.prompt,
95
+ comment: this.value,
96
+ };
97
+ }
98
+ /**
99
+ * Template for this question's prompt text, if applicable.
100
+ * Will be preceded by the question number, unless the `skipNumber` flag is set.
101
+ */
102
+ get promptTextTemplate() {
103
+ if (!this.prompt)
104
+ return nothing;
105
+ const numberSlot = this.numbered
106
+ ? html `<slot name="question-number"></slot>`
107
+ : nothing;
108
+ return html `<div id="prompt-text">${numberSlot}${this.prompt}</div>`;
109
+ }
110
+ /**
111
+ * Template for the comment <textarea> for this question.
112
+ */
113
+ get commentBoxTemplate() {
114
+ const defaultPlaceholder = this.required
115
+ ? IAFeatureFeedbackSurveyComment_1.DEFAULT_PLACEHOLDER_REQUIRED
116
+ : IAFeatureFeedbackSurveyComment_1.DEFAULT_PLACEHOLDER_OPTIONAL;
117
+ const placeholder = this.placeholder ?? defaultPlaceholder;
118
+ return html `
119
+ <textarea
120
+ id="comments"
121
+ tabindex="0"
122
+ placeholder=${placeholder}
123
+ aria-labelledby="prompt-text"
124
+ aria-required=${this.required}
125
+ .value=${this.value}
126
+ ?disabled=${this.disabled}
127
+ @change=${this.commentChanged}
128
+ ></textarea>
129
+ `;
130
+ }
131
+ /**
132
+ * Handler for when the value of the comments textarea changes.
133
+ */
134
+ commentChanged() {
135
+ if (this.disabled)
136
+ return;
137
+ this.value = this.commentBox.value;
138
+ if (this.value)
139
+ this.internals.setValidity({});
140
+ this.emitResponseChangedEvent();
141
+ }
142
+ /**
143
+ * Emits a `responseChanged` event to notify parents of a new response value.
144
+ */
145
+ emitResponseChangedEvent() {
146
+ this.dispatchEvent(new CustomEvent('responseChanged', {
147
+ detail: this.response,
148
+ }));
149
+ }
150
+ static get styles() {
151
+ const height = css `var(--commentHeight, 50px)`;
152
+ const resize = css `var(--commentResize, none)`;
153
+ const questionMargin = css `var(--surveyQuestionMargin, 0 0 15px 0)`;
154
+ const promptFontWeight = css `var(--featureFeedbackPromptFontWeight, bold)`;
155
+ const promptFontSize = css `var(--featureFeedbackPromptFontSize, 1.4rem)`;
156
+ return css `
157
+ #container {
158
+ margin: ${questionMargin};
159
+ }
160
+
161
+ #prompt-text {
162
+ text-align: left;
163
+ margin-bottom: 5px;
164
+ flex-grow: 1;
165
+ font-size: ${promptFontSize};
166
+ font-weight: ${promptFontWeight};
167
+ }
168
+
169
+ #comments {
170
+ width: 100%;
171
+ height: ${height};
172
+ background-color: #ffffff;
173
+ border: 1px #2c2c2c solid;
174
+ border-radius: 4px;
175
+ padding: 7px;
176
+ -webkit-box-sizing: border-box;
177
+ -moz-box-sizing: border-box;
178
+ box-sizing: border-box;
179
+ font-family: inherit;
180
+ resize: ${resize};
181
+ }
182
+
183
+ #comments::placeholder {
184
+ color: #767676;
185
+ }
186
+
187
+ :host(:invalid) #comments {
188
+ box-shadow: 0 0 4px red;
189
+ }
190
+ `;
191
+ }
192
+ };
193
+ IAFeatureFeedbackSurveyComment.formAssociated = true;
194
+ IAFeatureFeedbackSurveyComment.shadowRootOptions = {
195
+ ...LitElement.shadowRootOptions,
196
+ delegatesFocus: true,
197
+ };
198
+ __decorate([
199
+ property({ type: String })
200
+ ], IAFeatureFeedbackSurveyComment.prototype, "prompt", void 0);
201
+ __decorate([
202
+ property({ type: String })
203
+ ], IAFeatureFeedbackSurveyComment.prototype, "value", void 0);
204
+ __decorate([
205
+ property({ type: Boolean, reflect: true })
206
+ ], IAFeatureFeedbackSurveyComment.prototype, "required", void 0);
207
+ __decorate([
208
+ property({ type: Boolean, reflect: true })
209
+ ], IAFeatureFeedbackSurveyComment.prototype, "disabled", void 0);
210
+ __decorate([
211
+ property({ type: Boolean, reflect: true })
212
+ ], IAFeatureFeedbackSurveyComment.prototype, "skipNumber", void 0);
213
+ __decorate([
214
+ property({ type: String })
215
+ ], IAFeatureFeedbackSurveyComment.prototype, "placeholder", void 0);
216
+ __decorate([
217
+ query('#comments')
218
+ ], IAFeatureFeedbackSurveyComment.prototype, "commentBox", void 0);
219
+ IAFeatureFeedbackSurveyComment = IAFeatureFeedbackSurveyComment_1 = __decorate([
220
+ customElement('ia-feature-feedback-survey-comment'),
221
+ localized()
222
+ ], IAFeatureFeedbackSurveyComment);
223
+ export { IAFeatureFeedbackSurveyComment };
224
+ //# sourceMappingURL=ia-feature-feedback-survey-comment.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ia-feature-feedback-survey-comment.js","sourceRoot":"","sources":["../../../../src/elements/ia-feature-feedback/ia-feature-feedback-survey-comment.ts"],"names":[],"mappings":";;AAAA,OAAO,EACL,IAAI,EACJ,GAAG,EACH,OAAO,EAGP,UAAU,GAEX,MAAM,KAAK,CAAC;AACb,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,EAAE,SAAS,EAAE,GAAG,EAAE,MAAM,eAAe,CAAC;AAKxC,IAAM,8BAA8B,sCAApC,MAAM,8BACX,SAAQ,UAAU;IA0ClB;;OAEG;IACK,MAAM,KAAK,4BAA4B;QAC7C,OAAO,GAAG,CAAC,UAAU,CAAC,CAAC;IACzB,CAAC;IAED;;OAEG;IACK,MAAM,KAAK,4BAA4B;QAC7C,OAAO,GAAG,CAAC,qBAAqB,CAAC,CAAC;IACpC,CAAC;IAgBD,EAAE;IACF,UAAU;IACV,EAAE;IAEF;QACE,KAAK,EAAE,CAAC;QAxEV;;;WAGG;QACyB,WAAM,GAAG,EAAE,CAAC;QAExC;;WAEG;QACyB,UAAK,GAAG,EAAE,CAAC;QAEvC;;;WAGG;QACyC,aAAQ,GAAG,KAAK,CAAC;QAE7D;;WAEG;QACyC,aAAQ,GAAG,KAAK,CAAC;QAE7D;;;;WAIG;QACyC,eAAU,GAAG,KAAK,CAAC;QA0B/D;;WA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port { customElement } from '@src/util/custom-element';\nimport { localized, msg } from '@lit/localize';\nimport { IASurveyQuestionInterface, IASurveyQuestionResponse } from './models';\n\n@customElement('ia-feature-feedback-survey-comment')\n@localized()\nexport class IAFeatureFeedbackSurveyComment\n extends LitElement\n implements IASurveyQuestionInterface\n{\n /**\n * The prompt text to show for this question.\n * If empty, no prompt text element will be rendered.\n */\n @property({ type: String }) prompt = '';\n\n /**\n * The current comment text for this question.\n */\n @property({ type: String }) value = '';\n\n /**\n * Whether this question must be answered in order to submit its parent survey.\n * Default false.\n */\n @property({ type: Boolean, reflect: true }) required = false;\n\n /**\n * @inheritdoc\n */\n @property({ type: Boolean, reflect: true }) disabled = false;\n\n /**\n * Whether to omit the question number before this question's prompt text.\n * If true, this question will be skipped entirely in the numbering order.\n * Default false.\n */\n @property({ type: Boolean, reflect: true }) skipNumber = false;\n\n /**\n * Optional placeholder text to use for the comment field.\n */\n @property({ type: String }) placeholder?: string;\n\n /**\n * The textarea holding this question's comment text.\n */\n @query('#comments') private commentBox!: HTMLTextAreaElement;\n\n /**\n * Default placeholder text for required respones.\n */\n private static get DEFAULT_PLACEHOLDER_REQUIRED(): string {\n return msg('Comments');\n }\n\n /**\n * Default placeholder text for optional responses.\n */\n private static get DEFAULT_PLACEHOLDER_OPTIONAL(): string {\n return msg('Comments (optional)');\n }\n\n /**\n * @inheritdoc\n */\n readonly visible = true;\n\n private readonly internals; // ElementInternals\n\n static readonly formAssociated = true;\n\n static shadowRootOptions = {\n ...LitElement.shadowRootOptions,\n delegatesFocus: true,\n };\n\n //\n // METHODS\n //\n\n constructor() {\n super();\n this.internals = this.attachInternals();\n }\n\n render() {\n return html`\n <div id=\"container\">\n ${this.promptTextTemplate}${this.commentBoxTemplate}\n </div>\n `;\n }\n\n willUpdate(changed: PropertyValues): void {\n if (changed.has('required')) {\n this.internals.ariaRequired = this.required.toString();\n }\n if (changed.has('disabled')) {\n this.internals.ariaDisabled = this.disabled.toString();\n }\n }\n\n /**\n * @inheritdoc\n */\n validate() {\n const isValid = !this.required || !!this.commentBox.value;\n if (isValid) {\n this.internals.setValidity({});\n } else {\n this.internals.setValidity(\n { valueMissing: true },\n msg('A comment is required.'),\n );\n }\n return this.internals.reportValidity();\n }\n\n /**\n * @inheritdoc\n */\n get numbered(): boolean {\n return !this.skipNumber;\n }\n\n /**\n * @inheritdoc\n */\n get response(): IASurveyQuestionResponse {\n return {\n name: this.prompt,\n comment: this.value,\n };\n }\n\n /**\n * Template for this question's prompt text, if applicable.\n * Will be preceded by the question number, unless the `skipNumber` flag is set.\n */\n private get promptTextTemplate(): TemplateResult | typeof nothing {\n if (!this.prompt) return nothing;\n\n const numberSlot = this.numbered\n ? html`<slot name=\"question-number\"></slot>`\n : nothing;\n\n return html`<div id=\"prompt-text\">${numberSlot}${this.prompt}</div>`;\n }\n\n /**\n * Template for the comment <textarea> for this question.\n */\n private get commentBoxTemplate(): TemplateResult {\n const defaultPlaceholder = this.required\n ? IAFeatureFeedbackSurveyComment.DEFAULT_PLACEHOLDER_REQUIRED\n : IAFeatureFeedbackSurveyComment.DEFAULT_PLACEHOLDER_OPTIONAL;\n\n const placeholder = this.placeholder ?? defaultPlaceholder;\n\n return html`\n <textarea\n id=\"comments\"\n tabindex=\"0\"\n placeholder=${placeholder}\n aria-labelledby=\"prompt-text\"\n aria-required=${this.required}\n .value=${this.value}\n ?disabled=${this.disabled}\n @change=${this.commentChanged}\n ></textarea>\n `;\n }\n\n /**\n * Handler for when the value of the comments textarea changes.\n */\n private commentChanged(): void {\n if (this.disabled) return;\n\n this.value = this.commentBox.value;\n if (this.value) this.internals.setValidity({});\n\n this.emitResponseChangedEvent();\n }\n\n /**\n * Emits a `responseChanged` event to notify parents of a new response value.\n */\n private emitResponseChangedEvent(): void {\n this.dispatchEvent(\n new CustomEvent('responseChanged', {\n detail: this.response,\n }),\n );\n }\n\n static get styles(): CSSResultGroup {\n const height = css`var(--commentHeight, 50px)`;\n const resize = css`var(--commentResize, none)`;\n\n const questionMargin = css`var(--surveyQuestionMargin, 0 0 15px 0)`;\n\n const promptFontWeight = css`var(--featureFeedbackPromptFontWeight, bold)`;\n const promptFontSize = css`var(--featureFeedbackPromptFontSize, 1.4rem)`;\n\n return css`\n #container {\n margin: ${questionMargin};\n }\n\n #prompt-text {\n text-align: left;\n margin-bottom: 5px;\n flex-grow: 1;\n font-size: ${promptFontSize};\n font-weight: ${promptFontWeight};\n }\n\n #comments {\n width: 100%;\n height: ${height};\n background-color: #ffffff;\n border: 1px #2c2c2c solid;\n border-radius: 4px;\n padding: 7px;\n -webkit-box-sizing: border-box;\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n font-family: inherit;\n resize: ${resize};\n }\n\n #comments::placeholder {\n color: #767676;\n }\n\n :host(:invalid) #comments {\n box-shadow: 0 0 4px red;\n }\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'ia-feature-feedback-survey-comment': IAFeatureFeedbackSurveyComment;\n }\n}\n"]}
@@ -0,0 +1,41 @@
1
+ import { LitElement } from 'lit';
2
+ import { IASurveyQuestionInterface, IASurveyQuestionResponse } from './models.js';
3
+ export declare class IAFeatureFeedbackSurveyExtra extends LitElement implements IASurveyQuestionInterface {
4
+ /**
5
+ * The name associated with this extra info field.
6
+ */
7
+ name: string;
8
+ /**
9
+ * The value of this field to be submitted in the survey response.
10
+ */
11
+ value?: string;
12
+ /**
13
+ * @inheritdoc
14
+ */
15
+ readonly visible = false;
16
+ /**
17
+ * (Unused for extras)
18
+ * @inheritdoc
19
+ */
20
+ disabled: boolean;
21
+ protected createRenderRoot(): this;
22
+ render(): symbol;
23
+ /**
24
+ * @inheritdoc
25
+ */
26
+ validate(): boolean;
27
+ /**
28
+ * @inheritdoc
29
+ */
30
+ get numbered(): boolean;
31
+ /**
32
+ * @inheritdoc
33
+ */
34
+ get response(): IASurveyQuestionResponse;
35
+ }
36
+ declare global {
37
+ interface HTMLElementTagNameMap {
38
+ 'ia-feature-feedback-survey-extra': IAFeatureFeedbackSurveyExtra;
39
+ }
40
+ }
41
+ //# sourceMappingURL=ia-feature-feedback-survey-extra.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ia-feature-feedback-survey-extra.d.ts","sourceRoot":"","sources":["../../../../src/elements/ia-feature-feedback/ia-feature-feedback-survey-extra.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAW,MAAM,KAAK,CAAC;AAG1C,OAAO,EAAE,yBAAyB,EAAE,wBAAwB,EAAE,MAAM,UAAU,CAAC;AAE/E,qBACa,4BACX,SAAQ,UACR,YAAW,yBAAyB;IAEpC;;OAEG;IACwC,IAAI,SAAM;IAErD;;OAEG;IACwC,KAAK,CAAC,EAAE,MAAM,CAAC;IAE1D;;OAEG;IACH,QAAQ,CAAC,OAAO,SAAS;IAEzB;;;OAGG;IACH,QAAQ,UAAS;IAEjB,SAAS,CAAC,gBAAgB;IAK1B,MAAM;IAIN;;OAEG;IACH,QAAQ,IAAI,OAAO;IAInB;;OAEG;IACH,IAAI,QAAQ,IAAI,OAAO,CAEtB;IAED;;OAEG;IACH,IAAI,QAAQ,IAAI,wBAAwB,CAKvC;CACF;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,kCAAkC,EAAE,4BAA4B,CAAC;KAClE;CACF"}