@foxy.io/elements 1.60.2 → 1.60.4

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 (471) hide show
  1. package/dist/cdn/foxy-access-recovery-form.js +1 -1
  2. package/dist/cdn/foxy-address-card.js +1 -1
  3. package/dist/cdn/foxy-address-form.js +1 -1
  4. package/dist/cdn/foxy-admin-subscription-card.js +1 -1
  5. package/dist/cdn/foxy-admin-subscription-form.js +1 -1
  6. package/dist/cdn/foxy-admin-transaction-card.js +1 -1
  7. package/dist/cdn/foxy-api-browser.js +2 -2
  8. package/dist/cdn/foxy-applied-coupon-code-card.js +1 -1
  9. package/dist/cdn/foxy-applied-coupon-code-form.js +1 -1
  10. package/dist/cdn/foxy-applied-tax-card.js +1 -1
  11. package/dist/cdn/foxy-attribute-card.js +1 -1
  12. package/dist/cdn/foxy-attribute-form.js +1 -1
  13. package/dist/cdn/foxy-billing-address-card.js +1 -1
  14. package/dist/cdn/foxy-cancellation-form.js +1 -1
  15. package/dist/cdn/foxy-cart-card.js +1 -1
  16. package/dist/cdn/foxy-cart-form.js +2 -2
  17. package/dist/cdn/foxy-client-card.js +1 -1
  18. package/dist/cdn/foxy-client-form.js +1 -1
  19. package/dist/cdn/foxy-collection-page.js +1 -1
  20. package/dist/cdn/foxy-collection-pages.js +1 -1
  21. package/dist/cdn/foxy-copy-to-clipboard.js +1 -1
  22. package/dist/cdn/foxy-coupon-card.js +1 -1
  23. package/dist/cdn/foxy-coupon-code-card.js +1 -1
  24. package/dist/cdn/foxy-coupon-code-form.js +1 -1
  25. package/dist/cdn/foxy-coupon-codes-form.js +1 -1
  26. package/dist/cdn/foxy-coupon-detail-card.js +1 -1
  27. package/dist/cdn/foxy-coupon-form.js +1 -1
  28. package/dist/cdn/foxy-custom-field-card.js +1 -1
  29. package/dist/cdn/foxy-custom-field-form.js +1 -1
  30. package/dist/cdn/foxy-customer-card.js +1 -1
  31. package/dist/cdn/foxy-customer-form.js +1 -1
  32. package/dist/cdn/foxy-customer-portal-settings-form.js +1 -1
  33. package/dist/cdn/foxy-customer-portal-settings.js +1 -1
  34. package/dist/cdn/foxy-customer-portal.js +13 -13
  35. package/dist/cdn/foxy-customer.js +6 -6
  36. package/dist/cdn/foxy-customers-table.js +1 -1
  37. package/dist/cdn/foxy-discount-builder.js +1 -1
  38. package/dist/cdn/foxy-discount-card.js +1 -1
  39. package/dist/cdn/foxy-discount-detail-card.js +1 -1
  40. package/dist/cdn/foxy-donation.js +1 -1
  41. package/dist/cdn/foxy-downloadable-card.js +1 -1
  42. package/dist/cdn/foxy-downloadable-form.js +6 -6
  43. package/dist/cdn/foxy-email-template-card.js +1 -1
  44. package/dist/cdn/foxy-email-template-form.js +1 -1
  45. package/dist/cdn/foxy-error-entry-card.js +1 -1
  46. package/dist/cdn/foxy-experimental-add-to-cart-builder.js +1 -1
  47. package/dist/cdn/foxy-filter-attribute-card.js +1 -1
  48. package/dist/cdn/foxy-filter-attribute-form.js +1 -1
  49. package/dist/cdn/foxy-form-dialog.js +1 -1
  50. package/dist/cdn/foxy-generate-codes-form.js +1 -1
  51. package/dist/cdn/foxy-gift-card-card.js +1 -1
  52. package/dist/cdn/foxy-gift-card-code-card.js +1 -1
  53. package/dist/cdn/foxy-gift-card-code-form.js +1 -1
  54. package/dist/cdn/foxy-gift-card-code-log-card.js +1 -1
  55. package/dist/cdn/foxy-gift-card-codes-form.js +1 -1
  56. package/dist/cdn/foxy-gift-card-form.js +1 -1
  57. package/dist/cdn/foxy-i18n-editor.js +6 -6
  58. package/dist/cdn/foxy-i18n.js +1 -1
  59. package/dist/cdn/foxy-integration-card.js +1 -1
  60. package/dist/cdn/foxy-integration-form.js +1 -1
  61. package/dist/cdn/foxy-item-card.js +1 -1
  62. package/dist/cdn/foxy-item-category-card.js +1 -1
  63. package/dist/cdn/foxy-item-category-form.js +1 -1
  64. package/dist/cdn/foxy-item-form.js +1 -1
  65. package/dist/cdn/foxy-item-option-card.js +1 -1
  66. package/dist/cdn/foxy-item-option-form.js +1 -1
  67. package/dist/cdn/foxy-items-form.js +1 -1
  68. package/dist/cdn/foxy-native-integration-card.js +1 -1
  69. package/dist/cdn/foxy-native-integration-form.js +1 -1
  70. package/dist/cdn/foxy-pagination.js +1 -1
  71. package/dist/cdn/foxy-passkey-card.js +1 -1
  72. package/dist/cdn/foxy-passkey-form.js +1 -1
  73. package/dist/cdn/foxy-payment-card-embed.js +1 -1
  74. package/dist/cdn/foxy-payment-card.js +1 -1
  75. package/dist/cdn/foxy-payment-method-card.js +1 -1
  76. package/dist/cdn/foxy-payments-api-fraud-protection-card.js +1 -1
  77. package/dist/cdn/foxy-payments-api-fraud-protection-form.js +1 -1
  78. package/dist/cdn/foxy-payments-api-payment-method-card.js +1 -1
  79. package/dist/cdn/foxy-payments-api-payment-method-form.js +1 -1
  80. package/dist/cdn/foxy-payments-api-payment-preset-card.js +1 -1
  81. package/dist/cdn/foxy-payments-api-payment-preset-form.js +1 -1
  82. package/dist/cdn/foxy-query-builder.js +1 -1
  83. package/dist/cdn/foxy-report-form.js +1 -1
  84. package/dist/cdn/foxy-reports-table.js +6 -6
  85. package/dist/cdn/foxy-shipment-card.js +1 -1
  86. package/dist/cdn/foxy-shipping-container-card.js +1 -1
  87. package/dist/cdn/foxy-shipping-drop-type-card.js +1 -1
  88. package/dist/cdn/foxy-shipping-method-card.js +1 -1
  89. package/dist/cdn/foxy-shipping-service-card.js +1 -1
  90. package/dist/cdn/foxy-sign-in-form.js +1 -1
  91. package/dist/cdn/foxy-spinner.js +2 -2
  92. package/dist/cdn/foxy-store-card.js +1 -1
  93. package/dist/cdn/foxy-store-form.js +1 -1
  94. package/dist/cdn/foxy-store-shipping-method-form.js +1 -1
  95. package/dist/cdn/foxy-store-transaction-folder-card.js +1 -1
  96. package/dist/cdn/foxy-store-transaction-folder-form.js +1 -1
  97. package/dist/cdn/foxy-subscription-card.js +1 -1
  98. package/dist/cdn/foxy-subscription-form.js +1 -1
  99. package/dist/cdn/foxy-subscription-settings-form.js +1 -1
  100. package/dist/cdn/foxy-subscriptions-table.js +1 -1
  101. package/dist/cdn/foxy-table.js +1 -1
  102. package/dist/cdn/foxy-tax-card.js +1 -1
  103. package/dist/cdn/foxy-tax-form.js +1 -1
  104. package/dist/cdn/foxy-template-config-form.js +1 -1
  105. package/dist/cdn/foxy-template-form.js +1 -1
  106. package/dist/cdn/foxy-template-set-card.js +1 -1
  107. package/dist/cdn/foxy-template-set-form.js +1 -1
  108. package/dist/cdn/foxy-transaction-card.js +1 -1
  109. package/dist/cdn/foxy-transaction.js +1 -1
  110. package/dist/cdn/foxy-transactions-table.js +5 -5
  111. package/dist/cdn/foxy-update-payment-method-form.js +1 -1
  112. package/dist/cdn/foxy-user-card.js +1 -1
  113. package/dist/cdn/foxy-user-form.js +1 -1
  114. package/dist/cdn/foxy-user-invitation-card.js +1 -1
  115. package/dist/cdn/foxy-user-invitation-form.js +1 -1
  116. package/dist/cdn/foxy-users-table.js +1 -1
  117. package/dist/cdn/foxy-webhook-card.js +1 -1
  118. package/dist/cdn/foxy-webhook-form.js +1 -1
  119. package/dist/cdn/foxy-webhook-log-card.js +1 -1
  120. package/dist/cdn/foxy-webhook-status-card.js +1 -1
  121. package/dist/cdn/{shared-53a5212e.js → shared-008f545f.js} +1 -1
  122. package/dist/cdn/shared-011f505c.js +1 -0
  123. package/dist/cdn/{shared-affe06c0.js → shared-148b225a.js} +1 -1
  124. package/dist/cdn/{shared-56741bad.js → shared-14dccf44.js} +2 -2
  125. package/dist/cdn/{shared-8be109a9.js → shared-16ccc5a3.js} +1 -1
  126. package/dist/cdn/{shared-e9f9face.js → shared-17d649db.js} +3 -3
  127. package/dist/cdn/{shared-c59277a4.js → shared-203661bc.js} +6 -6
  128. package/dist/cdn/{shared-4ed4b075.js → shared-21aa7698.js} +1 -1
  129. package/dist/cdn/shared-318fa017.js +1 -0
  130. package/dist/cdn/{shared-f77994ad.js → shared-3bce049d.js} +1 -1
  131. package/dist/cdn/shared-3be05a73.js +1 -0
  132. package/dist/cdn/{shared-19c47f53.js → shared-3c6bd82f.js} +1 -1
  133. package/dist/cdn/{shared-91483320.js → shared-40a4e82a.js} +1 -1
  134. package/dist/cdn/{shared-cfc6735e.js → shared-419d5254.js} +1 -1
  135. package/dist/cdn/{shared-34262bb8.js → shared-41ca9c98.js} +4 -4
  136. package/dist/cdn/{shared-5dbd66e3.js → shared-442c25c1.js} +2 -2
  137. package/dist/cdn/shared-45c7e449.js +105 -0
  138. package/dist/cdn/shared-47f1af66.js +1 -0
  139. package/dist/cdn/{shared-3a61d8a6.js → shared-4a881a9d.js} +5 -5
  140. package/dist/cdn/{shared-8292d44e.js → shared-516ae1e9.js} +1 -1
  141. package/dist/cdn/shared-531e6727.js +1 -0
  142. package/dist/cdn/{shared-3fd75ee6.js → shared-54090fd9.js} +10 -10
  143. package/dist/cdn/{shared-af4f71bf.js → shared-588de3ef.js} +5 -5
  144. package/dist/cdn/shared-61ade33e.js +6 -0
  145. package/dist/cdn/shared-61c4d03e.js +1 -0
  146. package/dist/cdn/shared-64de5f0c.js +1 -0
  147. package/dist/cdn/{shared-d2f777dc.js → shared-6658a069.js} +1 -1
  148. package/dist/cdn/{shared-56278a3c.js → shared-6ea0138f.js} +1 -1
  149. package/dist/cdn/{shared-7e28c953.js → shared-704c2ffc.js} +1 -1
  150. package/dist/cdn/{shared-eb349085.js → shared-7073576b.js} +1 -1
  151. package/dist/cdn/{shared-cf1965cb.js → shared-720c03fa.js} +1 -1
  152. package/dist/cdn/{shared-18707481.js → shared-73f0cdaa.js} +1 -1
  153. package/dist/cdn/{shared-b48cd5d3.js → shared-7432504a.js} +1 -1
  154. package/dist/cdn/{shared-d8b880bb.js → shared-753a50d4.js} +17 -17
  155. package/dist/cdn/shared-819dd677.js +1 -0
  156. package/dist/cdn/{shared-98457d79.js → shared-8d330222.js} +2 -2
  157. package/dist/cdn/{shared-62ee726e.js → shared-979249a1.js} +1 -1
  158. package/dist/cdn/{shared-a8ae24f0.js → shared-9dc42d11.js} +4 -10
  159. package/dist/cdn/{shared-2fbfbe12.js → shared-9decd661.js} +1 -1
  160. package/dist/cdn/{shared-a95a66b8.js → shared-a0496f20.js} +1 -1
  161. package/dist/cdn/shared-a44f3de4.js +1 -0
  162. package/dist/cdn/{shared-48910b3f.js → shared-a534736d.js} +1 -1
  163. package/dist/cdn/{shared-0811ea40.js → shared-a5ff1e1c.js} +8 -8
  164. package/dist/cdn/{shared-32a39c0b.js → shared-a99b7519.js} +1 -1
  165. package/dist/cdn/{shared-f9c8881a.js → shared-ad84d6a4.js} +1 -1
  166. package/dist/cdn/shared-b8949649.js +1 -0
  167. package/dist/cdn/{shared-4ab85bea.js → shared-b9142668.js} +1 -1
  168. package/dist/cdn/{shared-ac536c67.js → shared-bdb50069.js} +1 -1
  169. package/dist/cdn/shared-bdf082ac.js +1 -0
  170. package/dist/cdn/shared-cc142706.js +1 -0
  171. package/dist/cdn/shared-cf151085.js +348 -0
  172. package/dist/cdn/{shared-7b15217c.js → shared-cf25faa5.js} +1 -1
  173. package/dist/cdn/{shared-091e97f3.js → shared-d412fe96.js} +1 -1
  174. package/dist/cdn/shared-d44fb24c.js +1 -0
  175. package/dist/cdn/shared-d6d5e0dd.js +1 -0
  176. package/dist/cdn/{shared-8f5c8c08.js → shared-d77ef768.js} +1 -1
  177. package/dist/cdn/{shared-a08f594b.js → shared-db9b2367.js} +2 -2
  178. package/dist/cdn/shared-e52affbe.js +1 -0
  179. package/dist/cdn/{shared-40a2705c.js → shared-ed75f74d.js} +1 -1
  180. package/dist/cdn/{shared-8062bbb8.js → shared-ee0c1d46.js} +1 -1
  181. package/dist/cdn/{shared-c066b7fd.js → shared-f2e36f0f.js} +1 -1
  182. package/dist/cdn/shared-f3538b44.js +1 -0
  183. package/dist/cdn/shared-fd2438e9.js +1 -0
  184. package/dist/cdn/translations/admin-subscription-form/en.json +0 -1
  185. package/dist/cdn/translations/customer-portal/de.json +1 -0
  186. package/dist/cdn/translations/customer-portal/en.json +1 -0
  187. package/dist/cdn/translations/customer-portal/es.json +1 -0
  188. package/dist/cdn/translations/customer-portal/fr.json +1 -0
  189. package/dist/cdn/translations/customer-portal/nl.json +1 -0
  190. package/dist/cdn/translations/customer-portal/pl.json +1 -0
  191. package/dist/cdn/translations/customer-portal/sv.json +1 -0
  192. package/dist/cdn/translations/customer-portal/zh-HK.json +1 -0
  193. package/dist/cdn/translations/payment-card/en.json +0 -1
  194. package/dist/cdn/translations/transaction/en.json +0 -1
  195. package/dist/elements/internal/InternalAsyncListControl/InternalAsyncListControl.js +12 -12
  196. package/dist/elements/internal/InternalAsyncListControl/InternalAsyncListControl.js.map +1 -1
  197. package/dist/elements/internal/InternalAsyncListControl/InternalAsyncListControlFilterOverlay.js +4 -4
  198. package/dist/elements/internal/InternalAsyncListControl/InternalAsyncListControlFilterOverlay.js.map +1 -1
  199. package/dist/elements/internal/InternalAsyncListControl/index.d.ts +1 -1
  200. package/dist/elements/internal/InternalAsyncListControl/index.js +1 -1
  201. package/dist/elements/internal/InternalAsyncListControl/index.js.map +1 -1
  202. package/dist/elements/internal/InternalBulkAddActionControl/InternalBulkAddActionControl.js +2 -2
  203. package/dist/elements/internal/InternalBulkAddActionControl/InternalBulkAddActionControl.js.map +1 -1
  204. package/dist/elements/internal/InternalBulkAddActionControl/index.d.ts +1 -1
  205. package/dist/elements/internal/InternalBulkAddActionControl/index.js +1 -1
  206. package/dist/elements/internal/InternalBulkAddActionControl/index.js.map +1 -1
  207. package/dist/elements/internal/InternalButton/InternalButton.d.ts +26 -0
  208. package/dist/elements/internal/InternalButton/InternalButton.js +379 -0
  209. package/dist/elements/internal/InternalButton/InternalButton.js.map +1 -0
  210. package/dist/elements/internal/InternalButton/index.d.ts +12 -0
  211. package/dist/elements/internal/InternalButton/index.js +9 -0
  212. package/dist/elements/internal/InternalButton/index.js.map +1 -0
  213. package/dist/elements/internal/InternalCalendar/InternalCalendar.js +4 -4
  214. package/dist/elements/internal/InternalCalendar/InternalCalendar.js.map +1 -1
  215. package/dist/elements/internal/InternalCalendar/index.d.ts +1 -1
  216. package/dist/elements/internal/InternalCalendar/index.js +1 -1
  217. package/dist/elements/internal/InternalCalendar/index.js.map +1 -1
  218. package/dist/elements/internal/InternalConfirmDialog/InternalConfirmDialog.js +4 -4
  219. package/dist/elements/internal/InternalConfirmDialog/InternalConfirmDialog.js.map +1 -1
  220. package/dist/elements/internal/InternalConfirmDialog/index.d.ts +1 -1
  221. package/dist/elements/internal/InternalConfirmDialog/index.js +1 -1
  222. package/dist/elements/internal/InternalConfirmDialog/index.js.map +1 -1
  223. package/dist/elements/internal/InternalDeleteControl/InternalDeleteControl.d.ts +2 -1
  224. package/dist/elements/internal/InternalDeleteControl/InternalDeleteControl.js +4 -3
  225. package/dist/elements/internal/InternalDeleteControl/InternalDeleteControl.js.map +1 -1
  226. package/dist/elements/internal/InternalDeleteControl/index.d.ts +0 -1
  227. package/dist/elements/internal/InternalDeleteControl/index.js +0 -1
  228. package/dist/elements/internal/InternalDeleteControl/index.js.map +1 -1
  229. package/dist/elements/internal/InternalForm/InternalForm.js +4 -4
  230. package/dist/elements/internal/InternalForm/InternalForm.js.map +1 -1
  231. package/dist/elements/internal/InternalForm/index.d.ts +1 -1
  232. package/dist/elements/internal/InternalForm/index.js +1 -1
  233. package/dist/elements/internal/InternalForm/index.js.map +1 -1
  234. package/dist/elements/internal/InternalPostActionControl/InternalPostActionControl.d.ts +1 -0
  235. package/dist/elements/internal/InternalPostActionControl/InternalPostActionControl.js +3 -2
  236. package/dist/elements/internal/InternalPostActionControl/InternalPostActionControl.js.map +1 -1
  237. package/dist/elements/internal/InternalPostActionControl/InternalPostActionControlDialog.js +10 -6
  238. package/dist/elements/internal/InternalPostActionControl/InternalPostActionControlDialog.js.map +1 -1
  239. package/dist/elements/internal/InternalPostActionControl/index.d.ts +1 -1
  240. package/dist/elements/internal/InternalPostActionControl/index.js +1 -1
  241. package/dist/elements/internal/InternalPostActionControl/index.js.map +1 -1
  242. package/dist/elements/internal/InternalResourcePickerControl/InternalResourcePickerControl.js +2 -2
  243. package/dist/elements/internal/InternalResourcePickerControl/InternalResourcePickerControl.js.map +1 -1
  244. package/dist/elements/internal/InternalResourcePickerControl/index.d.ts +1 -1
  245. package/dist/elements/internal/InternalResourcePickerControl/index.js +1 -1
  246. package/dist/elements/internal/InternalResourcePickerControl/index.js.map +1 -1
  247. package/dist/elements/internal/InternalSubmitControl/InternalSubmitControl.d.ts +1 -1
  248. package/dist/elements/internal/InternalSubmitControl/InternalSubmitControl.js +3 -3
  249. package/dist/elements/internal/InternalSubmitControl/InternalSubmitControl.js.map +1 -1
  250. package/dist/elements/internal/InternalSubmitControl/index.d.ts +1 -1
  251. package/dist/elements/internal/InternalSubmitControl/index.js +1 -1
  252. package/dist/elements/internal/InternalSubmitControl/index.js.map +1 -1
  253. package/dist/elements/internal/InternalUndoControl/InternalUndoControl.d.ts +1 -1
  254. package/dist/elements/internal/InternalUndoControl/InternalUndoControl.js +3 -3
  255. package/dist/elements/internal/InternalUndoControl/InternalUndoControl.js.map +1 -1
  256. package/dist/elements/internal/InternalUndoControl/index.d.ts +1 -1
  257. package/dist/elements/internal/InternalUndoControl/index.js +1 -1
  258. package/dist/elements/internal/InternalUndoControl/index.js.map +1 -1
  259. package/dist/elements/private/Dialog/Dialog.d.ts +1 -0
  260. package/dist/elements/private/Dialog/Dialog.js +5 -4
  261. package/dist/elements/private/Dialog/Dialog.js.map +1 -1
  262. package/dist/elements/private/ErrorScreen/ErrorScreen.d.ts +1 -0
  263. package/dist/elements/private/ErrorScreen/ErrorScreen.js +4 -4
  264. package/dist/elements/private/ErrorScreen/ErrorScreen.js.map +1 -1
  265. package/dist/elements/public/AccessRecoveryForm/AccessRecoveryForm.js +4 -4
  266. package/dist/elements/public/AccessRecoveryForm/AccessRecoveryForm.js.map +1 -1
  267. package/dist/elements/public/AccessRecoveryForm/index.d.ts +1 -1
  268. package/dist/elements/public/AccessRecoveryForm/index.js +1 -1
  269. package/dist/elements/public/AccessRecoveryForm/index.js.map +1 -1
  270. package/dist/elements/public/AdminSubscriptionForm/internal/InternalAdminSubscriptionFormStatusAction/InternalAdminSubscriptionFormStatusAction.js +2 -2
  271. package/dist/elements/public/AdminSubscriptionForm/internal/InternalAdminSubscriptionFormStatusAction/InternalAdminSubscriptionFormStatusAction.js.map +1 -1
  272. package/dist/elements/public/AdminSubscriptionForm/internal/InternalAdminSubscriptionFormStatusAction/index.d.ts +1 -1
  273. package/dist/elements/public/AdminSubscriptionForm/internal/InternalAdminSubscriptionFormStatusAction/index.js +1 -1
  274. package/dist/elements/public/AdminSubscriptionForm/internal/InternalAdminSubscriptionFormStatusAction/index.js.map +1 -1
  275. package/dist/elements/public/AdminSubscriptionForm/internal/InternalAdminSubscriptionFormStatusActionForm/InternalAdminSubscriptionFormStatusActionForm.js +2 -2
  276. package/dist/elements/public/AdminSubscriptionForm/internal/InternalAdminSubscriptionFormStatusActionForm/InternalAdminSubscriptionFormStatusActionForm.js.map +1 -1
  277. package/dist/elements/public/AdminSubscriptionForm/internal/InternalAdminSubscriptionFormStatusActionForm/index.d.ts +1 -1
  278. package/dist/elements/public/AdminSubscriptionForm/internal/InternalAdminSubscriptionFormStatusActionForm/index.js +1 -1
  279. package/dist/elements/public/AdminSubscriptionForm/internal/InternalAdminSubscriptionFormStatusActionForm/index.js.map +1 -1
  280. package/dist/elements/public/ApiBrowser/ApiBrowser.js +12 -12
  281. package/dist/elements/public/ApiBrowser/ApiBrowser.js.map +1 -1
  282. package/dist/elements/public/ApiBrowser/index.d.ts +1 -1
  283. package/dist/elements/public/ApiBrowser/index.js +1 -1
  284. package/dist/elements/public/ApiBrowser/index.js.map +1 -1
  285. package/dist/elements/public/ApiBrowser/internal/InternalApiBrowserResourceForm/InternalApiBrowserResourceForm.js +4 -4
  286. package/dist/elements/public/ApiBrowser/internal/InternalApiBrowserResourceForm/InternalApiBrowserResourceForm.js.map +1 -1
  287. package/dist/elements/public/ApiBrowser/internal/InternalApiBrowserResourceForm/index.d.ts +1 -1
  288. package/dist/elements/public/ApiBrowser/internal/InternalApiBrowserResourceForm/index.js +1 -1
  289. package/dist/elements/public/ApiBrowser/internal/InternalApiBrowserResourceForm/index.js.map +1 -1
  290. package/dist/elements/public/CancellationForm/CancellationForm.js +3 -2
  291. package/dist/elements/public/CancellationForm/CancellationForm.js.map +1 -1
  292. package/dist/elements/public/CancellationForm/index.d.ts +1 -1
  293. package/dist/elements/public/CancellationForm/index.js +1 -1
  294. package/dist/elements/public/CancellationForm/index.js.map +1 -1
  295. package/dist/elements/public/CartForm/internal/InternalCartFormAddressSummaryItem/InternalCartFormAddressSummaryItem.js +4 -4
  296. package/dist/elements/public/CartForm/internal/InternalCartFormAddressSummaryItem/InternalCartFormAddressSummaryItem.js.map +1 -1
  297. package/dist/elements/public/CartForm/internal/InternalCartFormAddressSummaryItem/index.d.ts +1 -1
  298. package/dist/elements/public/CartForm/internal/InternalCartFormAddressSummaryItem/index.js +1 -1
  299. package/dist/elements/public/CartForm/internal/InternalCartFormAddressSummaryItem/index.js.map +1 -1
  300. package/dist/elements/public/CollectionPages/CollectionPages.js +5 -2
  301. package/dist/elements/public/CollectionPages/CollectionPages.js.map +1 -1
  302. package/dist/elements/public/CollectionPages/index.d.ts +1 -1
  303. package/dist/elements/public/CollectionPages/index.js +1 -1
  304. package/dist/elements/public/CollectionPages/index.js.map +1 -1
  305. package/dist/elements/public/CopyToClipboard/CopyToClipboard.d.ts +1 -0
  306. package/dist/elements/public/CopyToClipboard/CopyToClipboard.js +4 -2
  307. package/dist/elements/public/CopyToClipboard/CopyToClipboard.js.map +1 -1
  308. package/dist/elements/public/Customer/Customer.d.ts +1 -0
  309. package/dist/elements/public/Customer/Customer.js +10 -8
  310. package/dist/elements/public/Customer/Customer.js.map +1 -1
  311. package/dist/elements/public/Customer/index.d.ts +0 -1
  312. package/dist/elements/public/Customer/index.js +0 -1
  313. package/dist/elements/public/Customer/index.js.map +1 -1
  314. package/dist/elements/public/CustomerPortal/InternalCustomerPortalLoggedInView.js +2 -2
  315. package/dist/elements/public/CustomerPortal/InternalCustomerPortalLoggedInView.js.map +1 -1
  316. package/dist/elements/public/CustomerPortal/InternalCustomerPortalLoggedOutView.js +8 -8
  317. package/dist/elements/public/CustomerPortal/InternalCustomerPortalLoggedOutView.js.map +1 -1
  318. package/dist/elements/public/CustomerPortal/InternalCustomerPortalPasswordResetView.js +4 -4
  319. package/dist/elements/public/CustomerPortal/InternalCustomerPortalPasswordResetView.js.map +1 -1
  320. package/dist/elements/public/CustomerPortal/InternalCustomerPortalSubscriptions.js +2 -2
  321. package/dist/elements/public/CustomerPortal/InternalCustomerPortalSubscriptions.js.map +1 -1
  322. package/dist/elements/public/CustomerPortal/index.d.ts +1 -0
  323. package/dist/elements/public/CustomerPortal/index.js +3 -0
  324. package/dist/elements/public/CustomerPortal/index.js.map +1 -1
  325. package/dist/elements/public/CustomerPortalSettings/CustomerPortalSettings.d.ts +1 -1
  326. package/dist/elements/public/CustomerPortalSettings/CustomerPortalSettings.js +6 -5
  327. package/dist/elements/public/CustomerPortalSettings/CustomerPortalSettings.js.map +1 -1
  328. package/dist/elements/public/CustomerPortalSettings/private/DisallowedDates/DisallowedDates.d.ts +1 -0
  329. package/dist/elements/public/CustomerPortalSettings/private/DisallowedDates/DisallowedDates.js +4 -4
  330. package/dist/elements/public/CustomerPortalSettings/private/DisallowedDates/DisallowedDates.js.map +1 -1
  331. package/dist/elements/public/CustomerPortalSettings/private/FrequencyInput/FrequencyInput.d.ts +0 -1
  332. package/dist/elements/public/CustomerPortalSettings/private/FrequencyInput/FrequencyInput.js +0 -1
  333. package/dist/elements/public/CustomerPortalSettings/private/FrequencyInput/FrequencyInput.js.map +1 -1
  334. package/dist/elements/public/CustomerPortalSettings/private/FrequencyList/FrequencyList.d.ts +1 -0
  335. package/dist/elements/public/CustomerPortalSettings/private/FrequencyList/FrequencyList.js +4 -2
  336. package/dist/elements/public/CustomerPortalSettings/private/FrequencyList/FrequencyList.js.map +1 -1
  337. package/dist/elements/public/CustomerPortalSettings/private/FrequencyModification/FrequencyModification.d.ts +1 -1
  338. package/dist/elements/public/CustomerPortalSettings/private/FrequencyModification/FrequencyModification.js +4 -3
  339. package/dist/elements/public/CustomerPortalSettings/private/FrequencyModification/FrequencyModification.js.map +1 -1
  340. package/dist/elements/public/CustomerPortalSettings/private/NextDateModification/NextDateModification.d.ts +1 -1
  341. package/dist/elements/public/CustomerPortalSettings/private/NextDateModification/NextDateModification.js +4 -3
  342. package/dist/elements/public/CustomerPortalSettings/private/NextDateModification/NextDateModification.js.map +1 -1
  343. package/dist/elements/public/CustomerPortalSettings/private/OriginsList/OriginsList.d.ts +1 -1
  344. package/dist/elements/public/CustomerPortalSettings/private/OriginsList/OriginsList.js +4 -3
  345. package/dist/elements/public/CustomerPortalSettings/private/OriginsList/OriginsList.js.map +1 -1
  346. package/dist/elements/public/CustomerPortalSettings/private/SessionSecret/SessionSecret.d.ts +1 -0
  347. package/dist/elements/public/CustomerPortalSettings/private/SessionSecret/SessionSecret.js +4 -4
  348. package/dist/elements/public/CustomerPortalSettings/private/SessionSecret/SessionSecret.js.map +1 -1
  349. package/dist/elements/public/Donation/Donation.d.ts +1 -1
  350. package/dist/elements/public/Donation/Donation.js +4 -3
  351. package/dist/elements/public/Donation/Donation.js.map +1 -1
  352. package/dist/elements/public/EmailTemplateForm/internal/InternalEmailTemplateFormAsyncAction/InternalEmailTemplateFormAsyncAction.js +2 -2
  353. package/dist/elements/public/EmailTemplateForm/internal/InternalEmailTemplateFormAsyncAction/InternalEmailTemplateFormAsyncAction.js.map +1 -1
  354. package/dist/elements/public/EmailTemplateForm/internal/InternalEmailTemplateFormAsyncAction/index.d.ts +1 -1
  355. package/dist/elements/public/EmailTemplateForm/internal/InternalEmailTemplateFormAsyncAction/index.js +1 -1
  356. package/dist/elements/public/EmailTemplateForm/internal/InternalEmailTemplateFormAsyncAction/index.js.map +1 -1
  357. package/dist/elements/public/ExperimentalAddToCartBuilder/ExperimentalAddToCartBuilder.js +2 -2
  358. package/dist/elements/public/ExperimentalAddToCartBuilder/ExperimentalAddToCartBuilder.js.map +1 -1
  359. package/dist/elements/public/ExperimentalAddToCartBuilder/index.d.ts +1 -1
  360. package/dist/elements/public/ExperimentalAddToCartBuilder/index.js +1 -1
  361. package/dist/elements/public/ExperimentalAddToCartBuilder/index.js.map +1 -1
  362. package/dist/elements/public/ExperimentalAddToCartBuilder/internal/InternalExperimentalAddToCartBuilderItemControl/InternalExperimentalAddToCartBuilderItemControl.js +2 -2
  363. package/dist/elements/public/ExperimentalAddToCartBuilder/internal/InternalExperimentalAddToCartBuilderItemControl/InternalExperimentalAddToCartBuilderItemControl.js.map +1 -1
  364. package/dist/elements/public/ExperimentalAddToCartBuilder/internal/InternalExperimentalAddToCartBuilderItemControl/index.d.ts +1 -1
  365. package/dist/elements/public/ExperimentalAddToCartBuilder/internal/InternalExperimentalAddToCartBuilderItemControl/index.js +1 -1
  366. package/dist/elements/public/ExperimentalAddToCartBuilder/internal/InternalExperimentalAddToCartBuilderItemControl/index.js.map +1 -1
  367. package/dist/elements/public/FilterAttributeForm/FilterAttributeForm.js +4 -4
  368. package/dist/elements/public/FilterAttributeForm/FilterAttributeForm.js.map +1 -1
  369. package/dist/elements/public/FilterAttributeForm/index.d.ts +1 -1
  370. package/dist/elements/public/FilterAttributeForm/index.js +1 -1
  371. package/dist/elements/public/FilterAttributeForm/index.js.map +1 -1
  372. package/dist/elements/public/I18nEditor/internal/InternalI18nEditorEntry/InternalI18nEditorEntry.js +5 -5
  373. package/dist/elements/public/I18nEditor/internal/InternalI18nEditorEntry/InternalI18nEditorEntry.js.map +1 -1
  374. package/dist/elements/public/I18nEditor/internal/InternalI18nEditorEntry/index.d.ts +1 -1
  375. package/dist/elements/public/I18nEditor/internal/InternalI18nEditorEntry/index.js +1 -1
  376. package/dist/elements/public/I18nEditor/internal/InternalI18nEditorEntry/index.js.map +1 -1
  377. package/dist/elements/public/IntegrationForm/IntegrationForm.js +2 -2
  378. package/dist/elements/public/IntegrationForm/IntegrationForm.js.map +1 -1
  379. package/dist/elements/public/IntegrationForm/index.d.ts +1 -1
  380. package/dist/elements/public/IntegrationForm/index.js +1 -1
  381. package/dist/elements/public/IntegrationForm/index.js.map +1 -1
  382. package/dist/elements/public/ItemCard/ItemCard.js +2 -2
  383. package/dist/elements/public/ItemCard/ItemCard.js.map +1 -1
  384. package/dist/elements/public/ItemsForm/ItemsForm.d.ts +1 -1
  385. package/dist/elements/public/ItemsForm/ItemsForm.js +4 -3
  386. package/dist/elements/public/ItemsForm/ItemsForm.js.map +1 -1
  387. package/dist/elements/public/Pagination/Pagination.js +10 -10
  388. package/dist/elements/public/Pagination/Pagination.js.map +1 -1
  389. package/dist/elements/public/Pagination/index.d.ts +1 -1
  390. package/dist/elements/public/Pagination/index.js +1 -1
  391. package/dist/elements/public/Pagination/index.js.map +1 -1
  392. package/dist/elements/public/PaymentCard/PaymentCard.js +16 -5
  393. package/dist/elements/public/PaymentCard/PaymentCard.js.map +1 -1
  394. package/dist/elements/public/PaymentMethodCard/PaymentMethodCard.js +4 -4
  395. package/dist/elements/public/PaymentMethodCard/PaymentMethodCard.js.map +1 -1
  396. package/dist/elements/public/PaymentMethodCard/index.d.ts +1 -1
  397. package/dist/elements/public/PaymentMethodCard/index.js +1 -1
  398. package/dist/elements/public/PaymentMethodCard/index.js.map +1 -1
  399. package/dist/elements/public/PaymentsApiFraudProtectionForm/PaymentsApiFraudProtectionForm.js +2 -2
  400. package/dist/elements/public/PaymentsApiFraudProtectionForm/PaymentsApiFraudProtectionForm.js.map +1 -1
  401. package/dist/elements/public/PaymentsApiFraudProtectionForm/index.d.ts +1 -1
  402. package/dist/elements/public/PaymentsApiFraudProtectionForm/index.js +1 -1
  403. package/dist/elements/public/PaymentsApiFraudProtectionForm/index.js.map +1 -1
  404. package/dist/elements/public/PaymentsApiPaymentMethodForm/PaymentsApiPaymentMethodForm.js +4 -4
  405. package/dist/elements/public/PaymentsApiPaymentMethodForm/PaymentsApiPaymentMethodForm.js.map +1 -1
  406. package/dist/elements/public/PaymentsApiPaymentMethodForm/index.d.ts +1 -1
  407. package/dist/elements/public/PaymentsApiPaymentMethodForm/index.js +1 -1
  408. package/dist/elements/public/PaymentsApiPaymentMethodForm/index.js.map +1 -1
  409. package/dist/elements/public/SignInForm/SignInForm.js +4 -4
  410. package/dist/elements/public/SignInForm/SignInForm.js.map +1 -1
  411. package/dist/elements/public/SignInForm/index.d.ts +1 -1
  412. package/dist/elements/public/SignInForm/index.js +1 -1
  413. package/dist/elements/public/SignInForm/index.js.map +1 -1
  414. package/dist/elements/public/Spinner/Spinner.js +4 -4
  415. package/dist/elements/public/Spinner/Spinner.js.map +1 -1
  416. package/dist/elements/public/SubscriptionForm/index.d.ts +0 -1
  417. package/dist/elements/public/SubscriptionForm/index.js +0 -1
  418. package/dist/elements/public/SubscriptionForm/index.js.map +1 -1
  419. package/dist/elements/public/Table/Table.js +29 -20
  420. package/dist/elements/public/Table/Table.js.map +1 -1
  421. package/dist/elements/public/TemplateForm/internal/InternalTemplateFormAsyncAction/InternalTemplateFormAsyncAction.js +2 -2
  422. package/dist/elements/public/TemplateForm/internal/InternalTemplateFormAsyncAction/InternalTemplateFormAsyncAction.js.map +1 -1
  423. package/dist/elements/public/TemplateForm/internal/InternalTemplateFormAsyncAction/index.d.ts +1 -1
  424. package/dist/elements/public/TemplateForm/internal/InternalTemplateFormAsyncAction/index.js +1 -1
  425. package/dist/elements/public/TemplateForm/internal/InternalTemplateFormAsyncAction/index.js.map +1 -1
  426. package/dist/elements/public/Transaction/internal/InternalTransactionActionsControl/InternalTransactionActionsControl.js +2 -2
  427. package/dist/elements/public/Transaction/internal/InternalTransactionActionsControl/InternalTransactionActionsControl.js.map +1 -1
  428. package/dist/elements/public/Transaction/internal/InternalTransactionActionsControl/index.d.ts +1 -1
  429. package/dist/elements/public/Transaction/internal/InternalTransactionActionsControl/index.js +1 -1
  430. package/dist/elements/public/Transaction/internal/InternalTransactionActionsControl/index.js.map +1 -1
  431. package/dist/elements/public/TransactionsTable/TransactionsTable.js +1 -1
  432. package/dist/elements/public/TransactionsTable/TransactionsTable.js.map +1 -1
  433. package/dist/elements/public/UpdatePaymentMethodForm/internal/InternalUpdatePaymentMethodFormCcTokenControl/InternalUpdatePaymentMethodFormCcTokenControl.js +2 -2
  434. package/dist/elements/public/UpdatePaymentMethodForm/internal/InternalUpdatePaymentMethodFormCcTokenControl/InternalUpdatePaymentMethodFormCcTokenControl.js.map +1 -1
  435. package/dist/elements/public/UpdatePaymentMethodForm/internal/InternalUpdatePaymentMethodFormCcTokenControl/index.d.ts +1 -1
  436. package/dist/elements/public/UpdatePaymentMethodForm/internal/InternalUpdatePaymentMethodFormCcTokenControl/index.js +1 -1
  437. package/dist/elements/public/UpdatePaymentMethodForm/internal/InternalUpdatePaymentMethodFormCcTokenControl/index.js.map +1 -1
  438. package/dist/elements/public/UserInvitationForm/internal/InternalUserInvitationFormAsyncAction/InternalUserInvitationFormAsyncAction.js +2 -2
  439. package/dist/elements/public/UserInvitationForm/internal/InternalUserInvitationFormAsyncAction/InternalUserInvitationFormAsyncAction.js.map +1 -1
  440. package/dist/elements/public/UserInvitationForm/internal/InternalUserInvitationFormAsyncAction/index.d.ts +1 -1
  441. package/dist/elements/public/UserInvitationForm/internal/InternalUserInvitationFormAsyncAction/index.js +1 -1
  442. package/dist/elements/public/UserInvitationForm/internal/InternalUserInvitationFormAsyncAction/index.js.map +1 -1
  443. package/dist/elements/public/UsersTable/UsersTable.d.ts +1 -0
  444. package/dist/elements/public/UsersTable/UsersTable.js +3 -2
  445. package/dist/elements/public/UsersTable/UsersTable.js.map +1 -1
  446. package/dist/elements/public/UsersTable/index.d.ts +0 -1
  447. package/dist/elements/public/UsersTable/index.js +0 -1
  448. package/dist/elements/public/UsersTable/index.js.map +1 -1
  449. package/dist/mixins/themeable.d.ts +1 -0
  450. package/dist/mixins/themeable.js +53 -18
  451. package/dist/mixins/themeable.js.map +1 -1
  452. package/package.json +1 -1
  453. package/dist/cdn/shared-0996f4d0.js +0 -1
  454. package/dist/cdn/shared-142df717.js +0 -1
  455. package/dist/cdn/shared-1b414966.js +0 -1
  456. package/dist/cdn/shared-28cc8aa1.js +0 -1
  457. package/dist/cdn/shared-3bb289b3.js +0 -1
  458. package/dist/cdn/shared-3ef23488.js +0 -1
  459. package/dist/cdn/shared-41f93e6c.js +0 -1
  460. package/dist/cdn/shared-5b8c7250.js +0 -29
  461. package/dist/cdn/shared-5e7defee.js +0 -1
  462. package/dist/cdn/shared-6262e0d6.js +0 -1
  463. package/dist/cdn/shared-88f841ff.js +0 -1
  464. package/dist/cdn/shared-9b290320.js +0 -1
  465. package/dist/cdn/shared-c3d6bcc0.js +0 -231
  466. package/dist/cdn/shared-c56c3e1e.js +0 -1
  467. package/dist/cdn/shared-cda51ccf.js +0 -1
  468. package/dist/cdn/shared-dc6e5879.js +0 -1
  469. package/dist/cdn/shared-e2a5457f.js +0 -1
  470. package/dist/cdn/shared-e9f51baa.js +0 -1
  471. package/dist/cdn/shared-f410644a.js +0 -212
@@ -1,4 +1,4 @@
1
- import"./shared-dc6e5879.js";import{h as t,P as e}from"./shared-f410644a.js";import{F as i,t as o}from"./shared-c3d6bcc0.js";import{T as n,a,E as s}from"./shared-f77994ad.js";import"./shared-91483320.js";import{O as r}from"./shared-d8b880bb.js";import"./shared-a8ae24f0.js";import"./shared-8be109a9.js";import"./foxy-collection-page.js";import"./foxy-swipe-actions.js";import"./foxy-form-dialog.js";import"./foxy-pagination.js";import"./shared-c066b7fd.js";import{I as l}from"./shared-4ab85bea.js";import"./shared-cda51ccf.js";import{x as d}from"./shared-5b8c7250.js";import{c,h,r as u}from"./shared-ba5c42c7.js";import{_ as m}from"./shared-8f9014ff.js";import{i as p}from"./shared-53e42a77.js";import{c as _}from"./shared-4e709717.js";const f=t`<dom-module id="lumo-notification-card" theme-for="vaadin-notification-card">
1
+ import{I as t}from"./shared-45c7e449.js";import"./shared-b8949649.js";import{h as e,F as i,c as o,P as n}from"./shared-cf151085.js";import{T as a,a as s,E as r}from"./shared-3bce049d.js";import"./shared-40a4e82a.js";import{O as l}from"./shared-753a50d4.js";import"./shared-47f1af66.js";import"./shared-16ccc5a3.js";import"./foxy-collection-page.js";import"./foxy-swipe-actions.js";import"./foxy-form-dialog.js";import"./foxy-pagination.js";import"./shared-f2e36f0f.js";import{I as d}from"./shared-b9142668.js";import"./shared-819dd677.js";import{c,h,r as u}from"./shared-ba5c42c7.js";import{_ as m}from"./shared-8f9014ff.js";import{i as p}from"./shared-53e42a77.js";import{c as _}from"./shared-4e709717.js";const f=e`<dom-module id="lumo-notification-card" theme-for="vaadin-notification-card">
2
2
  <template>
3
3
  <style>
4
4
  :host {
@@ -186,7 +186,7 @@ import"./shared-dc6e5879.js";import{h as t,P as e}from"./shared-f410644a.js";imp
186
186
  Copyright (c) 2017 Vaadin Ltd.
187
187
  This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
188
188
  */
189
- class v extends(n(s(e))){static get template(){return t`
189
+ class y extends(a(r(n))){static get template(){return e`
190
190
  <style>
191
191
  :host {
192
192
  position: fixed;
@@ -253,7 +253,7 @@ class v extends(n(s(e))){static get template(){return t`
253
253
  <div region="bottom-end"><slot name="bottom-end"></slot></div>
254
254
  </div>
255
255
  <div region="bottom-stretch"><slot name="bottom-stretch"></slot></div>
256
- `}static get is(){return"vaadin-notification-container"}static get properties(){return{opened:{type:Boolean,value:!1,observer:"_openedChanged"}}}_openedChanged(t){t?(document.body.appendChild(this),document.addEventListener("vaadin-overlay-close",this._boundVaadinOverlayClose),this._boundIosResizeListener&&(this._detectIosNavbar(),window.addEventListener("resize",this._boundIosResizeListener))):(document.body.removeChild(this),document.removeEventListener("vaadin-overlay-close",this._boundVaadinOverlayClose),this._boundIosResizeListener&&window.removeEventListener("resize",this._boundIosResizeListener))}constructor(){super(),this._boundVaadinOverlayClose=this._onVaadinOverlayClose.bind(this),/iPad|iPhone|iPod/.test(navigator.userAgent)&&(this._boundIosResizeListener=()=>this._detectIosNavbar())}_detectIosNavbar(){const t=window.innerHeight,e=window.innerWidth>t,i=document.documentElement.clientHeight;this.style.bottom=e&&i>t?i-t+"px":"0"}_onVaadinOverlayClose(t){const e=t.detail.sourceEvent;e&&e.composedPath().indexOf(this)>=0&&t.preventDefault()}}class g extends(n(e)){static get template(){return t`
256
+ `}static get is(){return"vaadin-notification-container"}static get properties(){return{opened:{type:Boolean,value:!1,observer:"_openedChanged"}}}_openedChanged(t){t?(document.body.appendChild(this),document.addEventListener("vaadin-overlay-close",this._boundVaadinOverlayClose),this._boundIosResizeListener&&(this._detectIosNavbar(),window.addEventListener("resize",this._boundIosResizeListener))):(document.body.removeChild(this),document.removeEventListener("vaadin-overlay-close",this._boundVaadinOverlayClose),this._boundIosResizeListener&&window.removeEventListener("resize",this._boundIosResizeListener))}constructor(){super(),this._boundVaadinOverlayClose=this._onVaadinOverlayClose.bind(this),/iPad|iPhone|iPod/.test(navigator.userAgent)&&(this._boundIosResizeListener=()=>this._detectIosNavbar())}_detectIosNavbar(){const t=window.innerHeight,e=window.innerWidth>t,i=document.documentElement.clientHeight;this.style.bottom=e&&i>t?i-t+"px":"0"}_onVaadinOverlayClose(t){const e=t.detail.sourceEvent;e&&e.composedPath().indexOf(this)>=0&&t.preventDefault()}}class g extends(a(n)){static get template(){return e`
257
257
  <style>
258
258
  :host {
259
259
  display: block;
@@ -269,7 +269,7 @@ class v extends(n(s(e))){static get template(){return t`
269
269
  <slot></slot>
270
270
  </div>
271
271
  </div>
272
- `}static get is(){return"vaadin-notification-card"}ready(){super.ready(),this.setAttribute("role","alert"),this.setAttribute("aria-live","polite")}}class y extends(a(s(e))){static get template(){return t`
272
+ `}static get is(){return"vaadin-notification-card"}ready(){super.ready(),this.setAttribute("role","alert"),this.setAttribute("aria-live","polite")}}class v extends(s(r(n))){static get template(){return e`
273
273
  <style>
274
274
  :host {
275
275
  display: none;
@@ -277,4 +277,4 @@ class v extends(n(s(e))){static get template(){return t`
277
277
  </style>
278
278
  <vaadin-notification-card id="vaadin-notification-card" theme\$="[[theme]]">
279
279
  </vaadin-notification-card>
280
- `}static get is(){return"vaadin-notification"}static get version(){return"1.6.2"}static get properties(){return{duration:{type:Number,value:5e3},opened:{type:Boolean,value:!1,notify:!0,observer:"_openedChanged"},position:{type:String,value:"bottom-start",observer:"_positionChanged"},renderer:Function,_notificationTemplate:Object}}static get observers(){return["_durationChanged(duration, opened)","_templateOrRendererChanged(_notificationTemplate, renderer, opened)"]}ready(){super.ready(),this._observer=new i(this,(t=>{this._setTemplateFromNodes(t.addedNodes)}))}_setTemplateFromNodes(t){this._notificationTemplate=t.filter((t=>t.localName&&"template"===t.localName))[0]||this._notificationTemplate}render(){"function"==typeof this.renderer&&this.renderer(this._card,this)}_removeNewRendererOrTemplate(t,e,i,o){t!==e?this._notificationTemplate=void 0:i!==o&&(this.renderer=void 0)}_templateOrRendererChanged(t,e,i){if(t&&e)throw this._removeNewRendererOrTemplate(t,this._oldTemplate,e,this._oldRenderer),new Error("You should only use either a renderer or a template for notification content");this._oldTemplate=t;const o=this._oldRenderer!==e;if(this._oldRenderer=e,e){if(this._card=this.$["vaadin-notification-card"],o)for(;this._card.firstChild;)this._card.removeChild(this._card.firstChild);i&&(this._didAnimateNotificationAppend||this._animatedAppendNotificationCard(),this.render())}}open(){this.opened=!0}close(){this.opened=!1}get _container(){return y._container||(y._container=document.createElement("vaadin-notification-container"),document.body.appendChild(y._container)),y._container}_openedChanged(t){t?(this._container.opened=!0,this._instance||this.renderer||this._ensureTemplatized(),this._animatedAppendNotificationCard(),setTimeout((()=>this._updateShadyButtonStyles()))):this._card&&this._closeNotificationCard()}_ensureTemplatized(){if(this._notificationTemplate=this.querySelector("template")||this._notificationTemplate,!this._notificationTemplate)return;this._notificationTemplate._Templatizer||(this._notificationTemplate._Templatizer=o(this._notificationTemplate,this,{forwardHostProp:function(t,e){this._instance&&this._instance.forwardHostProp(t,e)}})),this._instance=new this._notificationTemplate._Templatizer({});const t=this._notificationTemplate.getRootNode(),e=t!==document;if(this._card=this.$["vaadin-notification-card"],this._cardContent=this._card.shadowRoot.querySelector('[part~="content"]'),e){if(this._cardContent.shadowRoot||this._cardContent.attachShadow({mode:"open"}),window.ShadyCSS&&!window.ShadyCSS.nativeShadow){var i=t.host&&t.host.localName;i&&-1===i.indexOf("-")&&(i=t.host.getAttribute("is")),i&&this._cardContent.setAttribute("is",i)}else{const e=Array.from(t.querySelectorAll("style")).reduce(((t,e)=>t+e.textContent),"").replace(/:host/g,":host-nomatch");if(e){const t=document.createElement("style");t.textContent=e,this._cardContent.shadowRoot.appendChild(t)}}this._cardContent.shadowRoot.appendChild(this._instance.root)}else this._card.appendChild(this._instance.root);this._card.setAttribute("aria-label",this._card.textContent.trim())}_animatedAppendNotificationCard(){if(this._card){this._card.setAttribute("opening",""),this._appendNotificationCard();const t=()=>{this._card.removeEventListener("animationend",t),this._card.removeAttribute("opening")};this._card.addEventListener("animationend",t),this._didAnimateNotificationAppend=!0}else this._didAnimateNotificationAppend=!1}_appendNotificationCard(){this._card&&(this._container.shadowRoot.querySelector(`slot[name="${this.position}"]`)?(this._card.slot=this.position,this._container.firstElementChild&&/top/.test(this.position)?this._container.insertBefore(this._card,this._container.firstElementChild):this._container.appendChild(this._card)):window.console.warn(`Invalid alignment parameter provided: position=${this.position}`))}_removeNotificationCard(){this._card.parentNode&&this._card.parentNode.removeChild(this._card),this._card.removeAttribute("closing"),this._container.opened=Boolean(this._container.firstElementChild)}_closeNotificationCard(){this._durationTimeoutId&&clearTimeout(this._durationTimeoutId),this._animatedRemoveNotificationCard()}_animatedRemoveNotificationCard(){this._card.setAttribute("closing","");const t=getComputedStyle(this._card).getPropertyValue("animation-name");if(t&&"none"!=t){const t=()=>{this._removeNotificationCard(),this._card.removeEventListener("animationend",t)};this._card.addEventListener("animationend",t)}else this._removeNotificationCard()}_positionChanged(t){this.opened&&this._animatedAppendNotificationCard()}_durationChanged(t,e){e&&(clearTimeout(this._durationTimeoutId),t>0&&(this._durationTimeoutId=setTimeout((()=>this.close()),t)))}_updateShadyButtonStyles(){window.ShadyCSS&&!this.__buttonStylesPending&&(customElements.whenDefined("vaadin-button").then((()=>{Array.from(this._card.querySelectorAll("*")).filter((t=>t instanceof customElements.get("vaadin-button"))).forEach((t=>{const e=["--_lumo-button-color","--_lumo-button-background-color","--_lumo-button-primary-color","--_lumo-button-primary-background-color"].reduce(((t,e)=>{const i=window.ShadyCSS.getComputedStyleValue(this._card,e);return i&&(t[e]=i),t}),{});t.updateStyles(e)})),this.__buttonStylesPending=!1})),this.__buttonStylesPending=!0)}}customElements.define(v.is,v),customElements.define(g.is,g),customElements.define(y.is,y);let b;d("vaadin-checkbox",c(b||(b=(t=>t)`:host([data-async-list-control]) label{display:flex}:host([data-async-list-control]) [part=label]{width:100%;margin:0!important}`)));let x,$=t=>t;const C=t=>class e extends t{static get properties(){return{positionTarget:{type:Object,value:null},horizontalAlign:{type:String,value:"start"},verticalAlign:{type:String,value:"top"},noHorizontalOverlap:{type:Boolean,value:!1},noVerticalOverlap:{type:Boolean,value:!1}}}static get observers(){return["__positionSettingsChanged(positionTarget, horizontalAlign, verticalAlign,\n noHorizontalOverlap, noVerticalOverlap)"]}constructor(){super();const t=this._updatePosition.bind(this);this.addEventListener("opened-changed",(e=>{const i=e.detail.value?"addEventListener":"removeEventListener";window[i]("scroll",t),window[i]("resize",t),e.detail.value&&this._updatePosition()}))}ready(){super.ready(),console.warn("PositionMixin is not considered stable and might change any time")}__positionSettingsChanged(){this._updatePosition()}_updatePosition(){if(!this.positionTarget)return;const t=getComputedStyle(this);this.__margins||(this.__margins={},["top","bottom","left","right"].forEach((e=>{this.__margins[e]=parseInt(t[e],10)})));const e="rtl"===t.direction,i=this.positionTarget.getBoundingClientRect(),o=this.__calculateHorizontalPosition(i,e),n=this.__calculateVerticalPosition(i),a=Object.assign({},o,n);this.__doSetPosition(a,e)}__calculateHorizontalPosition(t,i){const o=Math.max(this.__oldContentWidth||0,this.$.overlay.offsetWidth);this.__oldContentWidth=this.$.overlay.offsetWidth;const n=Math.min(window.innerWidth,document.documentElement.clientWidth),a=!i&&"start"===this.horizontalAlign||i&&"end"===this.horizontalAlign,s=!!this.style.left;return e.__calculatePositionInOneDimension(t,o,n,this.__margins,a,s,this.noHorizontalOverlap,{start:"left",end:"right"})}__calculateVerticalPosition(t){const i=Math.max(this.__oldContentHeight||0,this.$.overlay.offsetHeight);this.__oldContentHeight=this.$.overlay.offsetHeight;const o=Math.min(window.innerHeight,document.documentElement.clientHeight),n="top"===this.verticalAlign,a=!!this.style.top;return e.__calculatePositionInOneDimension(t,i,o,this.__margins,n,a,this.noVerticalOverlap,{start:"top",end:"bottom"})}static __calculatePositionInOneDimension(t,e,i,o,n,a,s,r){const l=i-t[s?r.end:r.start]-o[r.end],d=t[s?r.start:r.end]-o[r.start],c=n?l:d,h=n===(c>(n?d:l)||c>e),u=h?r.start:r.end,m=h?r.end:r.start,p=(h?t[s?r.end:r.start]:i-t[s?r.start:r.end])+"px",_={};return _[u]=p,_[m]="",_}__doSetPosition(t,e){Object.assign(this.style,t);const i=!e&&t.left||e&&t.right;this.style.alignItems=i?"flex-start":"flex-end",this.style.justifyContent=t.top?"flex-start":"flex-end"}};class w extends(C(r)){constructor(){super(...arguments),this.renderer=(t,e,i)=>{var o;const n=null!==(o=t.firstElementChild)&&void 0!==o?o:document.createElement("div");t.firstElementChild||t.appendChild(n);const a=i,s=h(x||(x=$` <div style="display:grid;gap:var(--lumo-space-m);padding:var(--lumo-space-s);min-width:22rem;max-width:35rem"> <foxy-query-builder lang="${0}" ns="${0}" .options="${0}" .value="${0}"> </foxy-query-builder> <div style="display:flex;justify-content:space-between"> <vaadin-button theme="primary" style="margin:0" @click="${0}"> <foxy-i18n lang="${0}" ns="${0}" key="search"></foxy-i18n> </vaadin-button> <vaadin-button theme="secondary contrast" style="margin:0" @click="${0}"> <foxy-i18n lang="${0}" ns="${0}" key="clear"></foxy-i18n> </vaadin-button> </div> </div> `),a.lang,`${a.ns} query-builder`.trim(),a.options,a.value,(()=>{var t;const e=null!==(t=n.querySelector("foxy-query-builder").value)&&void 0!==t?t:"";this.dispatchEvent(new CustomEvent("search",{detail:e}))}),a.lang,a.ns,(()=>this.dispatchEvent(new CustomEvent("search"))),a.lang,a.ns);u(s,n)}}static get is(){return"foxy-internal-async-list-control-filter-overlay"}}let k,S,P,E,T,A,O,R,j,B,N,z,I,H,F,D,L,V,q,W,M,Y,U,J,G,K,Q=t=>t;customElements.define("foxy-internal-async-list-control",class extends l{constructor(){super(...arguments),this.keepDialogOpenOnDelete=!1,this.keepDialogOpenOnPost=!1,this.createPageHref=null,this.bulkActions=[],this.related=[],this.layout=null,this.actions=[],this.filters=[],this.limit=20,this.first=null,this.form=null,this.formProps={},this.item=null,this.itemProps={},this.wide=!1,this.hideWhenEmpty=!1,this.open=!1,this.alert=!1,this.hideDeleteButton=!1,this.hideCreateButton=!1,this.getPageHref=null,this.filter=null,this.extendFilter=null,this.__deletionConfimationCallback=null,this.__cachedCardRenderer=null,this.__activeBulkAction=null,this.__isFilterVisible=!1,this.__notification=null,this.__isSelecting=!1,this.__totalItems=0,this.__isPageFailed=!1,this.__selection=[],this.__itemRenderer=t=>{var e;const i=this.__cardRenderer(t),o=h(k||(k=Q`<div class="bg-contrast-5">${0}</div>`),i);if(!t.data)return o;if(this.__isSelecting)return h(S||(S=Q` <vaadin-checkbox class="${0}" style="padding-left:calc(.625em + (var(--lumo-border-radius)/ 4) - 1px)" data-async-list-control ?disabled="${0}" ?checked="${0}" @change="${0}"> ${0} </vaadin-checkbox> `),_({"block w-full":!0,"bg-contrast-5":"details"===this.layout}),this.disabled||!!this.__activeBulkAction,this.__selection.find((e=>e._links.self.href===t.data._links.self.href)),(e=>{e.currentTarget.checked?this.__selection=[...this.__selection,t.data]:this.__selection=this.__selection.filter((e=>e._links.self.href!==t.data._links.self.href))}),this.__cardRenderer(t));if("string"!=typeof(null===(e=this.getPageHref)||void 0===e?void 0:e.call(this,t.href,t.data))&&!this.form)return o;const n=this.disabledSelector.matches("card",!0),a=this.__cardRenderer(t);let s;const r=_({"rounded-t":"details"!==this.layout&&!t.previous,"rounded-b":!t.next,"focus-outline-none focus-ring-2 focus-ring-inset focus-ring-primary-50":!0,"text-left w-full block bg-contrast-5 transition-colors":!0,"hover-bg-contrast-10":!n});if(this.getPageHref)if(n)s=h(P||(P=Q`<div class="${0}">${0}</div>`),r,a);else{const e=this.getPageHref(t.href,t.data);s=h(E||(E=Q`<a class="${0}" href="${0}">${0}</a>`),r,e,a)}else{s=h(T||(T=Q` <button ?disabled="${0}" class="${0}" @click="${0}">${0}</button> `),n,r,(e=>{const i=new CustomEvent("itemclick",{cancelable:!0,composed:!0,bubbles:!0,detail:t.href});if(this.dispatchEvent(i)){const i=e.currentTarget,o=this.__dialog;o.header="header_update",o.href=t.href,o.show(i)}}),a)}return this.hideDeleteButton&&!this.actions.length||this.readonly?s:h(A||(A=Q` <foxy-swipe-actions class="block"> ${0} ${0} ${0} </foxy-swipe-actions> `),s,this.actions.map((e=>h(O||(O=Q` <vaadin-button data-testclass="action" theme="${0}" class="h-full rounded-none relative" slot="action" ?disabled="${0}" @click="${0}"> <foxy-i18n class="${0}" infer="" key="${0}"> </foxy-i18n> <div class="${0}"> <foxy-spinner layout="no-label" infer="spinner" state="${0}"> </foxy-spinner> </div> </vaadin-button> `),e.theme,this.disabled,(()=>e.onClick(t.data)),_({"transition-opacity":!0,"opacity-0":"idle"!==e.state}),e.text,_({"absolute inset-0 flex items-center justify-center transition-opacity":!0,"opacity-0":"idle"===e.state}),e.state))),this.hideDeleteButton?"":h(R||(R=Q` <vaadin-button theme="primary error" class="h-full rounded-none" slot="action" @click="${0}"> <foxy-i18n infer="" key="delete_button_text"></foxy-i18n> </vaadin-button> `),(t=>{const e=t.currentTarget;this.renderRoot.querySelector("#confirm").show(e),this.__deletionConfimationCallback=()=>{const t=e.parentElement.firstElementChild.querySelector("[href]");null==t||t.delete(),this.__deletionConfimationCallback=null}})))}}static get properties(){return m(m({},super.properties),{},{keepDialogOpenOnDelete:{type:Boolean,attribute:"keep-dialog-open-on-delete"},keepDialogOpenOnPost:{type:Boolean,attribute:"keep-dialog-open-on-post"},hideDeleteButton:{type:Boolean,attribute:"hide-delete-button"},hideCreateButton:{type:Boolean,attribute:"hide-create-button"},createPageHref:{attribute:"create-page-href"},getPageHref:{attribute:!1},related:{type:Array},layout:{},first:{},limit:{type:Number},form:{},formProps:{type:Object,attribute:"form-props"},item:{},itemProps:{type:Object,attribute:"item-props"},wide:{type:Boolean},open:{type:Boolean},hideWhenEmpty:{type:Boolean,attribute:"hide-when-empty"},alert:{type:Boolean},actions:{attribute:!1},bulkActions:{attribute:!1},filters:{type:Array},filter:{},extendFilter:{type:Function,attribute:!1},__selection:{attribute:!1},__totalItems:{attribute:!1},__isPageFailed:{attribute:!1},__isSelecting:{attribute:!1},__notification:{attribute:!1},__isFilterVisible:{attribute:!1},__activeBulkAction:{attribute:!1}})}render(){const t=this.hideWhenEmpty&&!this.__totalItems&&!this.__isPageFailed;return h(j||(j=Q`<div class="${0}">${0}</div>`),_({hidden:t}),super.render())}renderControl(){var t,e;const i=this.__renderActions(),o=this.__renderContent();return h(B||(B=Q` ${0} ${0} ${0} <div class="mt-s text-s leading-xs text-error" ?hidden="${0}"> ${0} </div> <vaadin-notification position="bottom-end" duration="3000" theme="${0}" .renderer="${0}"> </vaadin-notification> `),this.form&&!this.__isSelecting?h(N||(N=Q` <foxy-form-dialog parent="${0}" infer="dialog" id="form" ?wide="${0}" ?alert="${0}" ?keep-open-on-post="${0}" ?keep-open-on-delete="${0}" .related="${0}" .props="${0}" .form="${0}"> </foxy-form-dialog> `),p(null!==(t=this.first)&&void 0!==t?t:void 0),this.wide,this.alert,this.keepDialogOpenOnPost,this.keepDialogOpenOnDelete,this.related,this.formProps,this.form):"",this.hideDeleteButton||this.readonly||this.__isSelecting?"":h(z||(z=Q` <foxy-internal-confirm-dialog message="delete_message" confirm="delete_confirm" cancel="delete_cancel" header="delete_header" theme="error" infer="" id="confirm" @hide="${0}"> </foxy-internal-confirm-dialog> `),(t=>{var e;t.detail.cancelled||null===(e=this.__deletionConfimationCallback)||void 0===e||e.call(this)})),"details"===this.layout?h(I||(I=Q` <foxy-internal-summary-control layout="details" count="${0}" infer="" ?open="${0}" @toggle="${0}"> ${0} <div class="p-0 bg-transparent">${0}</div> </foxy-internal-summary-control> `),p(this.open||this.__isPageFailed?void 0:`${this.__totalItems}`),this.open,(t=>{const e=t.currentTarget;this.open=e.open,t.composed||t.bubbles||this.dispatchEvent(new CustomEvent("toggle"))}),i.length?h(H||(H=Q` <div class="flex gap-s"> ${0} ${0} </div> `),this.__isPageFailed?h(F||(F=Q`<span class="mr-auto"></span>`)):h(D||(D=Q` <foxy-i18n infer="" class="mr-auto text-tertiary" key="total_items" .options="${0}"> </foxy-i18n> `),{count:this.__totalItems}),i):"",o):h(L||(L=Q` <div class="flex gap-s items-center justify-between font-medium"> <span class="text-body mr-auto text-l"> ${0} </span> ${0} </div> <div class="text-secondary text-s" ?hidden="${0}"> ${0} </div> ${0} `),this.label&&"label"!==this.label?this.label:"",i,!this.helperText||"helper_text"===this.helperText,this.helperText,o),!this._errorMessage||this.disabled||this.readonly||this.__isSelecting,this._errorMessage,p(null===(e=this.__notification)||void 0===e?void 0:e.theme),(t=>{var e,i;t.firstElementChild||(t.innerHTML="<span></span>");const o=null===(e=this.__notification)||void 0===e?void 0:e.theme,n=h(V||(V=Q` <foxy-i18n style="color:var(--lumo-${0}-color)" lang="${0}" key="${0}" ns="${0} pagination"> </foxy-i18n> `),o?`${o}-contrast`:"body-text",this.lang,null===(i=this.__notification)||void 0===i?void 0:i.key,this.ns);u(n,t.firstElementChild)}))}get __cardRenderer(){var t;const e=this.item;return(null===(t=this.__cachedCardRenderer)||void 0===t?void 0:t.item)!==e&&(this.__cachedCardRenderer={item:e,render:"string"==typeof e?new Function("ctx",`return ctx.html\`\n <${e}\n related=\${JSON.stringify(ctx.related)}\n parent=\${ctx.parent}\n style="padding: calc(0.625em + (var(--lumo-border-radius) / 4) - 1px)"\n infer=""\n href=\${ctx.href}\n ...=\${ctx.spread(ctx.props)}\n >\n </${e}>\``):t=>h(q||(q=Q` <div style="padding:calc(.625em + (var(--lumo-border-radius)/ 4) - 1px)"> ${0} </div> `),null==e?void 0:e(t))}),this.__cachedCardRenderer.render}get __dialog(){return this.renderRoot.querySelector("#form")}__renderActions(){var t,e=this;return[this.filters.length>0&&!this.__isSelecting?h(W||(W=Q` <foxy-internal-async-list-control-filter-overlay .noVerticalOverlap="${0}" .positionTarget="${0}" .model="${0}" ?opened="${0}" @vaadin-overlay-close="${0}" @search="${0}"> </foxy-internal-async-list-control-filter-overlay> <vaadin-button theme="tertiary-inline contrast" id="filters" ?disabled="${0}" @click="${0}"> <foxy-i18n infer="pagination" key="search_button_text"></foxy-i18n> ${0} </vaadin-button> `),!0,this.renderRoot.querySelector("#filters"),{options:this.filters,value:null!==(t=this.filter)&&void 0!==t?t:"",lang:this.lang,ns:this.ns},this.__isFilterVisible,(()=>this.__isFilterVisible=!1),(t=>{var e;this.filter=null!==(e=t.detail)&&void 0!==e?e:""}),this.disabled,(()=>this.__isFilterVisible=!this.__isFilterVisible),this.filter?h(M||(M=Q`<span>(${0})</span>`),this.filter.split("&").length):""):"",this.bulkActions.length>0&&this.first?h(Y||(Y=Q` ${0} <vaadin-button theme="tertiary-inline contrast" ?disabled="${0}" @click="${0}"> <foxy-i18n infer="pagination" key="${0}"> </foxy-i18n> </vaadin-button> `),this.__selection.length>0?this.bulkActions.map((t=>{var i;const o=`${t.name}_bulk_action_notification`,n=`${t.name}_bulk_action_caption`,a=(null===(i=this.__activeBulkAction)||void 0===i?void 0:i.name)===t.name;return h(U||(U=Q` <vaadin-button data-testclass="bulk-action" theme="tertiary-inline" ?disabled="${0}" @click="${0}"> <foxy-i18n infer="pagination" key="${0}_${0}" .options="${0}"> </foxy-i18n> </vaadin-button> `),this.disabled||!!this.__activeBulkAction,(async function(){var i;e.__activeBulkAction=t;try{await t.onClick(e.__selection),e.__selection=[],e.__isSelecting=!1,e.__notification={key:`${o}_done`,theme:"success"}}catch(t){e.__notification={key:`${o}_fail`,theme:"error"}}finally{e.__activeBulkAction=null,null===(i=e.renderRoot.querySelector("vaadin-notification"))||void 0===i||i.open()}}),n,a?"busy":"idle",{count:this.__selection.length})})):"",this.disabled||!!this.__activeBulkAction,(()=>{this.__isSelecting=!this.__isSelecting,this.__selection=[]}),this.__isSelecting?"cancel_button_text":"select_button_text"):"",!this.form&&!this.createPageHref||this.readonly||this.hideCreateButton||this.__isSelecting?"":this.createPageHref&&!this.disabled?h(J||(J=Q` <a class="rounded-s text-primary group focus-outline-none focus-ring-2 focus-ring-primary-50" href="${0}"> <foxy-i18n class="transition-opacity group-hover-opacity-80" infer="" key="create_button_text"> </foxy-i18n> </a> `),this.createPageHref):h(G||(G=Q` <vaadin-button theme="tertiary-inline" ?disabled="${0}" @click="${0}"> <foxy-i18n infer="pagination" key="create_button_text"></foxy-i18n> </vaadin-button> `),this.disabled,(t=>{t.preventDefault(),t.stopPropagation();const e=this.__dialog,i=t.currentTarget;e.header="header_create",e.href="",e.show(i)}))].filter((t=>!!t))}__renderContent(){var t,e,i;const o=this.helperText,n="details"===this.layout,a=this.label;let s;try{const o=new URL(null!==(t=this.first)&&void 0!==t?t:""),n=new URLSearchParams(null!==(e=this.filter)&&void 0!==e?e:"");o.searchParams.set("limit",String(this.limit)),n.forEach(((t,e)=>o.searchParams.set(e,t))),null===(i=this.extendFilter)||void 0===i||i.call(this,o.searchParams),s=o.toString()}catch(t){s=void 0}return h(K||(K=Q` <foxy-pagination first="${0}" infer="pagination" class="${0}"> <foxy-collection-page class="${0}" style="gap:1px" infer="card" .related="${0}" .props="${0}" .item="${0}" @update="${0}"> </foxy-collection-page> </foxy-pagination> `),p(s),_({hidden:n&&0===this.__totalItems&&!this.__isPageFailed}),_({"grid grid-cols-1 overflow-hidden":!0,rounded:!n,"mt-s":!n&&(!!a&&"label"!==a||!!o&&"helper_text"!==o)}),this.related,this.itemProps,this.__itemRenderer,(t=>{var e,i;const o=t.currentTarget;this.__totalItems=parseInt(null!==(i=null===(e=o.data)||void 0===e?void 0:e.total_items)&&void 0!==i?i:0),this.__isPageFailed=o.in("fail")}))}}),customElements.define(w.is,w);
280
+ `}static get is(){return"vaadin-notification"}static get version(){return"1.6.2"}static get properties(){return{duration:{type:Number,value:5e3},opened:{type:Boolean,value:!1,notify:!0,observer:"_openedChanged"},position:{type:String,value:"bottom-start",observer:"_positionChanged"},renderer:Function,_notificationTemplate:Object}}static get observers(){return["_durationChanged(duration, opened)","_templateOrRendererChanged(_notificationTemplate, renderer, opened)"]}ready(){super.ready(),this._observer=new i(this,(t=>{this._setTemplateFromNodes(t.addedNodes)}))}_setTemplateFromNodes(t){this._notificationTemplate=t.filter((t=>t.localName&&"template"===t.localName))[0]||this._notificationTemplate}render(){"function"==typeof this.renderer&&this.renderer(this._card,this)}_removeNewRendererOrTemplate(t,e,i,o){t!==e?this._notificationTemplate=void 0:i!==o&&(this.renderer=void 0)}_templateOrRendererChanged(t,e,i){if(t&&e)throw this._removeNewRendererOrTemplate(t,this._oldTemplate,e,this._oldRenderer),new Error("You should only use either a renderer or a template for notification content");this._oldTemplate=t;const o=this._oldRenderer!==e;if(this._oldRenderer=e,e){if(this._card=this.$["vaadin-notification-card"],o)for(;this._card.firstChild;)this._card.removeChild(this._card.firstChild);i&&(this._didAnimateNotificationAppend||this._animatedAppendNotificationCard(),this.render())}}open(){this.opened=!0}close(){this.opened=!1}get _container(){return v._container||(v._container=document.createElement("vaadin-notification-container"),document.body.appendChild(v._container)),v._container}_openedChanged(t){t?(this._container.opened=!0,this._instance||this.renderer||this._ensureTemplatized(),this._animatedAppendNotificationCard(),setTimeout((()=>this._updateShadyButtonStyles()))):this._card&&this._closeNotificationCard()}_ensureTemplatized(){if(this._notificationTemplate=this.querySelector("template")||this._notificationTemplate,!this._notificationTemplate)return;this._notificationTemplate._Templatizer||(this._notificationTemplate._Templatizer=o(this._notificationTemplate,this,{forwardHostProp:function(t,e){this._instance&&this._instance.forwardHostProp(t,e)}})),this._instance=new this._notificationTemplate._Templatizer({});const t=this._notificationTemplate.getRootNode(),e=t!==document;if(this._card=this.$["vaadin-notification-card"],this._cardContent=this._card.shadowRoot.querySelector('[part~="content"]'),e){if(this._cardContent.shadowRoot||this._cardContent.attachShadow({mode:"open"}),window.ShadyCSS&&!window.ShadyCSS.nativeShadow){var i=t.host&&t.host.localName;i&&-1===i.indexOf("-")&&(i=t.host.getAttribute("is")),i&&this._cardContent.setAttribute("is",i)}else{const e=Array.from(t.querySelectorAll("style")).reduce(((t,e)=>t+e.textContent),"").replace(/:host/g,":host-nomatch");if(e){const t=document.createElement("style");t.textContent=e,this._cardContent.shadowRoot.appendChild(t)}}this._cardContent.shadowRoot.appendChild(this._instance.root)}else this._card.appendChild(this._instance.root);this._card.setAttribute("aria-label",this._card.textContent.trim())}_animatedAppendNotificationCard(){if(this._card){this._card.setAttribute("opening",""),this._appendNotificationCard();const t=()=>{this._card.removeEventListener("animationend",t),this._card.removeAttribute("opening")};this._card.addEventListener("animationend",t),this._didAnimateNotificationAppend=!0}else this._didAnimateNotificationAppend=!1}_appendNotificationCard(){this._card&&(this._container.shadowRoot.querySelector(`slot[name="${this.position}"]`)?(this._card.slot=this.position,this._container.firstElementChild&&/top/.test(this.position)?this._container.insertBefore(this._card,this._container.firstElementChild):this._container.appendChild(this._card)):window.console.warn(`Invalid alignment parameter provided: position=${this.position}`))}_removeNotificationCard(){this._card.parentNode&&this._card.parentNode.removeChild(this._card),this._card.removeAttribute("closing"),this._container.opened=Boolean(this._container.firstElementChild)}_closeNotificationCard(){this._durationTimeoutId&&clearTimeout(this._durationTimeoutId),this._animatedRemoveNotificationCard()}_animatedRemoveNotificationCard(){this._card.setAttribute("closing","");const t=getComputedStyle(this._card).getPropertyValue("animation-name");if(t&&"none"!=t){const t=()=>{this._removeNotificationCard(),this._card.removeEventListener("animationend",t)};this._card.addEventListener("animationend",t)}else this._removeNotificationCard()}_positionChanged(t){this.opened&&this._animatedAppendNotificationCard()}_durationChanged(t,e){e&&(clearTimeout(this._durationTimeoutId),t>0&&(this._durationTimeoutId=setTimeout((()=>this.close()),t)))}_updateShadyButtonStyles(){window.ShadyCSS&&!this.__buttonStylesPending&&(customElements.whenDefined("vaadin-button").then((()=>{Array.from(this._card.querySelectorAll("*")).filter((t=>t instanceof customElements.get("vaadin-button"))).forEach((t=>{const e=["--_lumo-button-color","--_lumo-button-background-color","--_lumo-button-primary-color","--_lumo-button-primary-background-color"].reduce(((t,e)=>{const i=window.ShadyCSS.getComputedStyleValue(this._card,e);return i&&(t[e]=i),t}),{});t.updateStyles(e)})),this.__buttonStylesPending=!1})),this.__buttonStylesPending=!0)}}customElements.define(y.is,y),customElements.define(g.is,g),customElements.define(v.is,v);let b;t("vaadin-checkbox",c(b||(b=(t=>t)`:host([data-async-list-control]) label{display:flex}:host([data-async-list-control]) [part=label]{width:100%;margin:0!important}`)));let x,$=t=>t;const C=t=>class e extends t{static get properties(){return{positionTarget:{type:Object,value:null},horizontalAlign:{type:String,value:"start"},verticalAlign:{type:String,value:"top"},noHorizontalOverlap:{type:Boolean,value:!1},noVerticalOverlap:{type:Boolean,value:!1}}}static get observers(){return["__positionSettingsChanged(positionTarget, horizontalAlign, verticalAlign,\n noHorizontalOverlap, noVerticalOverlap)"]}constructor(){super();const t=this._updatePosition.bind(this);this.addEventListener("opened-changed",(e=>{const i=e.detail.value?"addEventListener":"removeEventListener";window[i]("scroll",t),window[i]("resize",t),e.detail.value&&this._updatePosition()}))}ready(){super.ready(),console.warn("PositionMixin is not considered stable and might change any time")}__positionSettingsChanged(){this._updatePosition()}_updatePosition(){if(!this.positionTarget)return;const t=getComputedStyle(this);this.__margins||(this.__margins={},["top","bottom","left","right"].forEach((e=>{this.__margins[e]=parseInt(t[e],10)})));const e="rtl"===t.direction,i=this.positionTarget.getBoundingClientRect(),o=this.__calculateHorizontalPosition(i,e),n=this.__calculateVerticalPosition(i),a=Object.assign({},o,n);this.__doSetPosition(a,e)}__calculateHorizontalPosition(t,i){const o=Math.max(this.__oldContentWidth||0,this.$.overlay.offsetWidth);this.__oldContentWidth=this.$.overlay.offsetWidth;const n=Math.min(window.innerWidth,document.documentElement.clientWidth),a=!i&&"start"===this.horizontalAlign||i&&"end"===this.horizontalAlign,s=!!this.style.left;return e.__calculatePositionInOneDimension(t,o,n,this.__margins,a,s,this.noHorizontalOverlap,{start:"left",end:"right"})}__calculateVerticalPosition(t){const i=Math.max(this.__oldContentHeight||0,this.$.overlay.offsetHeight);this.__oldContentHeight=this.$.overlay.offsetHeight;const o=Math.min(window.innerHeight,document.documentElement.clientHeight),n="top"===this.verticalAlign,a=!!this.style.top;return e.__calculatePositionInOneDimension(t,i,o,this.__margins,n,a,this.noVerticalOverlap,{start:"top",end:"bottom"})}static __calculatePositionInOneDimension(t,e,i,o,n,a,s,r){const l=i-t[s?r.end:r.start]-o[r.end],d=t[s?r.start:r.end]-o[r.start],c=n?l:d,h=n===(c>(n?d:l)||c>e),u=h?r.start:r.end,m=h?r.end:r.start,p=(h?t[s?r.end:r.start]:i-t[s?r.start:r.end])+"px",_={};return _[u]=p,_[m]="",_}__doSetPosition(t,e){Object.assign(this.style,t);const i=!e&&t.left||e&&t.right;this.style.alignItems=i?"flex-start":"flex-end",this.style.justifyContent=t.top?"flex-start":"flex-end"}};class w extends(C(l)){constructor(){super(...arguments),this.renderer=(t,e,i)=>{var o;const n=null!==(o=t.firstElementChild)&&void 0!==o?o:document.createElement("div");t.firstElementChild||t.appendChild(n);const a=i,s=h(x||(x=$` <div style="display:grid;gap:var(--lumo-space-m);padding:var(--lumo-space-s);min-width:22rem;max-width:35rem"> <foxy-query-builder lang="${0}" ns="${0}" .options="${0}" .value="${0}"> </foxy-query-builder> <div style="display:flex;justify-content:space-between"> <foxy-internal-button theme="primary" style="margin:0" @click="${0}"> <foxy-i18n lang="${0}" ns="${0}" key="search"></foxy-i18n> </foxy-internal-button> <foxy-internal-button theme="secondary contrast" style="margin:0" @click="${0}"> <foxy-i18n lang="${0}" ns="${0}" key="clear"></foxy-i18n> </foxy-internal-button> </div> </div> `),a.lang,`${a.ns} query-builder`.trim(),a.options,a.value,(()=>{var t;const e=null!==(t=n.querySelector("foxy-query-builder").value)&&void 0!==t?t:"";this.dispatchEvent(new CustomEvent("search",{detail:e}))}),a.lang,a.ns,(()=>this.dispatchEvent(new CustomEvent("search"))),a.lang,a.ns);u(s,n)}}static get is(){return"foxy-internal-async-list-control-filter-overlay"}}let k,S,P,E,T,A,O,R,j,B,N,z,I,H,F,D,L,V,q,W,M,Y,U,J,G,K,Q=t=>t;customElements.define("foxy-internal-async-list-control",class extends d{constructor(){super(...arguments),this.keepDialogOpenOnDelete=!1,this.keepDialogOpenOnPost=!1,this.createPageHref=null,this.bulkActions=[],this.related=[],this.layout=null,this.actions=[],this.filters=[],this.limit=20,this.first=null,this.form=null,this.formProps={},this.item=null,this.itemProps={},this.wide=!1,this.hideWhenEmpty=!1,this.open=!1,this.alert=!1,this.hideDeleteButton=!1,this.hideCreateButton=!1,this.getPageHref=null,this.filter=null,this.extendFilter=null,this.__deletionConfimationCallback=null,this.__cachedCardRenderer=null,this.__activeBulkAction=null,this.__isFilterVisible=!1,this.__notification=null,this.__isSelecting=!1,this.__totalItems=0,this.__isPageFailed=!1,this.__selection=[],this.__itemRenderer=t=>{var e;const i=this.__cardRenderer(t),o=h(k||(k=Q`<div class="bg-contrast-5">${0}</div>`),i);if(!t.data)return o;if(this.__isSelecting)return h(S||(S=Q` <vaadin-checkbox class="${0}" style="padding-left:calc(.625em + (var(--lumo-border-radius)/ 4) - 1px)" data-async-list-control ?disabled="${0}" ?checked="${0}" @change="${0}"> ${0} </vaadin-checkbox> `),_({"block w-full":!0,"bg-contrast-5":"details"===this.layout}),this.disabled||!!this.__activeBulkAction,this.__selection.find((e=>e._links.self.href===t.data._links.self.href)),(e=>{e.currentTarget.checked?this.__selection=[...this.__selection,t.data]:this.__selection=this.__selection.filter((e=>e._links.self.href!==t.data._links.self.href))}),this.__cardRenderer(t));if("string"!=typeof(null===(e=this.getPageHref)||void 0===e?void 0:e.call(this,t.href,t.data))&&!this.form)return o;const n=this.disabledSelector.matches("card",!0),a=this.__cardRenderer(t);let s;const r=_({"rounded-t":"details"!==this.layout&&!t.previous,"rounded-b":!t.next,"focus-outline-none focus-ring-2 focus-ring-inset focus-ring-primary-50":!0,"text-left w-full block bg-contrast-5 transition-colors":!0,"hover-bg-contrast-10":!n});if(this.getPageHref)if(n)s=h(P||(P=Q`<div class="${0}">${0}</div>`),r,a);else{const e=this.getPageHref(t.href,t.data);s=h(E||(E=Q`<a class="${0}" href="${0}">${0}</a>`),r,e,a)}else{s=h(T||(T=Q` <button ?disabled="${0}" class="${0}" @click="${0}">${0}</button> `),n,r,(e=>{const i=new CustomEvent("itemclick",{cancelable:!0,composed:!0,bubbles:!0,detail:t.href});if(this.dispatchEvent(i)){const i=e.currentTarget,o=this.__dialog;o.header="header_update",o.href=t.href,o.show(i)}}),a)}return this.hideDeleteButton&&!this.actions.length||this.readonly?s:h(A||(A=Q` <foxy-swipe-actions class="block"> ${0} ${0} ${0} </foxy-swipe-actions> `),s,this.actions.map((e=>h(O||(O=Q` <foxy-internal-button data-testclass="action" theme="${0}" class="h-full rounded-none relative" slot="action" ?disabled="${0}" @click="${0}"> <foxy-i18n class="${0}" infer="" key="${0}"> </foxy-i18n> <div class="${0}"> <foxy-spinner layout="no-label" infer="spinner" state="${0}"> </foxy-spinner> </div> </foxy-internal-button> `),e.theme,this.disabled,(()=>e.onClick(t.data)),_({"transition-opacity":!0,"opacity-0":"idle"!==e.state}),e.text,_({"absolute inset-0 flex items-center justify-center transition-opacity":!0,"opacity-0":"idle"===e.state}),e.state))),this.hideDeleteButton?"":h(R||(R=Q` <foxy-internal-button theme="primary error" class="h-full rounded-none" slot="action" @click="${0}"> <foxy-i18n infer="" key="delete_button_text"></foxy-i18n> </foxy-internal-button> `),(t=>{const e=t.currentTarget;this.renderRoot.querySelector("#confirm").show(e),this.__deletionConfimationCallback=()=>{const t=e.parentElement.firstElementChild.querySelector("[href]");null==t||t.delete(),this.__deletionConfimationCallback=null}})))}}static get properties(){return m(m({},super.properties),{},{keepDialogOpenOnDelete:{type:Boolean,attribute:"keep-dialog-open-on-delete"},keepDialogOpenOnPost:{type:Boolean,attribute:"keep-dialog-open-on-post"},hideDeleteButton:{type:Boolean,attribute:"hide-delete-button"},hideCreateButton:{type:Boolean,attribute:"hide-create-button"},createPageHref:{attribute:"create-page-href"},getPageHref:{attribute:!1},related:{type:Array},layout:{},first:{},limit:{type:Number},form:{},formProps:{type:Object,attribute:"form-props"},item:{},itemProps:{type:Object,attribute:"item-props"},wide:{type:Boolean},open:{type:Boolean},hideWhenEmpty:{type:Boolean,attribute:"hide-when-empty"},alert:{type:Boolean},actions:{attribute:!1},bulkActions:{attribute:!1},filters:{type:Array},filter:{},extendFilter:{type:Function,attribute:!1},__selection:{attribute:!1},__totalItems:{attribute:!1},__isPageFailed:{attribute:!1},__isSelecting:{attribute:!1},__notification:{attribute:!1},__isFilterVisible:{attribute:!1},__activeBulkAction:{attribute:!1}})}render(){const t=this.hideWhenEmpty&&!this.__totalItems&&!this.__isPageFailed;return h(j||(j=Q`<div class="${0}">${0}</div>`),_({hidden:t}),super.render())}renderControl(){var t,e;const i=this.__renderActions(),o=this.__renderContent();return h(B||(B=Q` ${0} ${0} ${0} <div class="mt-s text-s leading-xs text-error" ?hidden="${0}"> ${0} </div> <vaadin-notification position="bottom-end" duration="3000" theme="${0}" .renderer="${0}"> </vaadin-notification> `),this.form&&!this.__isSelecting?h(N||(N=Q` <foxy-form-dialog parent="${0}" infer="dialog" id="form" ?wide="${0}" ?alert="${0}" ?keep-open-on-post="${0}" ?keep-open-on-delete="${0}" .related="${0}" .props="${0}" .form="${0}"> </foxy-form-dialog> `),p(null!==(t=this.first)&&void 0!==t?t:void 0),this.wide,this.alert,this.keepDialogOpenOnPost,this.keepDialogOpenOnDelete,this.related,this.formProps,this.form):"",this.hideDeleteButton||this.readonly||this.__isSelecting?"":h(z||(z=Q` <foxy-internal-confirm-dialog message="delete_message" confirm="delete_confirm" cancel="delete_cancel" header="delete_header" theme="error" infer="" id="confirm" @hide="${0}"> </foxy-internal-confirm-dialog> `),(t=>{var e;t.detail.cancelled||null===(e=this.__deletionConfimationCallback)||void 0===e||e.call(this)})),"details"===this.layout?h(I||(I=Q` <foxy-internal-summary-control layout="details" count="${0}" infer="" ?open="${0}" @toggle="${0}"> ${0} <div class="p-0 bg-transparent">${0}</div> </foxy-internal-summary-control> `),p(this.open||this.__isPageFailed?void 0:`${this.__totalItems}`),this.open,(t=>{const e=t.currentTarget;this.open=e.open,t.composed||t.bubbles||this.dispatchEvent(new CustomEvent("toggle"))}),i.length?h(H||(H=Q` <div class="flex gap-s"> ${0} ${0} </div> `),this.__isPageFailed?h(F||(F=Q`<span class="mr-auto"></span>`)):h(D||(D=Q` <foxy-i18n infer="" class="mr-auto text-tertiary" key="total_items" .options="${0}"> </foxy-i18n> `),{count:this.__totalItems}),i):"",o):h(L||(L=Q` <div class="flex gap-s items-center justify-between font-medium"> <span class="text-body mr-auto text-l"> ${0} </span> ${0} </div> <div class="text-secondary text-s" ?hidden="${0}"> ${0} </div> ${0} `),this.label&&"label"!==this.label?this.label:"",i,!this.helperText||"helper_text"===this.helperText,this.helperText,o),!this._errorMessage||this.disabled||this.readonly||this.__isSelecting,this._errorMessage,p(null===(e=this.__notification)||void 0===e?void 0:e.theme),(t=>{var e,i;t.firstElementChild||(t.innerHTML="<span></span>");const o=null===(e=this.__notification)||void 0===e?void 0:e.theme,n=h(V||(V=Q` <foxy-i18n style="color:var(--lumo-${0}-color)" lang="${0}" key="${0}" ns="${0} pagination"> </foxy-i18n> `),o?`${o}-contrast`:"body-text",this.lang,null===(i=this.__notification)||void 0===i?void 0:i.key,this.ns);u(n,t.firstElementChild)}))}get __cardRenderer(){var t;const e=this.item;return(null===(t=this.__cachedCardRenderer)||void 0===t?void 0:t.item)!==e&&(this.__cachedCardRenderer={item:e,render:"string"==typeof e?new Function("ctx",`return ctx.html\`\n <${e}\n related=\${JSON.stringify(ctx.related)}\n parent=\${ctx.parent}\n style="padding: calc(0.625em + (var(--lumo-border-radius) / 4) - 1px)"\n infer=""\n href=\${ctx.href}\n ...=\${ctx.spread(ctx.props)}\n >\n </${e}>\``):t=>h(q||(q=Q` <div style="padding:calc(.625em + (var(--lumo-border-radius)/ 4) - 1px)"> ${0} </div> `),null==e?void 0:e(t))}),this.__cachedCardRenderer.render}get __dialog(){return this.renderRoot.querySelector("#form")}__renderActions(){var t,e=this;return[this.filters.length>0&&!this.__isSelecting?h(W||(W=Q` <foxy-internal-async-list-control-filter-overlay .noVerticalOverlap="${0}" .positionTarget="${0}" .model="${0}" ?opened="${0}" @vaadin-overlay-close="${0}" @search="${0}"> </foxy-internal-async-list-control-filter-overlay> <foxy-internal-button theme="tertiary-inline contrast" id="filters" ?disabled="${0}" @click="${0}"> <foxy-i18n infer="pagination" key="search_button_text"></foxy-i18n> ${0} </foxy-internal-button> `),!0,this.renderRoot.querySelector("#filters"),{options:this.filters,value:null!==(t=this.filter)&&void 0!==t?t:"",lang:this.lang,ns:this.ns},this.__isFilterVisible,(()=>this.__isFilterVisible=!1),(t=>{var e;this.filter=null!==(e=t.detail)&&void 0!==e?e:""}),this.disabled,(()=>this.__isFilterVisible=!this.__isFilterVisible),this.filter?h(M||(M=Q`<span>(${0})</span>`),this.filter.split("&").length):""):"",this.bulkActions.length>0&&this.first?h(Y||(Y=Q` ${0} <foxy-internal-button theme="tertiary-inline contrast" ?disabled="${0}" @click="${0}"> <foxy-i18n infer="pagination" key="${0}"> </foxy-i18n> </foxy-internal-button> `),this.__selection.length>0?this.bulkActions.map((t=>{var i;const o=`${t.name}_bulk_action_notification`,n=`${t.name}_bulk_action_caption`,a=(null===(i=this.__activeBulkAction)||void 0===i?void 0:i.name)===t.name;return h(U||(U=Q` <foxy-internal-button data-testclass="bulk-action" theme="tertiary-inline" ?disabled="${0}" @click="${0}"> <foxy-i18n infer="pagination" key="${0}_${0}" .options="${0}"> </foxy-i18n> </foxy-internal-button> `),this.disabled||!!this.__activeBulkAction,(async function(){var i;e.__activeBulkAction=t;try{await t.onClick(e.__selection),e.__selection=[],e.__isSelecting=!1,e.__notification={key:`${o}_done`,theme:"success"}}catch(t){e.__notification={key:`${o}_fail`,theme:"error"}}finally{e.__activeBulkAction=null,null===(i=e.renderRoot.querySelector("vaadin-notification"))||void 0===i||i.open()}}),n,a?"busy":"idle",{count:this.__selection.length})})):"",this.disabled||!!this.__activeBulkAction,(()=>{this.__isSelecting=!this.__isSelecting,this.__selection=[]}),this.__isSelecting?"cancel_button_text":"select_button_text"):"",!this.form&&!this.createPageHref||this.readonly||this.hideCreateButton||this.__isSelecting?"":this.createPageHref&&!this.disabled?h(J||(J=Q` <a class="rounded-s text-primary group focus-outline-none focus-ring-2 focus-ring-primary-50" href="${0}"> <foxy-i18n class="transition-opacity group-hover-opacity-80" infer="" key="create_button_text"> </foxy-i18n> </a> `),this.createPageHref):h(G||(G=Q` <foxy-internal-button theme="tertiary-inline" ?disabled="${0}" @click="${0}"> <foxy-i18n infer="pagination" key="create_button_text"></foxy-i18n> </foxy-internal-button> `),this.disabled,(t=>{t.preventDefault(),t.stopPropagation();const e=this.__dialog,i=t.currentTarget;e.header="header_create",e.href="",e.show(i)}))].filter((t=>!!t))}__renderContent(){var t,e,i;const o=this.helperText,n="details"===this.layout,a=this.label;let s;try{const o=new URL(null!==(t=this.first)&&void 0!==t?t:""),n=new URLSearchParams(null!==(e=this.filter)&&void 0!==e?e:"");o.searchParams.set("limit",String(this.limit)),n.forEach(((t,e)=>o.searchParams.set(e,t))),null===(i=this.extendFilter)||void 0===i||i.call(this,o.searchParams),s=o.toString()}catch(t){s=void 0}return h(K||(K=Q` <foxy-pagination first="${0}" infer="pagination" class="${0}"> <foxy-collection-page class="${0}" style="gap:1px" infer="card" .related="${0}" .props="${0}" .item="${0}" @update="${0}"> </foxy-collection-page> </foxy-pagination> `),p(s),_({hidden:n&&0===this.__totalItems&&!this.__isPageFailed}),_({"grid grid-cols-1 overflow-hidden":!0,rounded:!n,"mt-s":!n&&(!!a&&"label"!==a||!!o&&"helper_text"!==o)}),this.related,this.itemProps,this.__itemRenderer,(t=>{var e,i;const o=t.currentTarget;this.__totalItems=parseInt(null!==(i=null===(e=o.data)||void 0===e?void 0:e.total_items)&&void 0!==i?i:0),this.__isPageFailed=o.in("fail")}))}}),customElements.define(w.is,w);
@@ -1 +1 @@
1
- import"./shared-91483320.js";import"./foxy-collection-page.js";import"./foxy-nucleon-element.js";import"./foxy-pagination.js";import"./shared-c066b7fd.js";import{I as e}from"./shared-4ab85bea.js";import{m as i,_ as t}from"./shared-8f9014ff.js";import{N as r,i as s}from"./shared-c85c1864.js";import{i as n}from"./shared-53e42a77.js";import{c as l}from"./shared-4e709717.js";import{h as a,c as o}from"./shared-ba5c42c7.js";import{x as d}from"./shared-5b8c7250.js";let c,h,u,f,_,y=e=>e;let m,g=e=>e;customElements.define("foxy-internal-async-resource-link-list-control",class extends e{constructor(){super(...arguments),this.foreignKeyForUri=null,this.foreignKeyForId=null,this.ownKeyForUri=null,this.optionsHref=null,this.linksHref=null,this.embedKey=null,this.ownUri=null,this.limit=20,this.item=null,this.__getItemRenderer=i(((e,i)=>new Function("ctx",`return ctx.html\`\n <${null!=e?e:"foxy-null"}\n related=\${JSON.stringify(ctx.related)}\n parent=\${ctx.parent}\n infer=""\n ${i?".data=${ctx.data}":"href=${ctx.href}"}\n ...=\${ctx.spread(ctx.props)}\n >\n </${null!=e?e:"foxy-null"}>\``)),((...e)=>e.join())),this.__renderItem=e=>{var i;const t=this.__getItemRenderer(this.item,!!e.data),r=e=>a(c||(c=y` <div style="padding:calc(.625em + (var(--lumo-border-radius)/ 4) - 1px)">${0}</div> `),e);if(!e.href||e.href.startsWith("foxy://"))return r(t(e));if(this.readonly)return r(t(e));const s=this.foreignKeyForUri,n=s?null===(i=this.__allLinks)||void 0===i?void 0:i.find((i=>i[s]===e.href)):void 0,l=this.disabled||!this.__allLinks||this.__isFetching;return r(a(h||(h=y` <vaadin-checkbox class="block foxy-internal-checkbox-style-0" ?disabled="${0}" ?checked="${0}" @change="${0}"> <div class="transition-opacity ${0}"> ${0} </div> </vaadin-checkbox> `),l,!!n,(i=>{var t,r,s;i.currentTarget.checked?this.__insertLink(null!==(r=null===(t=e.data)||void 0===t?void 0:t._links.self.href)&&void 0!==r?r:""):this.__deleteLink(null!==(s=null==n?void 0:n._links.self.href)&&void 0!==s?s:"")}),l?"opacity-50":"opacity-100",t(e)))},this.__isFetching=!1,this.__linkFailure=null}static get properties(){return t(t({},super.properties),{},{foreignKeyForUri:{attribute:"foreign-key-for-uri"},foreignKeyForId:{attribute:"foreign-key-for-id"},ownKeyForUri:{attribute:"own-key-for-uri"},optionsHref:{attribute:"options-href"},linksHref:{attribute:"links-href"},embedKey:{attribute:"embed-key"},ownUri:{attribute:"own-uri"},limit:{type:Number},item:{},__isFetching:{attribute:!1},__linkFailure:{attribute:!1}})}static get styles(){return[super.styles,o(u||(u=y`vaadin-checkbox::part(label){margin:0 0 0 calc(.625em + (var(--lumo-border-radius)/ 4) - 1px);align-self:center;flex:1}`))]}renderControl(){var e,i;let t;try{const i=new URL(null!==(e=this.optionsHref)&&void 0!==e?e:"");i.searchParams.set("limit",this.limit.toString()),t=i.toString()}catch(e){t=void 0}const r=this.__loadFailure,s=null!==(i=this.__linkFailure)&&void 0!==i?i:r,o=!r&&(this.__isFetching||!this.__allLinks);return a(f||(f=y` <div class="group"> <div class="mb-s" ?hidden="${0}"> <div class="flex justify-between font-medium text-l" ?hidden="${0}"> <span>${0}</span> <foxy-i18n class="text-m text-tertiary font-normal transition-opacity ${0}" infer="" key="${0}"> </foxy-i18n> </div> <div class="text-secondary text-s" ?hidden="${0}">${0}</div> </div> <foxy-pagination first="${0}" infer="pagination"> <foxy-collection-page infer="card" class="${0}" .item="${0}"> </foxy-collection-page> </foxy-pagination> <div class="mt-s text-s leading-xs text-error" ?hidden="${0}"> ${0} </div> <foxy-i18n class="block mt-s text-s leading-xs text-error" infer="spinner" key="${0}" ?hidden="${0}"> </foxy-i18n> ${0} </div> `),!this.label&&!this.helperText,!this.label,this.label,o?"opacity-100":"opacity-0",this.__isFetching?"status_saving":"status_loading",!this.helperText,this.helperText,n(t),l({"block transition-colors divide-y rounded overflow-hidden":!0,"bg-contrast-5 divide-base":!0}),this.__renderItem,!this._errorMessage||this.disabled||this.readonly,this._errorMessage,"access_denied"===s?"loading_access_denied":"loading_error",!s,this.__renderLinkResourceLoaders())}updated(e){var i,t;super.updated(e),e.has("item")&&(null===(t=(i=this.__getItemRenderer.cache).clear)||void 0===t||t.call(i))}async __insertLink(e){var i,t,s,n,l,a;this.__isFetching=!0,this.__linkFailure=null;try{const o=new r.API(this),d=await o.fetch(null!==(i=this.linksHref)&&void 0!==i?i:"",{method:"POST",body:JSON.stringify({[null!==(t=this.foreignKeyForUri)&&void 0!==t?t:""]:e,[null!==(s=this.ownKeyForUri)&&void 0!==s?s:""]:this.ownUri})});if(!d.ok)return void(this.__linkFailure=await this.__getFailure(d));const c=await d.json(),h=await o.fetch(c._links.self.href);if(h.ok){const e=r.Rumour(null!==(l=null===(n=this.nucleon)||void 0===n?void 0:n.group)&&void 0!==l?l:""),i=await h.json();e.share({related:[null!==(a=this.linksHref)&&void 0!==a?a:""],source:c._links.self.href,data:i})}else this.__linkFailure=await this.__getFailure(h)}catch(e){this.__linkFailure="generic"}finally{this.__isFetching=!1}}async __deleteLink(e){var i,t,s;this.__isFetching=!0,this.__linkFailure=null;try{const n=new r.API(this),l=await n.fetch(e,{method:"DELETE"});if(l.ok){r.Rumour(null!==(t=null===(i=this.nucleon)||void 0===i?void 0:i.group)&&void 0!==t?t:"").share({related:[null!==(s=this.linksHref)&&void 0!==s?s:""],source:e,data:null})}else this.__linkFailure=await this.__getFailure(l)}catch(e){this.__linkFailure="generic"}finally{this.__isFetching=!1}}async __getFailure(e){return await s(e)?"access_denied":"generic"}get __loadFailure(){const e=this.renderRoot.querySelectorAll("[data-link-page]"),i=Array.from(e).filter((e=>e.in("fail")));return 0===i.length?null:i.some((e=>e.accessDenied))?"access_denied":"generic"}__renderLinkResourceLoaders(){var e,i,t;const r=200,s=this.renderRoot.querySelector("[data-link-page]"),n=Number(null!==(i=null===(e=null==s?void 0:s.data)||void 0===e?void 0:e.total_items)&&void 0!==i?i:r),l=[];try{for(let e=0;e<Math.max(1,Math.ceil(n/r));e++){const i=new URL(null!==(t=this.linksHref)&&void 0!==t?t:"");i.searchParams.set("offset",String(e*r)),i.searchParams.set("limit",String(r)),l.push(i.toString())}}catch(e){}return l.map((e=>a(_||(_=y` <foxy-nucleon class="hidden" data-link-page infer="" href="${0}" @update="${0}"> </foxy-nucleon> `),e,(()=>this.requestUpdate()))))}get __allLinks(){var e,i;const t=this.embedKey;if(!t)return null;const r=this.renderRoot.querySelectorAll("[data-link-page]"),s=[];for(const n of r){const r=null===(i=null===(e=n.data)||void 0===e?void 0:e._embedded)||void 0===i?void 0:i[t];if(!r)return null;s.push(...r)}return s}});try{d("vaadin-checkbox",o(m||(m=g`:host(.foxy-internal-checkbox-style-0) label{display:flex}`)))}catch(e){}
1
+ import"./shared-40a4e82a.js";import"./foxy-collection-page.js";import"./foxy-nucleon-element.js";import"./foxy-pagination.js";import"./shared-f2e36f0f.js";import{I as e}from"./shared-b9142668.js";import{m as i,_ as t}from"./shared-8f9014ff.js";import{N as r,i as s}from"./shared-c85c1864.js";import{i as n}from"./shared-53e42a77.js";import{c as l}from"./shared-4e709717.js";import{h as a,c as o}from"./shared-ba5c42c7.js";import{I as d}from"./shared-45c7e449.js";let c,h,u,f,_,y=e=>e;let m,g=e=>e;customElements.define("foxy-internal-async-resource-link-list-control",class extends e{constructor(){super(...arguments),this.foreignKeyForUri=null,this.foreignKeyForId=null,this.ownKeyForUri=null,this.optionsHref=null,this.linksHref=null,this.embedKey=null,this.ownUri=null,this.limit=20,this.item=null,this.__getItemRenderer=i(((e,i)=>new Function("ctx",`return ctx.html\`\n <${null!=e?e:"foxy-null"}\n related=\${JSON.stringify(ctx.related)}\n parent=\${ctx.parent}\n infer=""\n ${i?".data=${ctx.data}":"href=${ctx.href}"}\n ...=\${ctx.spread(ctx.props)}\n >\n </${null!=e?e:"foxy-null"}>\``)),((...e)=>e.join())),this.__renderItem=e=>{var i;const t=this.__getItemRenderer(this.item,!!e.data),r=e=>a(c||(c=y` <div style="padding:calc(.625em + (var(--lumo-border-radius)/ 4) - 1px)">${0}</div> `),e);if(!e.href||e.href.startsWith("foxy://"))return r(t(e));if(this.readonly)return r(t(e));const s=this.foreignKeyForUri,n=s?null===(i=this.__allLinks)||void 0===i?void 0:i.find((i=>i[s]===e.href)):void 0,l=this.disabled||!this.__allLinks||this.__isFetching;return r(a(h||(h=y` <vaadin-checkbox class="block foxy-internal-checkbox-style-0" ?disabled="${0}" ?checked="${0}" @change="${0}"> <div class="transition-opacity ${0}"> ${0} </div> </vaadin-checkbox> `),l,!!n,(i=>{var t,r,s;i.currentTarget.checked?this.__insertLink(null!==(r=null===(t=e.data)||void 0===t?void 0:t._links.self.href)&&void 0!==r?r:""):this.__deleteLink(null!==(s=null==n?void 0:n._links.self.href)&&void 0!==s?s:"")}),l?"opacity-50":"opacity-100",t(e)))},this.__isFetching=!1,this.__linkFailure=null}static get properties(){return t(t({},super.properties),{},{foreignKeyForUri:{attribute:"foreign-key-for-uri"},foreignKeyForId:{attribute:"foreign-key-for-id"},ownKeyForUri:{attribute:"own-key-for-uri"},optionsHref:{attribute:"options-href"},linksHref:{attribute:"links-href"},embedKey:{attribute:"embed-key"},ownUri:{attribute:"own-uri"},limit:{type:Number},item:{},__isFetching:{attribute:!1},__linkFailure:{attribute:!1}})}static get styles(){return[super.styles,o(u||(u=y`vaadin-checkbox::part(label){margin:0 0 0 calc(.625em + (var(--lumo-border-radius)/ 4) - 1px);align-self:center;flex:1}`))]}renderControl(){var e,i;let t;try{const i=new URL(null!==(e=this.optionsHref)&&void 0!==e?e:"");i.searchParams.set("limit",this.limit.toString()),t=i.toString()}catch(e){t=void 0}const r=this.__loadFailure,s=null!==(i=this.__linkFailure)&&void 0!==i?i:r,o=!r&&(this.__isFetching||!this.__allLinks);return a(f||(f=y` <div class="group"> <div class="mb-s" ?hidden="${0}"> <div class="flex justify-between font-medium text-l" ?hidden="${0}"> <span>${0}</span> <foxy-i18n class="text-m text-tertiary font-normal transition-opacity ${0}" infer="" key="${0}"> </foxy-i18n> </div> <div class="text-secondary text-s" ?hidden="${0}">${0}</div> </div> <foxy-pagination first="${0}" infer="pagination"> <foxy-collection-page infer="card" class="${0}" .item="${0}"> </foxy-collection-page> </foxy-pagination> <div class="mt-s text-s leading-xs text-error" ?hidden="${0}"> ${0} </div> <foxy-i18n class="block mt-s text-s leading-xs text-error" infer="spinner" key="${0}" ?hidden="${0}"> </foxy-i18n> ${0} </div> `),!this.label&&!this.helperText,!this.label,this.label,o?"opacity-100":"opacity-0",this.__isFetching?"status_saving":"status_loading",!this.helperText,this.helperText,n(t),l({"block transition-colors divide-y rounded overflow-hidden":!0,"bg-contrast-5 divide-base":!0}),this.__renderItem,!this._errorMessage||this.disabled||this.readonly,this._errorMessage,"access_denied"===s?"loading_access_denied":"loading_error",!s,this.__renderLinkResourceLoaders())}updated(e){var i,t;super.updated(e),e.has("item")&&(null===(t=(i=this.__getItemRenderer.cache).clear)||void 0===t||t.call(i))}async __insertLink(e){var i,t,s,n,l,a;this.__isFetching=!0,this.__linkFailure=null;try{const o=new r.API(this),d=await o.fetch(null!==(i=this.linksHref)&&void 0!==i?i:"",{method:"POST",body:JSON.stringify({[null!==(t=this.foreignKeyForUri)&&void 0!==t?t:""]:e,[null!==(s=this.ownKeyForUri)&&void 0!==s?s:""]:this.ownUri})});if(!d.ok)return void(this.__linkFailure=await this.__getFailure(d));const c=await d.json(),h=await o.fetch(c._links.self.href);if(h.ok){const e=r.Rumour(null!==(l=null===(n=this.nucleon)||void 0===n?void 0:n.group)&&void 0!==l?l:""),i=await h.json();e.share({related:[null!==(a=this.linksHref)&&void 0!==a?a:""],source:c._links.self.href,data:i})}else this.__linkFailure=await this.__getFailure(h)}catch(e){this.__linkFailure="generic"}finally{this.__isFetching=!1}}async __deleteLink(e){var i,t,s;this.__isFetching=!0,this.__linkFailure=null;try{const n=new r.API(this),l=await n.fetch(e,{method:"DELETE"});if(l.ok){r.Rumour(null!==(t=null===(i=this.nucleon)||void 0===i?void 0:i.group)&&void 0!==t?t:"").share({related:[null!==(s=this.linksHref)&&void 0!==s?s:""],source:e,data:null})}else this.__linkFailure=await this.__getFailure(l)}catch(e){this.__linkFailure="generic"}finally{this.__isFetching=!1}}async __getFailure(e){return await s(e)?"access_denied":"generic"}get __loadFailure(){const e=this.renderRoot.querySelectorAll("[data-link-page]"),i=Array.from(e).filter((e=>e.in("fail")));return 0===i.length?null:i.some((e=>e.accessDenied))?"access_denied":"generic"}__renderLinkResourceLoaders(){var e,i,t;const r=200,s=this.renderRoot.querySelector("[data-link-page]"),n=Number(null!==(i=null===(e=null==s?void 0:s.data)||void 0===e?void 0:e.total_items)&&void 0!==i?i:r),l=[];try{for(let e=0;e<Math.max(1,Math.ceil(n/r));e++){const i=new URL(null!==(t=this.linksHref)&&void 0!==t?t:"");i.searchParams.set("offset",String(e*r)),i.searchParams.set("limit",String(r)),l.push(i.toString())}}catch(e){}return l.map((e=>a(_||(_=y` <foxy-nucleon class="hidden" data-link-page infer="" href="${0}" @update="${0}"> </foxy-nucleon> `),e,(()=>this.requestUpdate()))))}get __allLinks(){var e,i;const t=this.embedKey;if(!t)return null;const r=this.renderRoot.querySelectorAll("[data-link-page]"),s=[];for(const n of r){const r=null===(i=null===(e=n.data)||void 0===e?void 0:e._embedded)||void 0===i?void 0:i[t];if(!r)return null;s.push(...r)}return s}});try{d("vaadin-checkbox",o(m||(m=g`:host(.foxy-internal-checkbox-style-0) label{display:flex}`)))}catch(e){}
@@ -0,0 +1 @@
1
+ import{_ as e}from"./shared-8f9014ff.js";import{h as t}from"./shared-ba5c42c7.js";import{C as l}from"./shared-222b23bb.js";import"./foxy-nucleon-element.js";import{R as s,T as a,a as i}from"./shared-45c7e449.js";import{c as r}from"./shared-4e709717.js";import{N as d}from"./shared-c85c1864.js";let n,o,h,c,m,u,b=e=>e;const p=l(s(a(i(d))));class v extends p{constructor(){super(...arguments),this.columns=[]}static get properties(){return e(e({},super.properties),{},{columns:{attribute:!1}})}render(){var e,l;const s=this.columns.some((e=>!!e.header));return t(n||(n=b` <div data-testid="wrapper" aria-busy="${0}" aria-live="polite" class="relative font-lumo text-m"> <table class="table-fixed w-full" data-testid="table"> ${0} <tbody class="divide-y divide-contrast-10"> ${0} </tbody> </table> ${0} </div> ${0} `),this.in("busy"),s?t(o||(o=b` <thead class="border-b border-contrast-10"> <tr> ${0} </tr> </thead> `),this.columns.map(((e,l)=>{var s;return t(h||(h=b` <th class="${0}"> ${0} </th> `),r({"truncate h-l text-secondary text-m text-left font-medium":!0,"text-right":l===this.columns.length-1,"hidden sm-table-cell":"sm"===e.hideBelow,"hidden md-table-cell":"md"===e.hideBelow,"hidden lg-table-cell":"lg"===e.hideBelow,"hidden xl-table-cell":"xl"===e.hideBelow}),null===(s=e.header)||void 0===s?void 0:s.call(e,{html:t,lang:this.lang,data:this.data,ns:this.ns}))}))):"",this.__rows.map((e=>{var l;return t(c||(c=b` <tr class="h-l"> ${0} </tr> `),null===(l=this.columns)||void 0===l?void 0:l.map(((l,s)=>{var a;return t(m||(m=b` <td class="${0}"> ${0} </td> `),r({"text-right":s===this.columns.length-1,"hidden sm-table-cell":"sm"===l.hideBelow,"hidden md-table-cell":"md"===l.hideBelow,"hidden lg-table-cell":"lg"===l.hideBelow,"hidden xl-table-cell":"xl"===l.hideBelow,"truncate h-l text-body":!0}),e?null===(a=l.cell)||void 0===a?void 0:a.call(l,{html:t,lang:this.lang,data:e,ns:this.ns}):"")})))})),this.in({idle:"snapshot"})?"":t(u||(u=b` <div class="absolute inset-0 flex items-center justify-center"> <foxy-spinner data-testid="spinner" layout="vertical" state="${0}" error-type="${0}" class="p-m bg-base shadow-xs rounded-t-l rounded-b-l" lang="${0}" ns="${0} ${0}"> </foxy-spinner> </div> `),this.in("busy")?"busy":this.in("idle")?"empty":"error",this.accessDenied?"access-denied":"generic",this.lang,this.ns,null!==(l=null===(e=customElements.get("foxy-spinner"))||void 0===e?void 0:e.defaultNS)&&void 0!==l?l:""),this.renderTemplateOrSlot())}get __rows(){var e,t,l;const s=Object.values(null!==(t=null===(e=this.data)||void 0===e?void 0:e._embedded)&&void 0!==t?t:{}).reduce(((e,t)=>[...e,...t]),[]);let a;if(0===s.length)try{const e=new URL(null!==(l=this.href)&&void 0!==l?l:"").searchParams.get("limit"),t=parseInt(null!=e?e:"");a=isNaN(t)?20:t}catch(e){a=20}else a=s.length;return new Array(a).fill(null).map(((e,t)=>{var l;return null!==(l=s[t])&&void 0!==l?l:e}))}}export{v as T};
@@ -1,4 +1,4 @@
1
- import"./shared-dc6e5879.js";import"./shared-6262e0d6.js";import{h as e,G as t,P as a,D as i,t as s,b as o,s as r}from"./shared-f410644a.js";import{C as n}from"./shared-a8ae24f0.js";import"./shared-28cc8aa1.js";import"./shared-e9f51baa.js";import{T as l}from"./shared-53a5212e.js";import"./shared-48910b3f.js";import{T as d,D as h,E as u}from"./shared-f77994ad.js";import{O as c,I as p,a as m}from"./shared-d8b880bb.js";import{D as _,t as f,f as v,a as g}from"./shared-c3d6bcc0.js";import{a as y,b}from"./shared-2fbfbe12.js";const D=e`<dom-module id="lumo-date-picker-overlay" theme-for="vaadin-date-picker-overlay">
1
+ import"./shared-b8949649.js";import"./shared-64de5f0c.js";import{h as e,l as t,G as a,P as i,c as s,D as o,t as r,f as n,o as l,s as d,n as h}from"./shared-cf151085.js";import"./shared-45c7e449.js";import"./shared-9dc42d11.js";import"./shared-e52affbe.js";import"./shared-61c4d03e.js";import{T as u}from"./shared-008f545f.js";import"./shared-a534736d.js";import{T as c,D as p,E as m}from"./shared-3bce049d.js";import{C as _}from"./shared-61ade33e.js";import{O as f,I as v,a as g}from"./shared-753a50d4.js";import{a as y,b}from"./shared-9decd661.js";const D=e`<dom-module id="lumo-date-picker-overlay" theme-for="vaadin-date-picker-overlay">
2
2
  <template>
3
3
  <style include="lumo-menu-overlay">
4
4
  [part="overlay"] {
@@ -433,13 +433,13 @@ import"./shared-dc6e5879.js";import"./shared-6262e0d6.js";import{h as e,G as t,P
433
433
  Copyright (c) 2019 Vaadin Ltd.
434
434
  This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
435
435
  */
436
- const C=document.createElement("template");C.innerHTML='<dom-module id="vaadin-date-picker-text-field-styles" theme-for="vaadin-date-picker-text-field">\n <template>\n <style>\n :host([dir="rtl"]) [part="input-field"] {\n direction: ltr;\n }\n\n :host([dir="rtl"]) [part="value"]::placeholder {\n direction: rtl;\n text-align: left;\n }\n\n :host([dir="rtl"]) [part="input-field"] ::slotted(input)::placeholder {\n direction: rtl;\n text-align: left;\n }\n\n :host([dir="rtl"]) [part="value"]:-ms-input-placeholder,\n :host([dir="rtl"]) [part="input-field"] ::slotted(input):-ms-input-placeholder {\n direction: rtl;\n text-align: left;\n }\n </style>\n </template>\n</dom-module>',document.head.appendChild(C.content);class E extends l{static get is(){return"vaadin-date-picker-text-field"}}customElements.define(E.is,E);
436
+ const C=document.createElement("template");C.innerHTML='<dom-module id="vaadin-date-picker-text-field-styles" theme-for="vaadin-date-picker-text-field">\n <template>\n <style>\n :host([dir="rtl"]) [part="input-field"] {\n direction: ltr;\n }\n\n :host([dir="rtl"]) [part="value"]::placeholder {\n direction: rtl;\n text-align: left;\n }\n\n :host([dir="rtl"]) [part="input-field"] ::slotted(input)::placeholder {\n direction: rtl;\n text-align: left;\n }\n\n :host([dir="rtl"]) [part="value"]:-ms-input-placeholder,\n :host([dir="rtl"]) [part="input-field"] ::slotted(input):-ms-input-placeholder {\n direction: rtl;\n text-align: left;\n }\n </style>\n </template>\n</dom-module>',document.head.appendChild(C.content);class E extends u{static get is(){return"vaadin-date-picker-text-field"}}customElements.define(E.is,E);
437
437
  /**
438
438
  @license
439
439
  Copyright (c) 2017 Vaadin Ltd.
440
440
  This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
441
441
  */
442
- class M extends(_(c)){static get is(){return"vaadin-date-picker-overlay"}}customElements.define(M.is,M);
442
+ class M extends(t(f)){static get is(){return"vaadin-date-picker-overlay"}}customElements.define(M.is,M);
443
443
  /**
444
444
  @license
445
445
  Copyright (c) 2017 Vaadin Ltd.
@@ -450,7 +450,7 @@ const T=class{static _getISOWeekNumber(e){var t=e.getDay();0===t&&(t=7);var a=4-
450
450
  @license
451
451
  Copyright (c) 2017 Vaadin Ltd.
452
452
  This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
453
- */class I extends(d(t(a))){static get template(){return e`
453
+ */class I extends(c(a(i))){static get template(){return e`
454
454
  <style>
455
455
  :host {
456
456
  display: block;
@@ -522,7 +522,7 @@ This program is available under Apache License Version 2.0, available at https:/
522
522
  Copyright (c) 2017 Vaadin Ltd.
523
523
  This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
524
524
  */
525
- class A extends a{static get template(){return e`
525
+ class A extends i{static get template(){return e`
526
526
  <style>
527
527
  :host {
528
528
  display: block;
@@ -569,13 +569,13 @@ class A extends a{static get template(){return e`
569
569
  <div class="buffer"></div>
570
570
  <div id="fullHeight"></div>
571
571
  </div>
572
- `}static get is(){return"vaadin-infinite-scroller"}static get properties(){return{bufferSize:{type:Number,value:20},_initialScroll:{value:5e5},_initialIndex:{value:0},_buffers:Array,_preventScrollEvent:Boolean,_mayHaveMomentum:Boolean,_initialized:Boolean,active:{type:Boolean,observer:"_activated"}}}ready(){super.ready(),this._buffers=Array.prototype.slice.call(this.root.querySelectorAll(".buffer")),this.$.fullHeight.style.height=2*this._initialScroll+"px";var e=this.querySelector("template");this._TemplateClass=f(e,this,{forwardHostProp:function(e,t){"index"!==e&&this._buffers.forEach((a=>{[].forEach.call(a.children,(a=>{a._itemWrapper.instance[e]=t}))}))}}),navigator.userAgent.toLowerCase().indexOf("firefox")>-1&&(this.$.scroller.tabIndex=-1)}forceUpdate(){this._debouncerUpdateClones&&(this._buffers[0].updated=this._buffers[1].updated=!1,this._updateClones(),this._debouncerUpdateClones.cancel())}_activated(e){e&&!this._initialized&&(this._createPool(),this._initialized=!0)}_finishInit(){this._initDone||(this._buffers.forEach((e=>{[].forEach.call(e.children,(e=>this._ensureStampedInstance(e._itemWrapper)))}),this),this._buffers[0].translateY||this._reset(),this._initDone=!0)}_translateBuffer(e){var t=e?1:0;this._buffers[t].translateY=this._buffers[t?0:1].translateY+this._bufferHeight*(t?-1:1),this._buffers[t].style.transform="translate3d(0, "+this._buffers[t].translateY+"px, 0)",this._buffers[t].updated=!1,this._buffers.reverse()}_scroll(){if(this._scrollDisabled)return;var e=this.$.scroller.scrollTop;(e<this._bufferHeight||e>2*this._initialScroll-this._bufferHeight)&&(this._initialIndex=~~this.position,this._reset());const t=this.itemHeight+this.bufferOffset,a=e>this._buffers[1].translateY+t,o=e<this._buffers[0].translateY+t;(a||o)&&(this._translateBuffer(o),this._updateClones()),this._preventScrollEvent||(this.dispatchEvent(new CustomEvent("custom-scroll",{bubbles:!1,composed:!0})),this._mayHaveMomentum=!0),this._preventScrollEvent=!1,this._debouncerScrollFinish=i.debounce(this._debouncerScrollFinish,s.after(200),(()=>{var e=this.$.scroller.getBoundingClientRect();this._isVisible(this._buffers[0],e)||this._isVisible(this._buffers[1],e)||(this.position=this.position)}))}set position(e){this._preventScrollEvent=!0,e>this._firstIndex&&e<this._firstIndex+2*this.bufferSize?this.$.scroller.scrollTop=this.itemHeight*(e-this._firstIndex)+this._buffers[0].translateY:(this._initialIndex=~~e,this._reset(),this._scrollDisabled=!0,this.$.scroller.scrollTop+=e%1*this.itemHeight,this._scrollDisabled=!1),this._mayHaveMomentum&&(this.$.scroller.classList.add("notouchscroll"),this._mayHaveMomentum=!1,setTimeout((()=>{this.$.scroller.classList.remove("notouchscroll")}),10))}get bufferOffset(){return this._buffers[0].offsetTop}get position(){return(this.$.scroller.scrollTop-this._buffers[0].translateY)/this.itemHeight+this._firstIndex}get itemHeight(){if(!this._itemHeightVal){window.ShadyCSS&&window.ShadyCSS.nativeCss||this.updateStyles();const e=window.ShadyCSS?window.ShadyCSS.getComputedStyleValue(this,"--vaadin-infinite-scroller-item-height"):getComputedStyle(this).getPropertyValue("--vaadin-infinite-scroller-item-height"),t="background-position";this.$.fullHeight.style.setProperty(t,e);const a=getComputedStyle(this.$.fullHeight).getPropertyValue(t);this.$.fullHeight.style.removeProperty(t),this._itemHeightVal=parseFloat(a)}return this._itemHeightVal}get _bufferHeight(){return this.itemHeight*this.bufferSize}_reset(){this._scrollDisabled=!0,this.$.scroller.scrollTop=this._initialScroll,this._buffers[0].translateY=this._initialScroll-this._bufferHeight,this._buffers[1].translateY=this._initialScroll,this._buffers.forEach((e=>{e.style.transform="translate3d(0, "+e.translateY+"px, 0)"})),this._buffers[0].updated=this._buffers[1].updated=!1,this._updateClones(!0),this._debouncerUpdateClones=i.debounce(this._debouncerUpdateClones,s.after(200),(()=>{this._buffers[0].updated=this._buffers[1].updated=!1,this._updateClones()})),this._scrollDisabled=!1}_createPool(){var e=this.getBoundingClientRect();this._buffers.forEach((t=>{for(var a=0;a<this.bufferSize;a++){const a=document.createElement("div");a.style.height=this.itemHeight+"px",a.instance={};const i="vaadin-infinite-scroller-item-content-"+(A._contentIndex=A._contentIndex+1||0),s=document.createElement("slot");s.setAttribute("name",i),s._itemWrapper=a,t.appendChild(s),a.setAttribute("slot",i),this.appendChild(a),v(),setTimeout((()=>{this._isVisible(a,e)&&this._ensureStampedInstance(a)}),1)}}),this),setTimeout((()=>{y(this,this._finishInit.bind(this))}),1)}_ensureStampedInstance(e){if(!e.firstElementChild){var t=e.instance;e.instance=new this._TemplateClass({}),e.appendChild(e.instance.root),Object.keys(t).forEach((a=>{e.instance.set(a,t[a])}))}}_updateClones(e){this._firstIndex=~~((this._buffers[0].translateY-this._initialScroll)/this.itemHeight)+this._initialIndex;var t=e?this.$.scroller.getBoundingClientRect():void 0;this._buffers.forEach(((a,i)=>{if(!a.updated){var s=this._firstIndex+this.bufferSize*i;[].forEach.call(a.children,((a,i)=>{const o=a._itemWrapper;e&&!this._isVisible(o,t)||(o.instance.index=s+i)})),a.updated=!0}}),this)}_isVisible(e,t){var a=e.getBoundingClientRect();return a.bottom>t.top&&a.top<t.bottom}}customElements.define(A.is,A);const O=document.createElement("template");O.innerHTML='<dom-module id="vaadin-date-picker-overlay-styles" theme-for="vaadin-date-picker-overlay">\n <template>\n <style>\n :host {\n align-items: flex-start;\n justify-content: flex-start;\n }\n\n :host([bottom-aligned]) {\n justify-content: flex-end;\n }\n\n :host([right-aligned]) {\n align-items: flex-end;\n }\n\n :host([dir="rtl"]) {\n align-items: flex-end;\n }\n\n :host([dir="rtl"][right-aligned]) {\n align-items: flex-start;\n }\n\n [part="overlay"] {\n display: flex;\n flex: auto;\n }\n\n [part~="content"] {\n flex: auto;\n }\n </style>\n </template>\n</dom-module>',document.head.appendChild(O.content);
572
+ `}static get is(){return"vaadin-infinite-scroller"}static get properties(){return{bufferSize:{type:Number,value:20},_initialScroll:{value:5e5},_initialIndex:{value:0},_buffers:Array,_preventScrollEvent:Boolean,_mayHaveMomentum:Boolean,_initialized:Boolean,active:{type:Boolean,observer:"_activated"}}}ready(){super.ready(),this._buffers=Array.prototype.slice.call(this.root.querySelectorAll(".buffer")),this.$.fullHeight.style.height=2*this._initialScroll+"px";var e=this.querySelector("template");this._TemplateClass=s(e,this,{forwardHostProp:function(e,t){"index"!==e&&this._buffers.forEach((a=>{[].forEach.call(a.children,(a=>{a._itemWrapper.instance[e]=t}))}))}}),navigator.userAgent.toLowerCase().indexOf("firefox")>-1&&(this.$.scroller.tabIndex=-1)}forceUpdate(){this._debouncerUpdateClones&&(this._buffers[0].updated=this._buffers[1].updated=!1,this._updateClones(),this._debouncerUpdateClones.cancel())}_activated(e){e&&!this._initialized&&(this._createPool(),this._initialized=!0)}_finishInit(){this._initDone||(this._buffers.forEach((e=>{[].forEach.call(e.children,(e=>this._ensureStampedInstance(e._itemWrapper)))}),this),this._buffers[0].translateY||this._reset(),this._initDone=!0)}_translateBuffer(e){var t=e?1:0;this._buffers[t].translateY=this._buffers[t?0:1].translateY+this._bufferHeight*(t?-1:1),this._buffers[t].style.transform="translate3d(0, "+this._buffers[t].translateY+"px, 0)",this._buffers[t].updated=!1,this._buffers.reverse()}_scroll(){if(this._scrollDisabled)return;var e=this.$.scroller.scrollTop;(e<this._bufferHeight||e>2*this._initialScroll-this._bufferHeight)&&(this._initialIndex=~~this.position,this._reset());const t=this.itemHeight+this.bufferOffset,a=e>this._buffers[1].translateY+t,i=e<this._buffers[0].translateY+t;(a||i)&&(this._translateBuffer(i),this._updateClones()),this._preventScrollEvent||(this.dispatchEvent(new CustomEvent("custom-scroll",{bubbles:!1,composed:!0})),this._mayHaveMomentum=!0),this._preventScrollEvent=!1,this._debouncerScrollFinish=o.debounce(this._debouncerScrollFinish,r.after(200),(()=>{var e=this.$.scroller.getBoundingClientRect();this._isVisible(this._buffers[0],e)||this._isVisible(this._buffers[1],e)||(this.position=this.position)}))}set position(e){this._preventScrollEvent=!0,e>this._firstIndex&&e<this._firstIndex+2*this.bufferSize?this.$.scroller.scrollTop=this.itemHeight*(e-this._firstIndex)+this._buffers[0].translateY:(this._initialIndex=~~e,this._reset(),this._scrollDisabled=!0,this.$.scroller.scrollTop+=e%1*this.itemHeight,this._scrollDisabled=!1),this._mayHaveMomentum&&(this.$.scroller.classList.add("notouchscroll"),this._mayHaveMomentum=!1,setTimeout((()=>{this.$.scroller.classList.remove("notouchscroll")}),10))}get bufferOffset(){return this._buffers[0].offsetTop}get position(){return(this.$.scroller.scrollTop-this._buffers[0].translateY)/this.itemHeight+this._firstIndex}get itemHeight(){if(!this._itemHeightVal){window.ShadyCSS&&window.ShadyCSS.nativeCss||this.updateStyles();const e=window.ShadyCSS?window.ShadyCSS.getComputedStyleValue(this,"--vaadin-infinite-scroller-item-height"):getComputedStyle(this).getPropertyValue("--vaadin-infinite-scroller-item-height"),t="background-position";this.$.fullHeight.style.setProperty(t,e);const a=getComputedStyle(this.$.fullHeight).getPropertyValue(t);this.$.fullHeight.style.removeProperty(t),this._itemHeightVal=parseFloat(a)}return this._itemHeightVal}get _bufferHeight(){return this.itemHeight*this.bufferSize}_reset(){this._scrollDisabled=!0,this.$.scroller.scrollTop=this._initialScroll,this._buffers[0].translateY=this._initialScroll-this._bufferHeight,this._buffers[1].translateY=this._initialScroll,this._buffers.forEach((e=>{e.style.transform="translate3d(0, "+e.translateY+"px, 0)"})),this._buffers[0].updated=this._buffers[1].updated=!1,this._updateClones(!0),this._debouncerUpdateClones=o.debounce(this._debouncerUpdateClones,r.after(200),(()=>{this._buffers[0].updated=this._buffers[1].updated=!1,this._updateClones()})),this._scrollDisabled=!1}_createPool(){var e=this.getBoundingClientRect();this._buffers.forEach((t=>{for(var a=0;a<this.bufferSize;a++){const a=document.createElement("div");a.style.height=this.itemHeight+"px",a.instance={};const i="vaadin-infinite-scroller-item-content-"+(A._contentIndex=A._contentIndex+1||0),s=document.createElement("slot");s.setAttribute("name",i),s._itemWrapper=a,t.appendChild(s),a.setAttribute("slot",i),this.appendChild(a),n(),setTimeout((()=>{this._isVisible(a,e)&&this._ensureStampedInstance(a)}),1)}}),this),setTimeout((()=>{y(this,this._finishInit.bind(this))}),1)}_ensureStampedInstance(e){if(!e.firstElementChild){var t=e.instance;e.instance=new this._TemplateClass({}),e.appendChild(e.instance.root),Object.keys(t).forEach((a=>{e.instance.set(a,t[a])}))}}_updateClones(e){this._firstIndex=~~((this._buffers[0].translateY-this._initialScroll)/this.itemHeight)+this._initialIndex;var t=e?this.$.scroller.getBoundingClientRect():void 0;this._buffers.forEach(((a,i)=>{if(!a.updated){var s=this._firstIndex+this.bufferSize*i;[].forEach.call(a.children,((a,i)=>{const o=a._itemWrapper;e&&!this._isVisible(o,t)||(o.instance.index=s+i)})),a.updated=!0}}),this)}_isVisible(e,t){var a=e.getBoundingClientRect();return a.bottom>t.top&&a.top<t.bottom}}customElements.define(A.is,A);const O=document.createElement("template");O.innerHTML='<dom-module id="vaadin-date-picker-overlay-styles" theme-for="vaadin-date-picker-overlay">\n <template>\n <style>\n :host {\n align-items: flex-start;\n justify-content: flex-start;\n }\n\n :host([bottom-aligned]) {\n justify-content: flex-end;\n }\n\n :host([right-aligned]) {\n align-items: flex-end;\n }\n\n :host([dir="rtl"]) {\n align-items: flex-end;\n }\n\n :host([dir="rtl"][right-aligned]) {\n align-items: flex-start;\n }\n\n [part="overlay"] {\n display: flex;\n flex: auto;\n }\n\n [part~="content"] {\n flex: auto;\n }\n </style>\n </template>\n</dom-module>',document.head.appendChild(O.content);
573
573
  /**
574
574
  @license
575
575
  Copyright (c) 2017 Vaadin Ltd.
576
576
  This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
577
577
  */
578
- class $ extends(d(h(t(a)))){static get template(){return e`
578
+ class $ extends(c(p(a(i)))){static get template(){return e`
579
579
  <style>
580
580
  :host {
581
581
  display: flex;
@@ -754,18 +754,18 @@ class $ extends(d(h(t(a)))){static get template(){return e`
754
754
  </div>
755
755
 
756
756
  <iron-media-query query="(min-width: 375px)" query-matches="{{_desktopMode}}"></iron-media-query>
757
- `}static get is(){return"vaadin-date-picker-overlay-content"}static get properties(){return{selectedDate:{type:Date,notify:!0},focusedDate:{type:Date,notify:!0,observer:"_focusedDateChanged"},_focusedMonthDate:Number,initialPosition:{type:Date,observer:"_initialPositionChanged"},_originDate:{value:new Date},_visibleMonthIndex:Number,_desktopMode:Boolean,_translateX:{observer:"_translateXChanged"},_yearScrollerWidth:{value:50},i18n:{type:Object},showWeekNumbers:{type:Boolean},_ignoreTaps:Boolean,_notTapping:Boolean,minDate:Date,maxDate:Date,_focused:Boolean,label:String}}get __isRTL(){return"rtl"===this.getAttribute("dir")}get __useSubMonthScrolling(){return this.$.monthScroller.clientHeight<this.$.monthScroller.itemHeight+this.$.monthScroller.bufferOffset}ready(){super.ready(),this.setAttribute("tabindex",0),this.addEventListener("keydown",this._onKeydown.bind(this)),o(this,"tap",this._stopPropagation),this.addEventListener("focus",this._onOverlayFocus.bind(this)),this.addEventListener("blur",this._onOverlayBlur.bind(this))}connectedCallback(){super.connectedCallback(),this._closeYearScroller(),this._toggleAnimateClass(!0),r(this.$.scrollers,"pan-y"),p.requestAvailability()}announceFocusedDate(){var e=this._currentlyFocusedDate(),t=[];T._dateEquals(e,new Date)&&t.push(this.i18n.today),t=t.concat([this.i18n.weekdays[e.getDay()],e.getDate(),this.i18n.monthNames[e.getMonth()],e.getFullYear()]),this.showWeekNumbers&&1===this.i18n.firstDayOfWeek&&(t.push(this.i18n.week),t.push(T._getISOWeekNumber(e))),this.dispatchEvent(new CustomEvent("iron-announce",{bubbles:!0,composed:!0,detail:{text:t.join(" ")}}))}focusCancel(){this.$.cancelButton.focus()}scrollToDate(e,t){const a=this.__useSubMonthScrolling?this._calculateWeekScrollOffset(e):0;this._scrollToPosition(this._differenceInMonths(e,this._originDate)+a,t),this.$.monthScroller.forceUpdate()}_focusedDateChanged(e){this.revealDate(e)}_isCurrentYear(e){return 0===e}_isSelectedYear(e,t){if(t)return t.getFullYear()===this._originDate.getFullYear()+e}revealDate(e,t=!0){if(!e)return;const a=this._differenceInMonths(e,this._originDate);if(this.__useSubMonthScrolling){const i=this._calculateWeekScrollOffset(e);return void this._scrollToPosition(a+i,t)}const i=this.$.monthScroller.position>a,s=Math.max(this.$.monthScroller.itemHeight,this.$.monthScroller.clientHeight-2*this.$.monthScroller.bufferOffset)/this.$.monthScroller.itemHeight,o=this.$.monthScroller.position+s-1<a;i?this._scrollToPosition(a,t):o&&this._scrollToPosition(a-s+1,t)}_calculateWeekScrollOffset(e){const t=new Date(0,0);t.setFullYear(e.getFullYear()),t.setMonth(e.getMonth()),t.setDate(1);let a=0;for(;t.getDate()<e.getDate();)t.setDate(t.getDate()+1),t.getDay()===this.i18n.firstDayOfWeek&&(a+=1);return a/6}_onOverlayFocus(){this._focused=!0}_onOverlayBlur(){this._focused=!1}_initialPositionChanged(e){this.scrollToDate(e)}_repositionYearScroller(){this._visibleMonthIndex=Math.floor(this.$.monthScroller.position),this.$.yearScroller.position=(this.$.monthScroller.position+this._originDate.getMonth())/12}_repositionMonthScroller(){this.$.monthScroller.position=12*this.$.yearScroller.position-this._originDate.getMonth(),this._visibleMonthIndex=Math.floor(this.$.monthScroller.position)}_onMonthScroll(){this._repositionYearScroller(),this._doIgnoreTaps()}_onYearScroll(){this._repositionMonthScroller(),this._doIgnoreTaps()}_onYearScrollTouchStart(){this._notTapping=!1,setTimeout((()=>this._notTapping=!0),300),this._repositionMonthScroller()}_onMonthScrollTouchStart(){this._repositionYearScroller()}_doIgnoreTaps(){this._ignoreTaps=!0,this._debouncer=i.debounce(this._debouncer,s.after(300),(()=>this._ignoreTaps=!1))}_formatDisplayed(e,t,a){return e?t(T._extractDateParts(e)):a}_onTodayTap(){var e=new Date;Math.abs(this.$.monthScroller.position-this._differenceInMonths(e,this._originDate))<.001?(this.selectedDate=e,this._close()):this._scrollToCurrentMonth()}_scrollToCurrentMonth(){this.focusedDate&&(this.focusedDate=new Date),this.scrollToDate(new Date,!0)}_showClear(e){return!!e}_onYearTap(e){if(!this._ignoreTaps&&!this._notTapping){var t=(e.detail.y-(this.$.yearScroller.getBoundingClientRect().top+this.$.yearScroller.clientHeight/2))/this.$.yearScroller.itemHeight;this._scrollToPosition(this.$.monthScroller.position+12*t,!0)}}_scrollToPosition(e,t){if(void 0===this._targetPosition){if(!t)return this.$.monthScroller.position=e,this._targetPosition=void 0,void this._repositionYearScroller();this._targetPosition=e;var a=t?300:0,i=0,s=this.$.monthScroller.position,o=e=>{var t,r,n,l=e-(i=i||e);if(l<a){var d=(t=l,r=s,n=this._targetPosition-s,(t/=a/2)<1?n/2*t*t+r:-n/2*(--t*(t-2)-1)+r);this.$.monthScroller.position=d,window.requestAnimationFrame(o)}else this.dispatchEvent(new CustomEvent("scroll-animation-finished",{bubbles:!0,composed:!0,detail:{position:this._targetPosition,oldPosition:s}})),this.$.monthScroller.position=this._targetPosition,this._targetPosition=void 0;setTimeout(this._repositionYearScroller.bind(this),1)};window.requestAnimationFrame(o)}else this._targetPosition=e}_limit(e,t){return Math.min(t.max,Math.max(t.min,e))}_handleTrack(e){if(!(Math.abs(e.detail.dx)<10||Math.abs(e.detail.ddy)>10)){Math.abs(e.detail.ddx)>this._yearScrollerWidth/3&&this._toggleAnimateClass(!0);var t=this._translateX+e.detail.ddx;this._translateX=this._limit(t,{min:0,max:this._yearScrollerWidth})}}_track(e){if(!this._desktopMode)switch(e.detail.state){case"start":this._toggleAnimateClass(!1);break;case"track":this._handleTrack(e);break;case"end":this._toggleAnimateClass(!0),this._translateX>=this._yearScrollerWidth/2?this._closeYearScroller():this._openYearScroller()}}_toggleAnimateClass(e){e?this.classList.add("animate"):this.classList.remove("animate")}_toggleYearScroller(){this._isYearScrollerVisible()?this._closeYearScroller():this._openYearScroller()}_openYearScroller(){this._translateX=0,this.setAttribute("years-visible","")}_closeYearScroller(){this.removeAttribute("years-visible"),this._translateX=this._yearScrollerWidth}_isYearScrollerVisible(){return this._translateX<this._yearScrollerWidth/2}_translateXChanged(e){this._desktopMode||(this.$.monthScroller.style.transform="translateX("+(e-this._yearScrollerWidth)+"px)",this.$.yearScroller.style.transform="translateX("+e+"px)")}_yearAfterXYears(e){var t=new Date(this._originDate);return t.setFullYear(parseInt(e)+this._originDate.getFullYear()),t.getFullYear()}_yearAfterXMonths(e){return this._dateAfterXMonths(e).getFullYear()}_dateAfterXMonths(e){var t=new Date(this._originDate);return t.setDate(1),t.setMonth(parseInt(e)+this._originDate.getMonth()),t}_differenceInMonths(e,t){return 12*(e.getFullYear()-t.getFullYear())-t.getMonth()+e.getMonth()}_differenceInYears(e,t){return this._differenceInMonths(e,t)/12}_clear(){this.selectedDate=""}_close(){const e=this.getRootNode().host,t=e?e.getRootNode().host:null;t&&(t.opened=!1),this.dispatchEvent(new CustomEvent("close",{bubbles:!0,composed:!0}))}_cancel(){this.focusedDate=this.selectedDate,this._close()}_preventDefault(e){e.preventDefault()}_eventKey(e){for(var t=["down","up","right","left","enter","space","home","end","pageup","pagedown","tab","esc"],a=0;a<t.length;a++){var i=t[a];if(m.keyboardEventMatchesKeys(e,i))return i}}_onKeydown(e){var t=this._currentlyFocusedDate();const a=e.composedPath().indexOf(this.$.todayButton)>=0,i=e.composedPath().indexOf(this.$.cancelButton)>=0,s=!a&&!i;var o=this._eventKey(e);if("tab"===o){e.stopPropagation();const t=this.hasAttribute("fullscreen"),o=e.shiftKey;t?e.preventDefault():o&&s||!o&&i?(e.preventDefault(),this.dispatchEvent(new CustomEvent("focus-input",{bubbles:!0,composed:!0}))):o&&a?(this._focused=!0,setTimeout((()=>this.revealDate(this.focusedDate)),1)):this._focused=!1}else if(o)switch(e.preventDefault(),e.stopPropagation(),o){case"down":this._moveFocusByDays(7),this.focus();break;case"up":this._moveFocusByDays(-7),this.focus();break;case"right":s&&this._moveFocusByDays(this.__isRTL?-1:1);break;case"left":s&&this._moveFocusByDays(this.__isRTL?1:-1);break;case"enter":s||i?this._close():a&&this._onTodayTap();break;case"space":if(i)this._close();else if(a)this._onTodayTap();else{var r=this.focusedDate;T._dateEquals(r,this.selectedDate)?(this.selectedDate="",this.focusedDate=r):this.selectedDate=r}break;case"home":this._moveFocusInsideMonth(t,"minDate");break;case"end":this._moveFocusInsideMonth(t,"maxDate");break;case"pagedown":this._moveFocusByMonths(e.shiftKey?12:1);break;case"pageup":this._moveFocusByMonths(e.shiftKey?-12:-1);break;case"esc":this._cancel()}}_currentlyFocusedDate(){return this.focusedDate||this.selectedDate||this.initialPosition||new Date}_focusDate(e){this.focusedDate=e,this._focusedMonthDate=e.getDate()}_focusClosestDate(e){this._focusDate(T._getClosestDate(e,[this.minDate,this.maxDate]))}_moveFocusByDays(e){var t=this._currentlyFocusedDate(),a=new Date(0,0);a.setFullYear(t.getFullYear()),a.setMonth(t.getMonth()),a.setDate(t.getDate()+e),this._dateAllowed(a,this.minDate,this.maxDate)?this._focusDate(a):this._dateAllowed(t,this.minDate,this.maxDate)?e>0?this._focusDate(this.maxDate):this._focusDate(this.minDate):this._focusClosestDate(t)}_moveFocusByMonths(e){var t=this._currentlyFocusedDate(),a=new Date(0,0);a.setFullYear(t.getFullYear()),a.setMonth(t.getMonth()+e);var i=a.getMonth();a.setDate(this._focusedMonthDate||(this._focusedMonthDate=t.getDate())),a.getMonth()!==i&&a.setDate(0),this._dateAllowed(a,this.minDate,this.maxDate)?this.focusedDate=a:this._dateAllowed(t,this.minDate,this.maxDate)?e>0?this._focusDate(this.maxDate):this._focusDate(this.minDate):this._focusClosestDate(t)}_moveFocusInsideMonth(e,t){var a=new Date(0,0);a.setFullYear(e.getFullYear()),"minDate"===t?(a.setMonth(e.getMonth()),a.setDate(1)):(a.setMonth(e.getMonth()+1),a.setDate(0)),this._dateAllowed(a,this.minDate,this.maxDate)?this._focusDate(a):this._dateAllowed(e,this.minDate,this.maxDate)?this._focusDate(this[t]):this._focusClosestDate(e)}_dateAllowed(e,t,a){return(!t||e>=t)&&(!a||e<=a)}_isTodayAllowed(e,t){var a=new Date,i=new Date(0,0);return i.setFullYear(a.getFullYear()),i.setMonth(a.getMonth()),i.setDate(a.getDate()),this._dateAllowed(i,e,t)}_stopPropagation(e){e.stopPropagation()}}customElements.define($.is,$);
757
+ `}static get is(){return"vaadin-date-picker-overlay-content"}static get properties(){return{selectedDate:{type:Date,notify:!0},focusedDate:{type:Date,notify:!0,observer:"_focusedDateChanged"},_focusedMonthDate:Number,initialPosition:{type:Date,observer:"_initialPositionChanged"},_originDate:{value:new Date},_visibleMonthIndex:Number,_desktopMode:Boolean,_translateX:{observer:"_translateXChanged"},_yearScrollerWidth:{value:50},i18n:{type:Object},showWeekNumbers:{type:Boolean},_ignoreTaps:Boolean,_notTapping:Boolean,minDate:Date,maxDate:Date,_focused:Boolean,label:String}}get __isRTL(){return"rtl"===this.getAttribute("dir")}get __useSubMonthScrolling(){return this.$.monthScroller.clientHeight<this.$.monthScroller.itemHeight+this.$.monthScroller.bufferOffset}ready(){super.ready(),this.setAttribute("tabindex",0),this.addEventListener("keydown",this._onKeydown.bind(this)),l(this,"tap",this._stopPropagation),this.addEventListener("focus",this._onOverlayFocus.bind(this)),this.addEventListener("blur",this._onOverlayBlur.bind(this))}connectedCallback(){super.connectedCallback(),this._closeYearScroller(),this._toggleAnimateClass(!0),d(this.$.scrollers,"pan-y"),v.requestAvailability()}announceFocusedDate(){var e=this._currentlyFocusedDate(),t=[];T._dateEquals(e,new Date)&&t.push(this.i18n.today),t=t.concat([this.i18n.weekdays[e.getDay()],e.getDate(),this.i18n.monthNames[e.getMonth()],e.getFullYear()]),this.showWeekNumbers&&1===this.i18n.firstDayOfWeek&&(t.push(this.i18n.week),t.push(T._getISOWeekNumber(e))),this.dispatchEvent(new CustomEvent("iron-announce",{bubbles:!0,composed:!0,detail:{text:t.join(" ")}}))}focusCancel(){this.$.cancelButton.focus()}scrollToDate(e,t){const a=this.__useSubMonthScrolling?this._calculateWeekScrollOffset(e):0;this._scrollToPosition(this._differenceInMonths(e,this._originDate)+a,t),this.$.monthScroller.forceUpdate()}_focusedDateChanged(e){this.revealDate(e)}_isCurrentYear(e){return 0===e}_isSelectedYear(e,t){if(t)return t.getFullYear()===this._originDate.getFullYear()+e}revealDate(e,t=!0){if(!e)return;const a=this._differenceInMonths(e,this._originDate);if(this.__useSubMonthScrolling){const i=this._calculateWeekScrollOffset(e);return void this._scrollToPosition(a+i,t)}const i=this.$.monthScroller.position>a,s=Math.max(this.$.monthScroller.itemHeight,this.$.monthScroller.clientHeight-2*this.$.monthScroller.bufferOffset)/this.$.monthScroller.itemHeight,o=this.$.monthScroller.position+s-1<a;i?this._scrollToPosition(a,t):o&&this._scrollToPosition(a-s+1,t)}_calculateWeekScrollOffset(e){const t=new Date(0,0);t.setFullYear(e.getFullYear()),t.setMonth(e.getMonth()),t.setDate(1);let a=0;for(;t.getDate()<e.getDate();)t.setDate(t.getDate()+1),t.getDay()===this.i18n.firstDayOfWeek&&(a+=1);return a/6}_onOverlayFocus(){this._focused=!0}_onOverlayBlur(){this._focused=!1}_initialPositionChanged(e){this.scrollToDate(e)}_repositionYearScroller(){this._visibleMonthIndex=Math.floor(this.$.monthScroller.position),this.$.yearScroller.position=(this.$.monthScroller.position+this._originDate.getMonth())/12}_repositionMonthScroller(){this.$.monthScroller.position=12*this.$.yearScroller.position-this._originDate.getMonth(),this._visibleMonthIndex=Math.floor(this.$.monthScroller.position)}_onMonthScroll(){this._repositionYearScroller(),this._doIgnoreTaps()}_onYearScroll(){this._repositionMonthScroller(),this._doIgnoreTaps()}_onYearScrollTouchStart(){this._notTapping=!1,setTimeout((()=>this._notTapping=!0),300),this._repositionMonthScroller()}_onMonthScrollTouchStart(){this._repositionYearScroller()}_doIgnoreTaps(){this._ignoreTaps=!0,this._debouncer=o.debounce(this._debouncer,r.after(300),(()=>this._ignoreTaps=!1))}_formatDisplayed(e,t,a){return e?t(T._extractDateParts(e)):a}_onTodayTap(){var e=new Date;Math.abs(this.$.monthScroller.position-this._differenceInMonths(e,this._originDate))<.001?(this.selectedDate=e,this._close()):this._scrollToCurrentMonth()}_scrollToCurrentMonth(){this.focusedDate&&(this.focusedDate=new Date),this.scrollToDate(new Date,!0)}_showClear(e){return!!e}_onYearTap(e){if(!this._ignoreTaps&&!this._notTapping){var t=(e.detail.y-(this.$.yearScroller.getBoundingClientRect().top+this.$.yearScroller.clientHeight/2))/this.$.yearScroller.itemHeight;this._scrollToPosition(this.$.monthScroller.position+12*t,!0)}}_scrollToPosition(e,t){if(void 0===this._targetPosition){if(!t)return this.$.monthScroller.position=e,this._targetPosition=void 0,void this._repositionYearScroller();this._targetPosition=e;var a=t?300:0,i=0,s=this.$.monthScroller.position,o=e=>{var t,r,n,l=e-(i=i||e);if(l<a){var d=(t=l,r=s,n=this._targetPosition-s,(t/=a/2)<1?n/2*t*t+r:-n/2*(--t*(t-2)-1)+r);this.$.monthScroller.position=d,window.requestAnimationFrame(o)}else this.dispatchEvent(new CustomEvent("scroll-animation-finished",{bubbles:!0,composed:!0,detail:{position:this._targetPosition,oldPosition:s}})),this.$.monthScroller.position=this._targetPosition,this._targetPosition=void 0;setTimeout(this._repositionYearScroller.bind(this),1)};window.requestAnimationFrame(o)}else this._targetPosition=e}_limit(e,t){return Math.min(t.max,Math.max(t.min,e))}_handleTrack(e){if(!(Math.abs(e.detail.dx)<10||Math.abs(e.detail.ddy)>10)){Math.abs(e.detail.ddx)>this._yearScrollerWidth/3&&this._toggleAnimateClass(!0);var t=this._translateX+e.detail.ddx;this._translateX=this._limit(t,{min:0,max:this._yearScrollerWidth})}}_track(e){if(!this._desktopMode)switch(e.detail.state){case"start":this._toggleAnimateClass(!1);break;case"track":this._handleTrack(e);break;case"end":this._toggleAnimateClass(!0),this._translateX>=this._yearScrollerWidth/2?this._closeYearScroller():this._openYearScroller()}}_toggleAnimateClass(e){e?this.classList.add("animate"):this.classList.remove("animate")}_toggleYearScroller(){this._isYearScrollerVisible()?this._closeYearScroller():this._openYearScroller()}_openYearScroller(){this._translateX=0,this.setAttribute("years-visible","")}_closeYearScroller(){this.removeAttribute("years-visible"),this._translateX=this._yearScrollerWidth}_isYearScrollerVisible(){return this._translateX<this._yearScrollerWidth/2}_translateXChanged(e){this._desktopMode||(this.$.monthScroller.style.transform="translateX("+(e-this._yearScrollerWidth)+"px)",this.$.yearScroller.style.transform="translateX("+e+"px)")}_yearAfterXYears(e){var t=new Date(this._originDate);return t.setFullYear(parseInt(e)+this._originDate.getFullYear()),t.getFullYear()}_yearAfterXMonths(e){return this._dateAfterXMonths(e).getFullYear()}_dateAfterXMonths(e){var t=new Date(this._originDate);return t.setDate(1),t.setMonth(parseInt(e)+this._originDate.getMonth()),t}_differenceInMonths(e,t){return 12*(e.getFullYear()-t.getFullYear())-t.getMonth()+e.getMonth()}_differenceInYears(e,t){return this._differenceInMonths(e,t)/12}_clear(){this.selectedDate=""}_close(){const e=this.getRootNode().host,t=e?e.getRootNode().host:null;t&&(t.opened=!1),this.dispatchEvent(new CustomEvent("close",{bubbles:!0,composed:!0}))}_cancel(){this.focusedDate=this.selectedDate,this._close()}_preventDefault(e){e.preventDefault()}_eventKey(e){for(var t=["down","up","right","left","enter","space","home","end","pageup","pagedown","tab","esc"],a=0;a<t.length;a++){var i=t[a];if(g.keyboardEventMatchesKeys(e,i))return i}}_onKeydown(e){var t=this._currentlyFocusedDate();const a=e.composedPath().indexOf(this.$.todayButton)>=0,i=e.composedPath().indexOf(this.$.cancelButton)>=0,s=!a&&!i;var o=this._eventKey(e);if("tab"===o){e.stopPropagation();const t=this.hasAttribute("fullscreen"),o=e.shiftKey;t?e.preventDefault():o&&s||!o&&i?(e.preventDefault(),this.dispatchEvent(new CustomEvent("focus-input",{bubbles:!0,composed:!0}))):o&&a?(this._focused=!0,setTimeout((()=>this.revealDate(this.focusedDate)),1)):this._focused=!1}else if(o)switch(e.preventDefault(),e.stopPropagation(),o){case"down":this._moveFocusByDays(7),this.focus();break;case"up":this._moveFocusByDays(-7),this.focus();break;case"right":s&&this._moveFocusByDays(this.__isRTL?-1:1);break;case"left":s&&this._moveFocusByDays(this.__isRTL?1:-1);break;case"enter":s||i?this._close():a&&this._onTodayTap();break;case"space":if(i)this._close();else if(a)this._onTodayTap();else{var r=this.focusedDate;T._dateEquals(r,this.selectedDate)?(this.selectedDate="",this.focusedDate=r):this.selectedDate=r}break;case"home":this._moveFocusInsideMonth(t,"minDate");break;case"end":this._moveFocusInsideMonth(t,"maxDate");break;case"pagedown":this._moveFocusByMonths(e.shiftKey?12:1);break;case"pageup":this._moveFocusByMonths(e.shiftKey?-12:-1);break;case"esc":this._cancel()}}_currentlyFocusedDate(){return this.focusedDate||this.selectedDate||this.initialPosition||new Date}_focusDate(e){this.focusedDate=e,this._focusedMonthDate=e.getDate()}_focusClosestDate(e){this._focusDate(T._getClosestDate(e,[this.minDate,this.maxDate]))}_moveFocusByDays(e){var t=this._currentlyFocusedDate(),a=new Date(0,0);a.setFullYear(t.getFullYear()),a.setMonth(t.getMonth()),a.setDate(t.getDate()+e),this._dateAllowed(a,this.minDate,this.maxDate)?this._focusDate(a):this._dateAllowed(t,this.minDate,this.maxDate)?e>0?this._focusDate(this.maxDate):this._focusDate(this.minDate):this._focusClosestDate(t)}_moveFocusByMonths(e){var t=this._currentlyFocusedDate(),a=new Date(0,0);a.setFullYear(t.getFullYear()),a.setMonth(t.getMonth()+e);var i=a.getMonth();a.setDate(this._focusedMonthDate||(this._focusedMonthDate=t.getDate())),a.getMonth()!==i&&a.setDate(0),this._dateAllowed(a,this.minDate,this.maxDate)?this.focusedDate=a:this._dateAllowed(t,this.minDate,this.maxDate)?e>0?this._focusDate(this.maxDate):this._focusDate(this.minDate):this._focusClosestDate(t)}_moveFocusInsideMonth(e,t){var a=new Date(0,0);a.setFullYear(e.getFullYear()),"minDate"===t?(a.setMonth(e.getMonth()),a.setDate(1)):(a.setMonth(e.getMonth()+1),a.setDate(0)),this._dateAllowed(a,this.minDate,this.maxDate)?this._focusDate(a):this._dateAllowed(e,this.minDate,this.maxDate)?this._focusDate(this[t]):this._focusClosestDate(e)}_dateAllowed(e,t,a){return(!t||e>=t)&&(!a||e<=a)}_isTodayAllowed(e,t){var a=new Date,i=new Date(0,0);return i.setFullYear(a.getFullYear()),i.setMonth(a.getMonth()),i.setDate(a.getDate()),this._dateAllowed(i,e,t)}_stopPropagation(e){e.stopPropagation()}}customElements.define($.is,$);
758
758
  /**
759
759
  @license
760
760
  Copyright (c) 2017 Vaadin Ltd.
761
761
  This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
762
762
  */
763
- const F=e=>class extends(g([b],e)){static get properties(){return{_selectedDate:{type:Date},_focusedDate:Date,value:{type:String,observer:"_valueChanged",notify:!0,value:""},required:{type:Boolean,value:!1},name:{type:String},initialPosition:String,label:String,opened:{type:Boolean,reflectToAttribute:!0,notify:!0,observer:"_openedChanged"},autoOpenDisabled:Boolean,showWeekNumbers:{type:Boolean},_fullscreen:{value:!1,observer:"_fullscreenChanged"},_fullscreenMediaQuery:{value:"(max-width: 420px), (max-height: 420px)"},_touchPrevented:Array,i18n:{type:Object,value:()=>({monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],weekdays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],weekdaysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],firstDayOfWeek:0,week:"Week",calendar:"Calendar",clear:"Clear",today:"Today",cancel:"Cancel",referenceDate:"",formatDate:e=>{const t=String(e.year).replace(/\d+/,(e=>"0000".substr(e.length)+e));return[e.month+1,e.day,t].join("/")},parseDate(e){const t=e.split("/"),a=new Date;let i,s=a.getMonth(),o=a.getFullYear();if(3===t.length){if(s=parseInt(t[0])-1,i=parseInt(t[1]),o=parseInt(t[2]),t[2].length<3&&o>=0){const e=this.referenceDate?T._parseDate(this.referenceDate):new Date;o=T._getAdjustedYear(e,o,s,i)}}else 2===t.length?(s=parseInt(t[0])-1,i=parseInt(t[1])):1===t.length&&(i=parseInt(t[0]));if(void 0!==i)return{day:i,month:s,year:o}},formatTitle:(e,t)=>`${e} ${t}`})},min:{type:String,observer:"_minChanged"},max:{type:String,observer:"_maxChanged"},_minDate:{type:Date,value:""},_maxDate:{type:Date,value:""},_noInput:{type:Boolean,computed:"_isNoInput(_fullscreen, _ios, i18n, i18n.*, opened, autoOpenDisabled)"},_hasInputValue:{type:Boolean,value:!1,observer:"_hasInputValueChanged"},_ios:{type:Boolean,value:navigator.userAgent.match(/iP(?:hone|ad;(?: U;)? CPU) OS (\d+)/)},_webkitOverflowScroll:{type:Boolean,value:""===document.createElement("div").style.webkitOverflowScrolling},_ignoreAnnounce:{value:!0},_focusOverlayOnOpen:Boolean,_overlayInitialized:Boolean}}static get observers(){return["_updateHasValue(value)","_selectedDateChanged(_selectedDate, i18n.formatDate)","_focusedDateChanged(_focusedDate, i18n.formatDate)","_announceFocusedDate(_focusedDate, opened, _ignoreAnnounce)"]}ready(){super.ready(),this._boundOnScroll=this._onScroll.bind(this),this._boundFocus=this._focus.bind(this),this._boundUpdateAlignmentAndPosition=this._updateAlignmentAndPosition.bind(this);const e=e=>{const t=e.composedPath(),a=t.indexOf(this._inputElement);return 1===t.slice(0,a).filter((e=>e.getAttribute&&"clear-button"===e.getAttribute("part"))).length};o(this,"tap",(t=>{e(t)||this.autoOpenDisabled&&!this._noInput||this.open()})),this.addEventListener("touchend",(t=>{this._noInput&&!e(t)&&t.preventDefault()})),this.addEventListener("keydown",this._onKeydown.bind(this)),this.addEventListener("input",this.__onUserInput.bind(this)),this.addEventListener("focus",(e=>this._noInput&&e.target.blur())),this.addEventListener("blur",(e=>{if(!this.opened){if(this.autoOpenDisabled){const e=this._getParsedDate();this._isValidDate(e)&&(this._selectedDate=e)}""===this._inputElementValue&&this.__dispatchChange?(this.validate(),this.value="",this.__dispatchChange=!1):this.validate()}}))}_initOverlay(){this.$.overlay.removeAttribute("disable-upgrade"),this._overlayInitialized=!0,this.$.overlay.addEventListener("opened-changed",(e=>this.opened=e.detail.value)),this._overlayContent.addEventListener("close",this._close.bind(this)),this._overlayContent.addEventListener("focus-input",this._focusAndSelect.bind(this)),this.$.overlay.addEventListener("vaadin-overlay-escape-press",this._boundFocus),this._overlayContent.addEventListener("focus",(()=>this.focusElement._setFocused(!0))),this.$.overlay.addEventListener("vaadin-overlay-close",this._onVaadinOverlayClose.bind(this));const e=e=>{this.$.overlay.bringToFront&&requestAnimationFrame((()=>{this.$.overlay.bringToFront()}))};this.addEventListener("mousedown",e),this.addEventListener("touchstart",e)}disconnectedCallback(){super.disconnectedCallback(),this._overlayInitialized&&this.$.overlay.removeEventListener("vaadin-overlay-escape-press",this._boundFocus),this.opened=!1}open(){this.disabled||this.readonly||(this.opened=!0)}_close(e){e&&e.stopPropagation(),this._focus(),this.close()}close(){(this._overlayInitialized||this.autoOpenDisabled)&&this.$.overlay.close()}get _inputElement(){return this._input()}get _nativeInput(){if(this._inputElement)return this._inputElement.focusElement?this._inputElement.focusElement:this._inputElement.inputElement?this._inputElement.inputElement:window.unwrap?window.unwrap(this._inputElement):this._inputElement}_parseDate(e){var t=/^([-+]\d{1}|\d{2,4}|[-+]\d{6})-(\d{1,2})-(\d{1,2})$/.exec(e);if(t){var a=new Date(0,0);return a.setFullYear(parseInt(t[1],10)),a.setMonth(parseInt(t[2],10)-1),a.setDate(parseInt(t[3],10)),a}}_isNoInput(e,t,a,i,s,o){const r=e&&(!o||s),n=t&&s;return!this._inputElement||r||n||!a.parseDate}_formatISO(e){if(!(e instanceof Date))return"";const t=(e,t="00")=>(t+e).substr((t+e).length-t.length);let a="",i="0000",s=e.getFullYear();s<0?(s=-s,a="-",i="000000"):e.getFullYear()>=1e4&&(a="+",i="000000");return[a+t(s,i),t(e.getMonth()+1),t(e.getDate())].join("-")}_openedChanged(e){e&&!this._overlayInitialized&&this._initOverlay(),this._overlayInitialized&&(this.$.overlay.opened=e),e&&this._updateAlignmentAndPosition()}_selectedDateChanged(e,t){if(void 0===e||void 0===t)return;this.__userInputOccurred&&(this.__dispatchChange=!0);const a=this._formatISO(e);this.__keepInputValue||this._applyInputValue(e),a!==this.value&&(this.validate(),this.value=a),this.__userInputOccurred=!1,this.__dispatchChange=!1,this._ignoreFocusedDateChange=!0,this._focusedDate=e,this._ignoreFocusedDateChange=!1}_focusedDateChanged(e,t){void 0!==e&&void 0!==t&&(this.__userInputOccurred=!0,this._ignoreFocusedDateChange||this._noInput||this._applyInputValue(e))}_updateHasValue(e){e?this.setAttribute("has-value",""):this.removeAttribute("has-value")}__getOverlayTheme(e,t){if(t)return e}_handleDateChange(e,t,a){if(t){var i=this._parseDate(t);i?T._dateEquals(this[e],i)||(this[e]=i,this.value&&this.validate()):this.value=a}else this[e]=""}_valueChanged(e,t){this.__dispatchChange&&this.dispatchEvent(new CustomEvent("change",{bubbles:!0})),this._handleDateChange("_selectedDate",e,t)}_minChanged(e,t){this._handleDateChange("_minDate",e,t)}_maxChanged(e,t){this._handleDateChange("_maxDate",e,t)}_updateAlignmentAndPosition(){if(this._overlayInitialized){if(!this._fullscreen){const e=this._inputElement.getBoundingClientRect(),t=e.top>window.innerHeight/2;if(e.left+this.clientWidth/2>window.innerWidth/2){const t=Math.min(window.innerWidth,document.documentElement.clientWidth);this.$.overlay.setAttribute("right-aligned",""),this.$.overlay.style.removeProperty("left"),this.$.overlay.style.right=t-e.right+"px"}else this.$.overlay.removeAttribute("right-aligned"),this.$.overlay.style.removeProperty("right"),this.$.overlay.style.left=e.left+"px";if(t){const t=Math.min(window.innerHeight,document.documentElement.clientHeight);this.$.overlay.setAttribute("bottom-aligned",""),this.$.overlay.style.removeProperty("top"),this.$.overlay.style.bottom=t-e.top+"px"}else this.$.overlay.removeAttribute("bottom-aligned"),this.$.overlay.style.removeProperty("bottom"),this.$.overlay.style.top=e.bottom+"px"}this.$.overlay.setAttribute("dir",getComputedStyle(this._inputElement).getPropertyValue("direction")),this._overlayContent._repositionYearScroller()}}_fullscreenChanged(){this._overlayInitialized&&this.$.overlay.opened&&this._updateAlignmentAndPosition()}_onOverlayOpened(){this._openedWithFocusRing=this.hasAttribute("focus-ring")||this.focusElement&&this.focusElement.hasAttribute("focus-ring");var e=this._parseDate(this.initialPosition),t=this._selectedDate||this._overlayContent.initialPosition||e||new Date;e||T._dateAllowed(t,this._minDate,this._maxDate)?this._overlayContent.initialPosition=t:this._overlayContent.initialPosition=T._getClosestDate(t,[this._minDate,this._maxDate]),this._overlayContent.scrollToDate(this._overlayContent.focusedDate||this._overlayContent.initialPosition),this._ignoreFocusedDateChange=!0,this._overlayContent.focusedDate=this._overlayContent.focusedDate||this._overlayContent.initialPosition,this._ignoreFocusedDateChange=!1,window.addEventListener("scroll",this._boundOnScroll,!0),this.addEventListener("iron-resize",this._boundUpdateAlignmentAndPosition),this._webkitOverflowScroll&&(this._touchPrevented=this._preventWebkitOverflowScrollingTouch(this.parentElement)),this._focusOverlayOnOpen?(this._overlayContent.focus(),this._focusOverlayOnOpen=!1):this._focus(),this._noInput&&this.focusElement&&this.focusElement.blur(),this.updateStyles(),this._ignoreAnnounce=!1}_preventWebkitOverflowScrollingTouch(e){for(var t=[];e;){if("touch"===window.getComputedStyle(e).webkitOverflowScrolling){var a=e.style.webkitOverflowScrolling;e.style.webkitOverflowScrolling="auto",t.push({element:e,oldInlineValue:a})}e=e.parentElement}return t}_selectParsedOrFocusedDate(){if(this._ignoreFocusedDateChange=!0,this.i18n.parseDate){const e=this._inputElementValue||"",t=this._getParsedDate(e);this._isValidDate(t)?this._selectedDate=t:(this.__keepInputValue=!0,this._selectedDate=null,this.__keepInputValue=!1)}else this._focusedDate&&(this._selectedDate=this._focusedDate);this._ignoreFocusedDateChange=!1}_onOverlayClosed(){this._ignoreAnnounce=!0,window.removeEventListener("scroll",this._boundOnScroll,!0),this.removeEventListener("iron-resize",this._boundUpdateAlignmentAndPosition),this._touchPrevented&&(this._touchPrevented.forEach((e=>e.element.style.webkitOverflowScrolling=e.oldInlineValue)),this._touchPrevented=[]),this.updateStyles(),this._selectParsedOrFocusedDate(),this._nativeInput&&this._nativeInput.selectionStart&&(this._nativeInput.selectionStart=this._nativeInput.selectionEnd),this.value||this.validate()}get _inputElementValueProperty(){return"value"}get _inputElementValue(){return this._inputElement?this._inputElement[this._inputElementValueProperty]:void 0}set _inputElementValue(e){this._inputElement&&(this._inputElement[this._inputElementValueProperty]=e,this._hasInputValue=!1)}_setInvalid(e){this._shouldSetInvalid(e)&&(this.invalid=e)}_shouldSetInvalid(e){return!0}validate(){const e=this.checkValidity(this._inputElementValue);return this._setInvalid(!e),this.dispatchEvent(new CustomEvent("validated",{detail:{valid:e}})),e}checkValidity(){const e=!this._inputElementValue||this._selectedDate&&this._inputElementValue===this._getFormattedDate(this.i18n.formatDate,this._selectedDate),t=!this._selectedDate||T._dateAllowed(this._selectedDate,this._minDate,this._maxDate);let a=!0;return this._inputElement&&(this._inputElement.checkValidity?(this._inputElement.__forceCheckValidity=!0,a=this._inputElement.checkValidity(),this._inputElement.__forceCheckValidity=!1):this._inputElement.validate&&(a=this._inputElement.validate())),!!(e&&t&&a)}_onScroll(e){e.target!==window&&this._overlayContent.contains(e.target)||this._updateAlignmentAndPosition()}_focus(){this._noInput?this._overlayInitialized&&this._overlayContent.focus():this._inputElement.focus()}_focusAndSelect(){this._focus(),this._setSelectionRange(0,this._inputElementValue.length)}_applyInputValue(e){this._inputElementValue=e?this._getFormattedDate(this.i18n.formatDate,e):""}_getFormattedDate(e,t){return e(T._extractDateParts(t))}_setSelectionRange(e,t){this._nativeInput&&this._nativeInput.setSelectionRange&&this._nativeInput.setSelectionRange(e,t)}_eventKey(e){for(var t=["down","up","enter","esc","tab"],a=0;a<t.length;a++){var i=t[a];if(m.keyboardEventMatchesKeys(e,i))return i}}_isValidDate(e){return e&&!isNaN(e.getTime())}_onKeydown(e){if(this._noInput){-1===[9].indexOf(e.keyCode)&&e.preventDefault()}switch(this._eventKey(e)){case"down":case"up":e.preventDefault(),this.opened?(this._overlayContent.focus(),this._overlayContent._onKeydown(e)):(this._focusOverlayOnOpen=!0,this.open());break;case"enter":{const e=this._getParsedDate(),t=this._isValidDate(e);if(this.opened)this._overlayInitialized&&this._overlayContent.focusedDate&&t&&(this._selectedDate=this._overlayContent.focusedDate),this.close();else if(t||""===this._inputElementValue){const e=this.value;this._selectParsedOrFocusedDate(),e===this.value&&this.validate()}else this.validate();break}case"esc":this.opened?(this._focusedDate=this._selectedDate,this._close()):this.autoOpenDisabled?(""===this._inputElementValue&&(this._selectedDate=null),this._applyInputValue(this._selectedDate)):(this._focusedDate=this._selectedDate,this._selectParsedOrFocusedDate());break;case"tab":this.opened&&(e.preventDefault(),this._setSelectionRange(0,0),e.shiftKey?this._overlayContent.focusCancel():(this._overlayContent.focus(),this._overlayContent.revealDate(this._focusedDate)))}}_getParsedDate(e=this._inputElementValue){const t=this.i18n.parseDate&&this.i18n.parseDate(e);return t&&this._parseDate(t.year+"-"+(t.month+1)+"-"+t.day)}_setHasInputValue(e){const t=e.composedPath()[0];this._hasInputValue=t.value.length>0}__onUserInput(e){this._setHasInputValue(e),this._onUserInput(e)}_hasInputValueChanged(e,t){(e||t)&&this.dispatchEvent(new CustomEvent("has-input-value-changed"))}_onUserInput(e){this.opened||!this._inputElementValue||this.autoOpenDisabled||this.open(),this._userInputValueChanged(),e.__fromClearButton&&(this.validate(),this.__dispatchChange=!0,this.value="",this.__dispatchChange=!1)}_userInputValueChanged(e){if(this._inputElementValue){const e=this._getParsedDate();this._isValidDate(e)&&(this._ignoreFocusedDateChange=!0,T._dateEquals(e,this._focusedDate)||(this._focusedDate=e),this._ignoreFocusedDateChange=!1)}}_announceFocusedDate(e,t,a){t&&!a&&this._overlayContent.announceFocusedDate()}get _overlayContent(){return this.$.overlay.content.querySelector("#overlay-content")}}
763
+ const F=e=>class extends(h([b],e)){static get properties(){return{_selectedDate:{type:Date},_focusedDate:Date,value:{type:String,observer:"_valueChanged",notify:!0,value:""},required:{type:Boolean,value:!1},name:{type:String},initialPosition:String,label:String,opened:{type:Boolean,reflectToAttribute:!0,notify:!0,observer:"_openedChanged"},autoOpenDisabled:Boolean,showWeekNumbers:{type:Boolean},_fullscreen:{value:!1,observer:"_fullscreenChanged"},_fullscreenMediaQuery:{value:"(max-width: 420px), (max-height: 420px)"},_touchPrevented:Array,i18n:{type:Object,value:()=>({monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],weekdays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],weekdaysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],firstDayOfWeek:0,week:"Week",calendar:"Calendar",clear:"Clear",today:"Today",cancel:"Cancel",referenceDate:"",formatDate:e=>{const t=String(e.year).replace(/\d+/,(e=>"0000".substr(e.length)+e));return[e.month+1,e.day,t].join("/")},parseDate(e){const t=e.split("/"),a=new Date;let i,s=a.getMonth(),o=a.getFullYear();if(3===t.length){if(s=parseInt(t[0])-1,i=parseInt(t[1]),o=parseInt(t[2]),t[2].length<3&&o>=0){const e=this.referenceDate?T._parseDate(this.referenceDate):new Date;o=T._getAdjustedYear(e,o,s,i)}}else 2===t.length?(s=parseInt(t[0])-1,i=parseInt(t[1])):1===t.length&&(i=parseInt(t[0]));if(void 0!==i)return{day:i,month:s,year:o}},formatTitle:(e,t)=>`${e} ${t}`})},min:{type:String,observer:"_minChanged"},max:{type:String,observer:"_maxChanged"},_minDate:{type:Date,value:""},_maxDate:{type:Date,value:""},_noInput:{type:Boolean,computed:"_isNoInput(_fullscreen, _ios, i18n, i18n.*, opened, autoOpenDisabled)"},_hasInputValue:{type:Boolean,value:!1,observer:"_hasInputValueChanged"},_ios:{type:Boolean,value:navigator.userAgent.match(/iP(?:hone|ad;(?: U;)? CPU) OS (\d+)/)},_webkitOverflowScroll:{type:Boolean,value:""===document.createElement("div").style.webkitOverflowScrolling},_ignoreAnnounce:{value:!0},_focusOverlayOnOpen:Boolean,_overlayInitialized:Boolean}}static get observers(){return["_updateHasValue(value)","_selectedDateChanged(_selectedDate, i18n.formatDate)","_focusedDateChanged(_focusedDate, i18n.formatDate)","_announceFocusedDate(_focusedDate, opened, _ignoreAnnounce)"]}ready(){super.ready(),this._boundOnScroll=this._onScroll.bind(this),this._boundFocus=this._focus.bind(this),this._boundUpdateAlignmentAndPosition=this._updateAlignmentAndPosition.bind(this);const e=e=>{const t=e.composedPath(),a=t.indexOf(this._inputElement);return 1===t.slice(0,a).filter((e=>e.getAttribute&&"clear-button"===e.getAttribute("part"))).length};l(this,"tap",(t=>{e(t)||this.autoOpenDisabled&&!this._noInput||this.open()})),this.addEventListener("touchend",(t=>{this._noInput&&!e(t)&&t.preventDefault()})),this.addEventListener("keydown",this._onKeydown.bind(this)),this.addEventListener("input",this.__onUserInput.bind(this)),this.addEventListener("focus",(e=>this._noInput&&e.target.blur())),this.addEventListener("blur",(e=>{if(!this.opened){if(this.autoOpenDisabled){const e=this._getParsedDate();this._isValidDate(e)&&(this._selectedDate=e)}""===this._inputElementValue&&this.__dispatchChange?(this.validate(),this.value="",this.__dispatchChange=!1):this.validate()}}))}_initOverlay(){this.$.overlay.removeAttribute("disable-upgrade"),this._overlayInitialized=!0,this.$.overlay.addEventListener("opened-changed",(e=>this.opened=e.detail.value)),this._overlayContent.addEventListener("close",this._close.bind(this)),this._overlayContent.addEventListener("focus-input",this._focusAndSelect.bind(this)),this.$.overlay.addEventListener("vaadin-overlay-escape-press",this._boundFocus),this._overlayContent.addEventListener("focus",(()=>this.focusElement._setFocused(!0))),this.$.overlay.addEventListener("vaadin-overlay-close",this._onVaadinOverlayClose.bind(this));const e=e=>{this.$.overlay.bringToFront&&requestAnimationFrame((()=>{this.$.overlay.bringToFront()}))};this.addEventListener("mousedown",e),this.addEventListener("touchstart",e)}disconnectedCallback(){super.disconnectedCallback(),this._overlayInitialized&&this.$.overlay.removeEventListener("vaadin-overlay-escape-press",this._boundFocus),this.opened=!1}open(){this.disabled||this.readonly||(this.opened=!0)}_close(e){e&&e.stopPropagation(),this._focus(),this.close()}close(){(this._overlayInitialized||this.autoOpenDisabled)&&this.$.overlay.close()}get _inputElement(){return this._input()}get _nativeInput(){if(this._inputElement)return this._inputElement.focusElement?this._inputElement.focusElement:this._inputElement.inputElement?this._inputElement.inputElement:window.unwrap?window.unwrap(this._inputElement):this._inputElement}_parseDate(e){var t=/^([-+]\d{1}|\d{2,4}|[-+]\d{6})-(\d{1,2})-(\d{1,2})$/.exec(e);if(t){var a=new Date(0,0);return a.setFullYear(parseInt(t[1],10)),a.setMonth(parseInt(t[2],10)-1),a.setDate(parseInt(t[3],10)),a}}_isNoInput(e,t,a,i,s,o){const r=e&&(!o||s),n=t&&s;return!this._inputElement||r||n||!a.parseDate}_formatISO(e){if(!(e instanceof Date))return"";const t=(e,t="00")=>(t+e).substr((t+e).length-t.length);let a="",i="0000",s=e.getFullYear();s<0?(s=-s,a="-",i="000000"):e.getFullYear()>=1e4&&(a="+",i="000000");return[a+t(s,i),t(e.getMonth()+1),t(e.getDate())].join("-")}_openedChanged(e){e&&!this._overlayInitialized&&this._initOverlay(),this._overlayInitialized&&(this.$.overlay.opened=e),e&&this._updateAlignmentAndPosition()}_selectedDateChanged(e,t){if(void 0===e||void 0===t)return;this.__userInputOccurred&&(this.__dispatchChange=!0);const a=this._formatISO(e);this.__keepInputValue||this._applyInputValue(e),a!==this.value&&(this.validate(),this.value=a),this.__userInputOccurred=!1,this.__dispatchChange=!1,this._ignoreFocusedDateChange=!0,this._focusedDate=e,this._ignoreFocusedDateChange=!1}_focusedDateChanged(e,t){void 0!==e&&void 0!==t&&(this.__userInputOccurred=!0,this._ignoreFocusedDateChange||this._noInput||this._applyInputValue(e))}_updateHasValue(e){e?this.setAttribute("has-value",""):this.removeAttribute("has-value")}__getOverlayTheme(e,t){if(t)return e}_handleDateChange(e,t,a){if(t){var i=this._parseDate(t);i?T._dateEquals(this[e],i)||(this[e]=i,this.value&&this.validate()):this.value=a}else this[e]=""}_valueChanged(e,t){this.__dispatchChange&&this.dispatchEvent(new CustomEvent("change",{bubbles:!0})),this._handleDateChange("_selectedDate",e,t)}_minChanged(e,t){this._handleDateChange("_minDate",e,t)}_maxChanged(e,t){this._handleDateChange("_maxDate",e,t)}_updateAlignmentAndPosition(){if(this._overlayInitialized){if(!this._fullscreen){const e=this._inputElement.getBoundingClientRect(),t=e.top>window.innerHeight/2;if(e.left+this.clientWidth/2>window.innerWidth/2){const t=Math.min(window.innerWidth,document.documentElement.clientWidth);this.$.overlay.setAttribute("right-aligned",""),this.$.overlay.style.removeProperty("left"),this.$.overlay.style.right=t-e.right+"px"}else this.$.overlay.removeAttribute("right-aligned"),this.$.overlay.style.removeProperty("right"),this.$.overlay.style.left=e.left+"px";if(t){const t=Math.min(window.innerHeight,document.documentElement.clientHeight);this.$.overlay.setAttribute("bottom-aligned",""),this.$.overlay.style.removeProperty("top"),this.$.overlay.style.bottom=t-e.top+"px"}else this.$.overlay.removeAttribute("bottom-aligned"),this.$.overlay.style.removeProperty("bottom"),this.$.overlay.style.top=e.bottom+"px"}this.$.overlay.setAttribute("dir",getComputedStyle(this._inputElement).getPropertyValue("direction")),this._overlayContent._repositionYearScroller()}}_fullscreenChanged(){this._overlayInitialized&&this.$.overlay.opened&&this._updateAlignmentAndPosition()}_onOverlayOpened(){this._openedWithFocusRing=this.hasAttribute("focus-ring")||this.focusElement&&this.focusElement.hasAttribute("focus-ring");var e=this._parseDate(this.initialPosition),t=this._selectedDate||this._overlayContent.initialPosition||e||new Date;e||T._dateAllowed(t,this._minDate,this._maxDate)?this._overlayContent.initialPosition=t:this._overlayContent.initialPosition=T._getClosestDate(t,[this._minDate,this._maxDate]),this._overlayContent.scrollToDate(this._overlayContent.focusedDate||this._overlayContent.initialPosition),this._ignoreFocusedDateChange=!0,this._overlayContent.focusedDate=this._overlayContent.focusedDate||this._overlayContent.initialPosition,this._ignoreFocusedDateChange=!1,window.addEventListener("scroll",this._boundOnScroll,!0),this.addEventListener("iron-resize",this._boundUpdateAlignmentAndPosition),this._webkitOverflowScroll&&(this._touchPrevented=this._preventWebkitOverflowScrollingTouch(this.parentElement)),this._focusOverlayOnOpen?(this._overlayContent.focus(),this._focusOverlayOnOpen=!1):this._focus(),this._noInput&&this.focusElement&&this.focusElement.blur(),this.updateStyles(),this._ignoreAnnounce=!1}_preventWebkitOverflowScrollingTouch(e){for(var t=[];e;){if("touch"===window.getComputedStyle(e).webkitOverflowScrolling){var a=e.style.webkitOverflowScrolling;e.style.webkitOverflowScrolling="auto",t.push({element:e,oldInlineValue:a})}e=e.parentElement}return t}_selectParsedOrFocusedDate(){if(this._ignoreFocusedDateChange=!0,this.i18n.parseDate){const e=this._inputElementValue||"",t=this._getParsedDate(e);this._isValidDate(t)?this._selectedDate=t:(this.__keepInputValue=!0,this._selectedDate=null,this.__keepInputValue=!1)}else this._focusedDate&&(this._selectedDate=this._focusedDate);this._ignoreFocusedDateChange=!1}_onOverlayClosed(){this._ignoreAnnounce=!0,window.removeEventListener("scroll",this._boundOnScroll,!0),this.removeEventListener("iron-resize",this._boundUpdateAlignmentAndPosition),this._touchPrevented&&(this._touchPrevented.forEach((e=>e.element.style.webkitOverflowScrolling=e.oldInlineValue)),this._touchPrevented=[]),this.updateStyles(),this._selectParsedOrFocusedDate(),this._nativeInput&&this._nativeInput.selectionStart&&(this._nativeInput.selectionStart=this._nativeInput.selectionEnd),this.value||this.validate()}get _inputElementValueProperty(){return"value"}get _inputElementValue(){return this._inputElement?this._inputElement[this._inputElementValueProperty]:void 0}set _inputElementValue(e){this._inputElement&&(this._inputElement[this._inputElementValueProperty]=e,this._hasInputValue=!1)}_setInvalid(e){this._shouldSetInvalid(e)&&(this.invalid=e)}_shouldSetInvalid(e){return!0}validate(){const e=this.checkValidity(this._inputElementValue);return this._setInvalid(!e),this.dispatchEvent(new CustomEvent("validated",{detail:{valid:e}})),e}checkValidity(){const e=!this._inputElementValue||this._selectedDate&&this._inputElementValue===this._getFormattedDate(this.i18n.formatDate,this._selectedDate),t=!this._selectedDate||T._dateAllowed(this._selectedDate,this._minDate,this._maxDate);let a=!0;return this._inputElement&&(this._inputElement.checkValidity?(this._inputElement.__forceCheckValidity=!0,a=this._inputElement.checkValidity(),this._inputElement.__forceCheckValidity=!1):this._inputElement.validate&&(a=this._inputElement.validate())),!!(e&&t&&a)}_onScroll(e){e.target!==window&&this._overlayContent.contains(e.target)||this._updateAlignmentAndPosition()}_focus(){this._noInput?this._overlayInitialized&&this._overlayContent.focus():this._inputElement.focus()}_focusAndSelect(){this._focus(),this._setSelectionRange(0,this._inputElementValue.length)}_applyInputValue(e){this._inputElementValue=e?this._getFormattedDate(this.i18n.formatDate,e):""}_getFormattedDate(e,t){return e(T._extractDateParts(t))}_setSelectionRange(e,t){this._nativeInput&&this._nativeInput.setSelectionRange&&this._nativeInput.setSelectionRange(e,t)}_eventKey(e){for(var t=["down","up","enter","esc","tab"],a=0;a<t.length;a++){var i=t[a];if(g.keyboardEventMatchesKeys(e,i))return i}}_isValidDate(e){return e&&!isNaN(e.getTime())}_onKeydown(e){if(this._noInput){-1===[9].indexOf(e.keyCode)&&e.preventDefault()}switch(this._eventKey(e)){case"down":case"up":e.preventDefault(),this.opened?(this._overlayContent.focus(),this._overlayContent._onKeydown(e)):(this._focusOverlayOnOpen=!0,this.open());break;case"enter":{const e=this._getParsedDate(),t=this._isValidDate(e);if(this.opened)this._overlayInitialized&&this._overlayContent.focusedDate&&t&&(this._selectedDate=this._overlayContent.focusedDate),this.close();else if(t||""===this._inputElementValue){const e=this.value;this._selectParsedOrFocusedDate(),e===this.value&&this.validate()}else this.validate();break}case"esc":this.opened?(this._focusedDate=this._selectedDate,this._close()):this.autoOpenDisabled?(""===this._inputElementValue&&(this._selectedDate=null),this._applyInputValue(this._selectedDate)):(this._focusedDate=this._selectedDate,this._selectParsedOrFocusedDate());break;case"tab":this.opened&&(e.preventDefault(),this._setSelectionRange(0,0),e.shiftKey?this._overlayContent.focusCancel():(this._overlayContent.focus(),this._overlayContent.revealDate(this._focusedDate)))}}_getParsedDate(e=this._inputElementValue){const t=this.i18n.parseDate&&this.i18n.parseDate(e);return t&&this._parseDate(t.year+"-"+(t.month+1)+"-"+t.day)}_setHasInputValue(e){const t=e.composedPath()[0];this._hasInputValue=t.value.length>0}__onUserInput(e){this._setHasInputValue(e),this._onUserInput(e)}_hasInputValueChanged(e,t){(e||t)&&this.dispatchEvent(new CustomEvent("has-input-value-changed"))}_onUserInput(e){this.opened||!this._inputElementValue||this.autoOpenDisabled||this.open(),this._userInputValueChanged(),e.__fromClearButton&&(this.validate(),this.__dispatchChange=!0,this.value="",this.__dispatchChange=!1)}_userInputValueChanged(e){if(this._inputElementValue){const e=this._getParsedDate();this._isValidDate(e)&&(this._ignoreFocusedDateChange=!0,T._dateEquals(e,this._focusedDate)||(this._focusedDate=e),this._ignoreFocusedDateChange=!1)}}_announceFocusedDate(e,t,a){t&&!a&&this._overlayContent.announceFocusedDate()}get _overlayContent(){return this.$.overlay.content.querySelector("#overlay-content")}}
764
764
  /**
765
765
  @license
766
766
  Copyright (c) 2017 Vaadin Ltd.
767
767
  This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
768
- */;class Y extends(u(n(d(F(t(a)))))){static get template(){return e`
768
+ */;class Y extends(m(_(c(F(a(i)))))){static get template(){return e`
769
769
  <style>
770
770
  :host {
771
771
  display: inline-block;
@@ -1,4 +1,4 @@
1
- import"./shared-dc6e5879.js";import{h as e,G as t,P as r}from"./shared-f410644a.js";import{E as o,T as i,D as s}from"./shared-f77994ad.js";import{C as a}from"./shared-a8ae24f0.js";import"./shared-c56c3e1e.js";import{F as l}from"./shared-c3d6bcc0.js";import{I as n}from"./shared-4ab85bea.js";import"./shared-c066b7fd.js";import{_ as d}from"./shared-8f9014ff.js";import{i as h}from"./shared-53e42a77.js";import{c,h as u}from"./shared-ba5c42c7.js";import{c as p}from"./shared-4e709717.js";import{x as b}from"./shared-5b8c7250.js";const m=e`<dom-module id="lumo-radio-button" theme-for="vaadin-radio-button">
1
+ import{I as e}from"./shared-45c7e449.js";import"./shared-b8949649.js";import{h as t,G as r,P as o,F as i}from"./shared-cf151085.js";import{E as s,T as a,D as l}from"./shared-3bce049d.js";import{C as n}from"./shared-61ade33e.js";import"./shared-cc142706.js";import{I as d}from"./shared-b9142668.js";import"./shared-f2e36f0f.js";import{_ as h}from"./shared-8f9014ff.js";import{i as c}from"./shared-53e42a77.js";import{c as u,h as p}from"./shared-ba5c42c7.js";import{c as b}from"./shared-4e709717.js";const m=t`<dom-module id="lumo-radio-button" theme-for="vaadin-radio-button">
2
2
  <template>
3
3
  <style>
4
4
  :host {
@@ -128,7 +128,7 @@ import"./shared-dc6e5879.js";import{h as e,G as t,P as r}from"./shared-f410644a.
128
128
  Copyright (c) 2017 Vaadin Ltd.
129
129
  This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
130
130
  */
131
- class v extends(o(a(i(t(r))))){static get template(){return e`
131
+ class v extends(s(n(a(r(o))))){static get template(){return t`
132
132
  <style>
133
133
  :host {
134
134
  display: inline-block;
@@ -172,7 +172,7 @@ class v extends(o(a(i(t(r))))){static get template(){return e`
172
172
  <slot></slot>
173
173
  </span>
174
174
  </label>
175
- `}static get is(){return"vaadin-radio-button"}static get version(){return"1.6.0"}static get properties(){return{checked:{type:Boolean,value:!1,notify:!0,observer:"_checkedChanged",reflectToAttribute:!0},name:String,value:{type:String,value:"on"}}}get name(){return this.checked?this._storedName:""}set name(e){this._storedName=e}attributeChangedCallback(e,t,r){if(super.attributeChangedCallback(e,t,r),/^(disabled|checked)$/.test(e)){if(/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream&&this.shadowRoot&&parseInt(navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/)[1],10)){const e="-webkit-backface-visibility";this.shadowRoot.querySelectorAll("*").forEach((t=>{t.style[e]="visible",t.style[e]=""}))}}}ready(){super.ready(),this.setAttribute("role","radio"),this._addListeners();const e=this.getAttribute("name");e&&(this.name=e),this.shadowRoot.querySelector('[part~="label"]').querySelector("slot").addEventListener("slotchange",this._updateLabelAttribute.bind(this)),this._updateLabelAttribute()}_updateLabelAttribute(){const e=this.shadowRoot.querySelector('[part~="label"]'),t=e.firstElementChild.assignedNodes();this._isAssignedNodesEmpty(t)?e.setAttribute("empty",""):e.removeAttribute("empty")}_isAssignedNodesEmpty(e){return 0===e.length||1==e.length&&e[0].nodeType==Node.TEXT_NODE&&""===e[0].textContent.trim()}_checkedChanged(e){this.setAttribute("aria-checked",e)}_addListeners(){this._addEventListenerToNode(this,"down",(e=>{this.disabled||this.setAttribute("active","")})),this._addEventListenerToNode(this,"up",(e=>{this.removeAttribute("active"),this.checked||this.disabled||this.click()})),this.addEventListener("keydown",(e=>{this.disabled||32!==e.keyCode||(e.preventDefault(),this.setAttribute("active",""))})),this.addEventListener("keyup",(e=>{this.disabled||32!==e.keyCode||(e.preventDefault(),this.click(),this.removeAttribute("active"))}))}click(){this.disabled||this.shadowRoot.querySelector("input").dispatchEvent(new MouseEvent("click"))}get focusElement(){return this.shadowRoot.querySelector("input")}_onChange(e){this.checked=e.target.checked;const t=new CustomEvent("change",{detail:{sourceEvent:e},bubbles:e.bubbles,cancelable:e.cancelable});this.dispatchEvent(t)}}customElements.define(v.is,v);const g=e`<dom-module id="lumo-radio-group" theme-for="vaadin-radio-group">
175
+ `}static get is(){return"vaadin-radio-button"}static get version(){return"1.6.0"}static get properties(){return{checked:{type:Boolean,value:!1,notify:!0,observer:"_checkedChanged",reflectToAttribute:!0},name:String,value:{type:String,value:"on"}}}get name(){return this.checked?this._storedName:""}set name(e){this._storedName=e}attributeChangedCallback(e,t,r){if(super.attributeChangedCallback(e,t,r),/^(disabled|checked)$/.test(e)){if(/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream&&this.shadowRoot&&parseInt(navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/)[1],10)){const e="-webkit-backface-visibility";this.shadowRoot.querySelectorAll("*").forEach((t=>{t.style[e]="visible",t.style[e]=""}))}}}ready(){super.ready(),this.setAttribute("role","radio"),this._addListeners();const e=this.getAttribute("name");e&&(this.name=e),this.shadowRoot.querySelector('[part~="label"]').querySelector("slot").addEventListener("slotchange",this._updateLabelAttribute.bind(this)),this._updateLabelAttribute()}_updateLabelAttribute(){const e=this.shadowRoot.querySelector('[part~="label"]'),t=e.firstElementChild.assignedNodes();this._isAssignedNodesEmpty(t)?e.setAttribute("empty",""):e.removeAttribute("empty")}_isAssignedNodesEmpty(e){return 0===e.length||1==e.length&&e[0].nodeType==Node.TEXT_NODE&&""===e[0].textContent.trim()}_checkedChanged(e){this.setAttribute("aria-checked",e)}_addListeners(){this._addEventListenerToNode(this,"down",(e=>{this.disabled||this.setAttribute("active","")})),this._addEventListenerToNode(this,"up",(e=>{this.removeAttribute("active"),this.checked||this.disabled||this.click()})),this.addEventListener("keydown",(e=>{this.disabled||32!==e.keyCode||(e.preventDefault(),this.setAttribute("active",""))})),this.addEventListener("keyup",(e=>{this.disabled||32!==e.keyCode||(e.preventDefault(),this.click(),this.removeAttribute("active"))}))}click(){this.disabled||this.shadowRoot.querySelector("input").dispatchEvent(new MouseEvent("click"))}get focusElement(){return this.shadowRoot.querySelector("input")}_onChange(e){this.checked=e.target.checked;const t=new CustomEvent("change",{detail:{sourceEvent:e},bubbles:e.bubbles,cancelable:e.cancelable});this.dispatchEvent(t)}}customElements.define(v.is,v);const g=t`<dom-module id="lumo-radio-group" theme-for="vaadin-radio-group">
176
176
  <template>
177
177
  <style include="lumo-required-field">
178
178
  :host {
@@ -270,7 +270,7 @@ class v extends(o(a(i(t(r))))){static get template(){return e`
270
270
  Copyright (c) 2017 Vaadin Ltd.
271
271
  This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
272
272
  */
273
- class f extends(i(s(r))){static get template(){return e`
273
+ class f extends(a(l(o))){static get template(){return t`
274
274
  <style>
275
275
  :host {
276
276
  display: inline-flex;
@@ -315,4 +315,4 @@ class f extends(i(s(r))){static get template(){return e`
315
315
 
316
316
  <div part="error-message" id="[[_errorId]]" aria-live="assertive" aria-hidden\$="[[_getErrorMessageAriaHidden(invalid, errorMessage, _errorId)]]">[[errorMessage]]</div>
317
317
  </div>
318
- `}static get is(){return"vaadin-radio-group"}static get properties(){return{disabled:{type:Boolean,reflectToAttribute:!0,observer:"_disabledChanged"},readonly:{type:Boolean,reflectToAttribute:!0,observer:"_readonlyChanged"},invalid:{type:Boolean,reflectToAttribute:!0,notify:!0,value:!1},required:{type:Boolean,reflectToAttribute:!0},errorMessage:{type:String,value:"",observer:"_errorMessageChanged"},_errorId:{type:String},_helperTextId:{type:String},_hasSlottedHelper:Boolean,_checkedButton:{type:Object},label:{type:String,value:"",observer:"_labelChanged"},helperText:{type:String,value:"",observer:"_helperTextChanged"},value:{type:String,notify:!0,observer:"_valueChanged"}}}ready(){super.ready(),this._addListeners(),this._observer=new l(this,(e=>{const t=e=>{e.target.checked&&this._changeSelectedButton(e.target)};this._filterRadioButtons(e.addedNodes).reverse().forEach((e=>{e.addEventListener("checked-changed",t),this.disabled&&(e.disabled=!0),e.checked&&this._changeSelectedButton(e)})),this._filterRadioButtons(e.removedNodes).forEach((e=>{e.removeEventListener("checked-changed",t),e==this._checkedButton&&(this.value=void 0)})),this._setOrToggleHasHelperAttribute()})),this._radioButtons.length&&this._setFocusable(0),this.setAttribute("role","radiogroup");const e=f._uniqueId=1+f._uniqueId||0;this._errorId=`${this.constructor.is}-error-${e}`,this._helperTextId=`${this.constructor.is}-helper-${e}`}get _radioButtons(){return this._filterRadioButtons(this.querySelectorAll("*"))}_setFocused(e){e?this.setAttribute("focused",""):this.removeAttribute("focused")}_filterRadioButtons(e){return Array.from(e).filter((e=>e instanceof v))}_disabledChanged(e){this.setAttribute("aria-disabled",e),this._updateDisableButtons()}_updateDisableButtons(){this._radioButtons.forEach((e=>{this.disabled?e.disabled=!0:this.readonly?e.disabled=e!==this._checkedButton&&this.readonly:e.disabled=!1}))}_readonlyChanged(e,t){(e||t)&&this._updateDisableButtons()}_addListeners(){this.addEventListener("keydown",(e=>{var t=e.target==this?this._checkedButton:e.target;const r="rtl"===this.getAttribute("dir")&&"vertical"!==this.theme;37!==e.keyCode&&38!==e.keyCode||(e.preventDefault(),this._selectIncButton(r,t)),39!==e.keyCode&&40!==e.keyCode||(e.preventDefault(),this._selectIncButton(!r,t))})),this.addEventListener("focusin",(()=>this._setFocused(this._containsFocus()))),this.addEventListener("focusout",(e=>{e.composed&&this.validate(),this._setFocused(!1)}))}_selectIncButton(e,t){e?this._selectNextButton(t):this._selectPreviousButton(t)}_selectButton(e,t){this._containsFocus()&&(e.focus(),t&&e.setAttribute("focus-ring","")),this._changeSelectedButton(e,t)}_containsFocus(){const e=this.getRootNode(),t=void 0!==e._activeElement?e._activeElement:e.activeElement;return this.contains(t)}_hasEnabledButtons(){return!this._radioButtons.every((e=>e.disabled))}_selectNextButton(e){if(this._hasEnabledButtons()){var t=e.nextElementSibling||this.firstElementChild;t.disabled?this._selectNextButton(t):this._selectButton(t,!0)}}_selectPreviousButton(e){if(this._hasEnabledButtons()){var t=e.previousElementSibling||this.lastElementChild;t.disabled?this._selectPreviousButton(t):this._selectButton(t,!0)}}_changeSelectedButton(e,t){this._checkedButton!==e&&(this._checkedButton=e,this._checkedButton&&(this.value=this._checkedButton.value),this._radioButtons.forEach((e=>{e===this._checkedButton?t?e.click():e.checked=!0:e.checked=!1})),this.validate(),this.readonly&&this._updateDisableButtons(),e&&this._setFocusable(this._radioButtons.indexOf(e)))}_valueChanged(e,t){if(t&&(""===e||null==e))return this._changeSelectedButton(null),void this.removeAttribute("has-value");if(!this._checkedButton||e!=this._checkedButton.value){const t=this._radioButtons.filter((t=>t.value==e))[0];this._selectButton(t)}this._checkedButton?this.setAttribute("has-value",""):console.warn(`No <vaadin-radio-button> with value ${e} found.`)}_setInvalid(e){this._shouldSetInvalid(e)&&(this.invalid=e)}_shouldSetInvalid(e){return!0}validate(){const e=this.checkValidity();return this._setInvalid(!e),this.dispatchEvent(new CustomEvent("validated",{detail:{valid:e}})),e}checkValidity(){return!this.required||!!this.value}_setFocusable(e){const t=this._radioButtons;t.forEach((r=>r.tabindex=r===t[e]?0:-1))}_labelChanged(e){this._setOrToggleAttribute("has-label",!!e)}_errorMessageChanged(e){this._setOrToggleAttribute("has-error-message",!!e)}_helperTextChanged(e){this._setOrToggleAttribute("has-helper",!!e)}_setOrToggleAttribute(e,t){e&&(t?this.setAttribute(e,"boolean"==typeof t?"":t):this.removeAttribute(e))}_setOrToggleHasHelperAttribute(){const e=this.shadowRoot.querySelector('[name="helper"]').assignedNodes();this._hasSlottedHelper=e.filter((e=>3!==e.nodeType)).length>0,this._setOrToggleAttribute("has-helper",this._hasSlottedHelper?"slotted":!!this.helperText)}_getActiveErrorId(e,t,r){return t&&e?r:void 0}_getErrorMessageAriaHidden(e,t,r){return(!this._getActiveErrorId(e,t,r)).toString()}_getHelperTextAriaHidden(e,t,r){return(!(e||r)).toString()}}customElements.define(f.is,f);let _,y,k,x=e=>e;b("vaadin-radio-group",c(_||(_=x`:host([theme~=list]) label{padding-bottom:var(--lumo-space-xs)}:host([theme~=list]) [part=group-field]{display:flex;border:thin solid var(--lumo-contrast-10pct);border-radius:var(--lumo-border-radius);transition:border-color .15s ease}:host([theme~=list]:not([disabled]):not([readonly]):hover) [part=group-field]{border-color:var(--lumo-contrast-20pct)}`)));customElements.define("foxy-internal-radio-group-control",class extends n{constructor(){super(...arguments),this.options=[],this.theme=null}static get properties(){return d(d({},super.properties),{},{options:{type:Array},theme:{type:String}})}renderControl(){var e,t;const r=!!(null===(e=this.theme)||void 0===e?void 0:e.includes("list"));return u(y||(y=x` <vaadin-radio-group error-message="${0}" helper-text="${0}" label="${0}" class="${0}" theme="${0}" ?disabled="${0}" ?readonly="${0}" .checkValidity="${0}" .value="${0}" @change="${0}"> ${0} </vaadin-radio-group> `),h(this._errorMessage),this.helperText,this.label,p({"w-full":!0,"group divide-y divide-contrast-10":r}),h(null!==(t=this.theme)&&void 0!==t?t:void 0),this.disabled,this.readonly,this._checkValidity,this._value,(e=>{const t=e.currentTarget;this._value=t.value}),this.options.map((e=>u(k||(k=x` <vaadin-radio-button value="${0}" class="${0}"> <foxy-i18n infer="" key="${0}"></foxy-i18n> </vaadin-radio-button> `),e.value,p({"block p-s transition-colors":r,"group-hover-divide-contrast-20":r&&!this.disabled&&!this.readonly}),e.label))))}});
318
+ `}static get is(){return"vaadin-radio-group"}static get properties(){return{disabled:{type:Boolean,reflectToAttribute:!0,observer:"_disabledChanged"},readonly:{type:Boolean,reflectToAttribute:!0,observer:"_readonlyChanged"},invalid:{type:Boolean,reflectToAttribute:!0,notify:!0,value:!1},required:{type:Boolean,reflectToAttribute:!0},errorMessage:{type:String,value:"",observer:"_errorMessageChanged"},_errorId:{type:String},_helperTextId:{type:String},_hasSlottedHelper:Boolean,_checkedButton:{type:Object},label:{type:String,value:"",observer:"_labelChanged"},helperText:{type:String,value:"",observer:"_helperTextChanged"},value:{type:String,notify:!0,observer:"_valueChanged"}}}ready(){super.ready(),this._addListeners(),this._observer=new i(this,(e=>{const t=e=>{e.target.checked&&this._changeSelectedButton(e.target)};this._filterRadioButtons(e.addedNodes).reverse().forEach((e=>{e.addEventListener("checked-changed",t),this.disabled&&(e.disabled=!0),e.checked&&this._changeSelectedButton(e)})),this._filterRadioButtons(e.removedNodes).forEach((e=>{e.removeEventListener("checked-changed",t),e==this._checkedButton&&(this.value=void 0)})),this._setOrToggleHasHelperAttribute()})),this._radioButtons.length&&this._setFocusable(0),this.setAttribute("role","radiogroup");const e=f._uniqueId=1+f._uniqueId||0;this._errorId=`${this.constructor.is}-error-${e}`,this._helperTextId=`${this.constructor.is}-helper-${e}`}get _radioButtons(){return this._filterRadioButtons(this.querySelectorAll("*"))}_setFocused(e){e?this.setAttribute("focused",""):this.removeAttribute("focused")}_filterRadioButtons(e){return Array.from(e).filter((e=>e instanceof v))}_disabledChanged(e){this.setAttribute("aria-disabled",e),this._updateDisableButtons()}_updateDisableButtons(){this._radioButtons.forEach((e=>{this.disabled?e.disabled=!0:this.readonly?e.disabled=e!==this._checkedButton&&this.readonly:e.disabled=!1}))}_readonlyChanged(e,t){(e||t)&&this._updateDisableButtons()}_addListeners(){this.addEventListener("keydown",(e=>{var t=e.target==this?this._checkedButton:e.target;const r="rtl"===this.getAttribute("dir")&&"vertical"!==this.theme;37!==e.keyCode&&38!==e.keyCode||(e.preventDefault(),this._selectIncButton(r,t)),39!==e.keyCode&&40!==e.keyCode||(e.preventDefault(),this._selectIncButton(!r,t))})),this.addEventListener("focusin",(()=>this._setFocused(this._containsFocus()))),this.addEventListener("focusout",(e=>{e.composed&&this.validate(),this._setFocused(!1)}))}_selectIncButton(e,t){e?this._selectNextButton(t):this._selectPreviousButton(t)}_selectButton(e,t){this._containsFocus()&&(e.focus(),t&&e.setAttribute("focus-ring","")),this._changeSelectedButton(e,t)}_containsFocus(){const e=this.getRootNode(),t=void 0!==e._activeElement?e._activeElement:e.activeElement;return this.contains(t)}_hasEnabledButtons(){return!this._radioButtons.every((e=>e.disabled))}_selectNextButton(e){if(this._hasEnabledButtons()){var t=e.nextElementSibling||this.firstElementChild;t.disabled?this._selectNextButton(t):this._selectButton(t,!0)}}_selectPreviousButton(e){if(this._hasEnabledButtons()){var t=e.previousElementSibling||this.lastElementChild;t.disabled?this._selectPreviousButton(t):this._selectButton(t,!0)}}_changeSelectedButton(e,t){this._checkedButton!==e&&(this._checkedButton=e,this._checkedButton&&(this.value=this._checkedButton.value),this._radioButtons.forEach((e=>{e===this._checkedButton?t?e.click():e.checked=!0:e.checked=!1})),this.validate(),this.readonly&&this._updateDisableButtons(),e&&this._setFocusable(this._radioButtons.indexOf(e)))}_valueChanged(e,t){if(t&&(""===e||null==e))return this._changeSelectedButton(null),void this.removeAttribute("has-value");if(!this._checkedButton||e!=this._checkedButton.value){const t=this._radioButtons.filter((t=>t.value==e))[0];this._selectButton(t)}this._checkedButton?this.setAttribute("has-value",""):console.warn(`No <vaadin-radio-button> with value ${e} found.`)}_setInvalid(e){this._shouldSetInvalid(e)&&(this.invalid=e)}_shouldSetInvalid(e){return!0}validate(){const e=this.checkValidity();return this._setInvalid(!e),this.dispatchEvent(new CustomEvent("validated",{detail:{valid:e}})),e}checkValidity(){return!this.required||!!this.value}_setFocusable(e){const t=this._radioButtons;t.forEach((r=>r.tabindex=r===t[e]?0:-1))}_labelChanged(e){this._setOrToggleAttribute("has-label",!!e)}_errorMessageChanged(e){this._setOrToggleAttribute("has-error-message",!!e)}_helperTextChanged(e){this._setOrToggleAttribute("has-helper",!!e)}_setOrToggleAttribute(e,t){e&&(t?this.setAttribute(e,"boolean"==typeof t?"":t):this.removeAttribute(e))}_setOrToggleHasHelperAttribute(){const e=this.shadowRoot.querySelector('[name="helper"]').assignedNodes();this._hasSlottedHelper=e.filter((e=>3!==e.nodeType)).length>0,this._setOrToggleAttribute("has-helper",this._hasSlottedHelper?"slotted":!!this.helperText)}_getActiveErrorId(e,t,r){return t&&e?r:void 0}_getErrorMessageAriaHidden(e,t,r){return(!this._getActiveErrorId(e,t,r)).toString()}_getHelperTextAriaHidden(e,t,r){return(!(e||r)).toString()}}customElements.define(f.is,f);let _,y,k,x=e=>e;e("vaadin-radio-group",u(_||(_=x`:host([theme~=list]) label{padding-bottom:var(--lumo-space-xs)}:host([theme~=list]) [part=group-field]{display:flex;border:thin solid var(--lumo-contrast-10pct);border-radius:var(--lumo-border-radius);transition:border-color .15s ease}:host([theme~=list]:not([disabled]):not([readonly]):hover) [part=group-field]{border-color:var(--lumo-contrast-20pct)}`)));customElements.define("foxy-internal-radio-group-control",class extends d{constructor(){super(...arguments),this.options=[],this.theme=null}static get properties(){return h(h({},super.properties),{},{options:{type:Array},theme:{type:String}})}renderControl(){var e,t;const r=!!(null===(e=this.theme)||void 0===e?void 0:e.includes("list"));return p(y||(y=x` <vaadin-radio-group error-message="${0}" helper-text="${0}" label="${0}" class="${0}" theme="${0}" ?disabled="${0}" ?readonly="${0}" .checkValidity="${0}" .value="${0}" @change="${0}"> ${0} </vaadin-radio-group> `),c(this._errorMessage),this.helperText,this.label,b({"w-full":!0,"group divide-y divide-contrast-10":r}),c(null!==(t=this.theme)&&void 0!==t?t:void 0),this.disabled,this.readonly,this._checkValidity,this._value,(e=>{const t=e.currentTarget;this._value=t.value}),this.options.map((e=>p(k||(k=x` <vaadin-radio-button value="${0}" class="${0}"> <foxy-i18n infer="" key="${0}"></foxy-i18n> </vaadin-radio-button> `),e.value,b({"block p-s transition-colors":r,"group-hover-divide-contrast-20":r&&!this.disabled&&!this.readonly}),e.label))))}});
@@ -0,0 +1,6 @@
1
+ /**
2
+ @license
3
+ Copyright (c) 2017 Vaadin Ltd.
4
+ This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
+ */
6
+ let e=!1;window.addEventListener("keydown",(()=>{e=!0}),{capture:!0}),window.addEventListener("mousedown",(()=>{e=!1}),{capture:!0});const t=t=>class extends((e=>class extends e{static get properties(){var e={tabindex:{type:Number,value:0,reflectToAttribute:!0,observer:"_tabindexChanged"}};return window.ShadyDOM&&(e.tabIndex=e.tabindex),e}})(t)){static get properties(){return{autofocus:{type:Boolean},_previousTabIndex:{type:Number},disabled:{type:Boolean,observer:"_disabledChanged",reflectToAttribute:!0},_isShiftTabbing:{type:Boolean}}}get _keyboardActive(){return e}ready(){this.addEventListener("focusin",(e=>{e.composedPath()[0]===this?this.contains(e.relatedTarget)||this._focus():-1===e.composedPath().indexOf(this.focusElement)||this.disabled||this._setFocused(!0)})),this.addEventListener("focusout",(e=>this._setFocused(!1))),super.ready();const e=e=>{e.composed||e.target.dispatchEvent(new CustomEvent(e.type,{bubbles:!0,composed:!0,cancelable:!1}))};this.shadowRoot.addEventListener("focusin",e),this.shadowRoot.addEventListener("focusout",e),this.addEventListener("keydown",(e=>{if(!e.defaultPrevented&&9===e.keyCode)if(e.shiftKey)this._isShiftTabbing=!0,HTMLElement.prototype.focus.apply(this),this._setFocused(!1),setTimeout((()=>this._isShiftTabbing=!1),0);else{const e=window.navigator.userAgent.match(/Firefox\/(\d\d\.\d)/);if(e&&parseFloat(e[1])>=63&&parseFloat(e[1])<66&&this.parentNode&&this.nextSibling){const e=document.createElement("input");e.style.position="absolute",e.style.opacity="0",e.tabIndex=this.tabIndex,this.parentNode.insertBefore(e,this.nextSibling),e.focus(),e.addEventListener("focusout",(()=>this.parentNode.removeChild(e)))}}})),this.autofocus&&!this.disabled&&window.requestAnimationFrame((()=>{this._focus(),this._setFocused(!0),this.setAttribute("focus-ring","")}))}disconnectedCallback(){super.disconnectedCallback(),this.hasAttribute("focused")&&this._setFocused(!1)}_setFocused(t){t?this.setAttribute("focused",""):this.removeAttribute("focused"),t&&e?this.setAttribute("focus-ring",""):this.removeAttribute("focus-ring")}get focusElement(){return window.console.warn(`Please implement the 'focusElement' property in <${this.localName}>`),this}_focus(){this.focusElement&&!this._isShiftTabbing&&(this.focusElement.focus(),this._setFocused(!0))}focus(){this.focusElement&&!this.disabled&&(this.focusElement.focus(),this._setFocused(!0))}blur(){this.focusElement&&(this.focusElement.blur(),this._setFocused(!1))}_disabledChanged(e){this.focusElement.disabled=e,e?(this.blur(),this._previousTabIndex=this.tabindex,this.tabindex=-1,this.setAttribute("aria-disabled","true")):(void 0!==this._previousTabIndex&&(this.tabindex=this._previousTabIndex),this.removeAttribute("aria-disabled"))}_tabindexChanged(e){void 0!==e&&(this.focusElement.tabIndex=e),this.disabled&&this.tabindex&&(-1!==this.tabindex&&(this._previousTabIndex=this.tabindex),this.tabindex=e=void 0),window.ShadyDOM&&this.setProperties({tabIndex:e,tabindex:e})}click(){this.disabled||super.click()}};export{t as C};
@@ -0,0 +1 @@
1
+ import"./shared-45c7e449.js";import"./shared-e52affbe.js";import"./shared-b8949649.js";const n=document.createElement("template");n.innerHTML='<dom-module id="lumo-field-button">\n <template>\n <style>\n [part$="button"] {\n flex: none;\n width: 1em;\n height: 1em;\n line-height: 1;\n font-size: var(--lumo-icon-size-m);\n text-align: center;\n color: var(--lumo-contrast-60pct);\n transition: 0.2s color;\n cursor: var(--lumo-clickable-cursor);\n }\n\n :host(:not([readonly])) [part$="button"]:hover {\n color: var(--lumo-contrast-90pct);\n }\n\n :host([disabled]) [part$="button"],\n :host([readonly]) [part$="button"] {\n color: var(--lumo-contrast-20pct);\n }\n\n [part$="button"]::before {\n font-family: "lumo-icons";\n display: block;\n }\n </style>\n </template>\n</dom-module>',document.head.appendChild(n.content);
@@ -0,0 +1 @@
1
+ import"./shared-b8949649.js";import"./shared-45c7e449.js";const n=document.createElement("template");n.innerHTML='<dom-module id="lumo-overlay">\n <template>\n <style>\n :host {\n top: var(--lumo-space-m);\n right: var(--lumo-space-m);\n bottom: var(--lumo-space-m);\n left: var(--lumo-space-m);\n /* Workaround for Edge issue (only on Surface), where an overflowing vaadin-list-box inside vaadin-select-overlay makes the overlay transparent */\n /* stylelint-disable-next-line */\n outline: 0px solid transparent;\n }\n\n [part="overlay"] {\n background-color: var(--lumo-base-color);\n background-image: linear-gradient(var(--lumo-tint-5pct), var(--lumo-tint-5pct));\n border-radius: var(--lumo-border-radius-m);\n box-shadow: 0 0 0 1px var(--lumo-shade-5pct), var(--lumo-box-shadow-m);\n color: var(--lumo-body-text-color);\n font-family: var(--lumo-font-family);\n font-size: var(--lumo-font-size-m);\n font-weight: 400;\n line-height: var(--lumo-line-height-m);\n letter-spacing: 0;\n text-transform: none;\n -webkit-text-size-adjust: 100%;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n }\n\n [part="content"] {\n padding: var(--lumo-space-xs);\n }\n\n [part="backdrop"] {\n background-color: var(--lumo-shade-20pct);\n animation: 0.2s lumo-overlay-backdrop-enter both;\n will-change: opacity;\n }\n\n @keyframes lumo-overlay-backdrop-enter {\n 0% {\n opacity: 0;\n }\n }\n\n :host([closing]) [part="backdrop"] {\n animation: 0.2s lumo-overlay-backdrop-exit both;\n }\n\n @keyframes lumo-overlay-backdrop-exit {\n 100% {\n opacity: 0;\n }\n }\n\n @keyframes lumo-overlay-dummy-animation {\n 0% { opacity: 1; }\n 100% { opacity: 1; }\n }\n </style>\n </template>\n</dom-module>',document.head.appendChild(n.content);const e=document.createElement("template");e.innerHTML='<dom-module id="lumo-menu-overlay-core">\n <template>\n <style>\n :host([opening]),\n :host([closing]) {\n animation: 0.14s lumo-overlay-dummy-animation;\n }\n\n [part="overlay"] {\n will-change: opacity, transform;\n }\n\n :host([opening]) [part="overlay"] {\n animation: 0.1s lumo-menu-overlay-enter ease-out both;\n }\n\n @keyframes lumo-menu-overlay-enter {\n 0% {\n opacity: 0;\n transform: translateY(-4px);\n }\n }\n\n :host([closing]) [part="overlay"] {\n animation: 0.1s lumo-menu-overlay-exit both;\n }\n\n @keyframes lumo-menu-overlay-exit {\n 100% {\n opacity: 0;\n }\n }\n </style>\n </template>\n</dom-module><dom-module id="lumo-menu-overlay">\n <template>\n <style include="lumo-overlay lumo-menu-overlay-core">\n /* Small viewport (bottom sheet) styles */\n /* Use direct media queries instead of the state attributes (`[phone]` and `[fullscreen]`) provided by the elements */\n @media (max-width: 420px), (max-height: 420px) {\n :host {\n top: 0 !important;\n right: 0 !important;\n bottom: var(--vaadin-overlay-viewport-bottom, 0) !important;\n left: 0 !important;\n align-items: stretch !important;\n justify-content: flex-end !important;\n }\n\n [part="overlay"] {\n max-height: 50vh;\n width: 100vw;\n border-radius: 0;\n box-shadow: var(--lumo-box-shadow-xl);\n }\n\n /* The content part scrolls instead of the overlay part, because of the gradient fade-out */\n [part="content"] {\n padding: 30px var(--lumo-space-m);\n max-height: inherit;\n box-sizing: border-box;\n -webkit-overflow-scrolling: touch;\n overflow: auto;\n -webkit-mask-image: linear-gradient(transparent, #000 40px, #000 calc(100% - 40px), transparent);\n mask-image: linear-gradient(transparent, #000 40px, #000 calc(100% - 40px), transparent);\n }\n\n [part="backdrop"] {\n display: block;\n }\n\n /* Animations */\n\n :host([opening]) [part="overlay"] {\n animation: 0.2s lumo-mobile-menu-overlay-enter cubic-bezier(.215, .61, .355, 1) both;\n }\n\n :host([closing]),\n :host([closing]) [part="backdrop"] {\n animation-delay: 0.14s;\n }\n\n :host([closing]) [part="overlay"] {\n animation: 0.14s 0.14s lumo-mobile-menu-overlay-exit cubic-bezier(.55, .055, .675, .19) both;\n }\n }\n\n @keyframes lumo-mobile-menu-overlay-enter {\n 0% {\n transform: translateY(150%);\n }\n }\n\n @keyframes lumo-mobile-menu-overlay-exit {\n 100% {\n transform: translateY(150%);\n }\n }\n </style>\n </template>\n</dom-module>',document.head.appendChild(e.content);
@@ -1,4 +1,4 @@
1
- import"./shared-cf1965cb.js";import"./shared-c59277a4.js";import"./shared-8be109a9.js";import"./shared-c066b7fd.js";import{_ as e}from"./shared-8f9014ff.js";import{R as l,T as a,a as n}from"./shared-5b8c7250.js";import{C as t}from"./shared-222b23bb.js";import{s as o,h as r,c as i,L as s}from"./shared-ba5c42c7.js";import{I as u}from"./shared-930e68b7.js";import{O as d,T as v}from"./shared-ba230a1b.js";import{o as c}from"./shared-63c32024.js";import{c as p}from"./shared-4e709717.js";import{r as h}from"./shared-5fd5805c.js";import{i as f}from"./shared-53e42a77.js";import{s as b}from"./shared-2061be9a.js";import{p as g}from"./shared-e650caf3.js";let y;const m=o(y||(y=(e=>e)`
1
+ import"./shared-720c03fa.js";import"./shared-203661bc.js";import"./shared-16ccc5a3.js";import"./shared-f2e36f0f.js";import{_ as e}from"./shared-8f9014ff.js";import{R as l,T as a,a as n}from"./shared-45c7e449.js";import{C as t}from"./shared-222b23bb.js";import{s as o,h as r,c as i,L as s}from"./shared-ba5c42c7.js";import{I as u}from"./shared-930e68b7.js";import{O as d,T as v}from"./shared-ba230a1b.js";import{o as c}from"./shared-63c32024.js";import{c as p}from"./shared-4e709717.js";import{r as h}from"./shared-5fd5805c.js";import{i as f}from"./shared-53e42a77.js";import{s as b}from"./shared-2061be9a.js";import{p as g}from"./shared-e650caf3.js";let y;const m=o(y||(y=(e=>e)`
2
2
  <svg class="w-full h-full" viewBox="0 0 36 36" fill="none" xmlns="http://www.w3.org/2000/svg">
3
3
  <path d="M26.4 14.7399C26.4 15.2922 25.9523 15.7399 25.4 15.7399H10.6C10.0477 15.7399 9.60001 15.2922 9.60001 14.7399V14.2C9.60001 13.6477 10.0477 13.2 10.6 13.2H25.4C25.9523 13.2 26.4 13.6477 26.4 14.2V14.7399ZM26.4 21.8C26.4 22.3523 25.9523 22.8 25.4 22.8H10.6C10.0477 22.8 9.60001 22.3523 9.60001 21.8V21.2601C9.60001 20.7078 10.0477 20.2601 10.6 20.2601H25.4C25.9523 20.2601 26.4 20.7078 26.4 21.2601V21.8Z" class="fill-current"/>
4
4
  </svg>