@foxy.io/elements 1.15.0-beta.1 → 1.15.0-beta.10

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 (343) hide show
  1. package/dist/cdn/foxy-access-recovery-form.js +1 -1
  2. package/dist/cdn/foxy-address-card.js +2 -2
  3. package/dist/cdn/foxy-address-form.js +1 -1
  4. package/dist/cdn/foxy-applied-tax-card.js +1 -1
  5. package/dist/cdn/foxy-attribute-card.js +1 -1
  6. package/dist/cdn/foxy-attribute-form.js +1 -1
  7. package/dist/cdn/foxy-cancellation-form.js +1 -1
  8. package/dist/cdn/foxy-collection-page.js +1 -1
  9. package/dist/cdn/foxy-collection-pages.js +1 -1
  10. package/dist/cdn/foxy-coupon-card.js +1 -0
  11. package/dist/cdn/foxy-coupon-code-form.js +1 -0
  12. package/dist/cdn/foxy-coupon-codes-form.js +1 -0
  13. package/dist/cdn/foxy-coupon-form.js +1 -0
  14. package/dist/cdn/foxy-custom-field-card.js +1 -1
  15. package/dist/cdn/foxy-custom-field-form.js +1 -1
  16. package/dist/cdn/foxy-customer-api.js +1 -1
  17. package/dist/cdn/foxy-customer-card.js +1 -1
  18. package/dist/cdn/foxy-customer-form.js +1 -1
  19. package/dist/cdn/foxy-customer-portal-settings.js +1 -972
  20. package/dist/cdn/foxy-customer-portal.js +13 -13
  21. package/dist/cdn/foxy-customer.js +2 -2
  22. package/dist/cdn/foxy-customers-table.js +1 -1
  23. package/dist/cdn/foxy-discount-card.js +1 -1
  24. package/dist/cdn/foxy-donation.js +1 -1
  25. package/dist/cdn/foxy-email-template-form.js +1 -1
  26. package/dist/cdn/foxy-error-entry-card.js +1 -1
  27. package/dist/cdn/foxy-form-dialog.js +1 -1
  28. package/dist/cdn/foxy-generate-codes-form.js +1 -0
  29. package/dist/cdn/foxy-gift-card-card.js +1 -0
  30. package/dist/cdn/foxy-gift-card-code-form.js +1 -0
  31. package/dist/cdn/foxy-gift-card-codes-form.js +1 -0
  32. package/dist/cdn/foxy-gift-card-form.js +1 -0
  33. package/dist/cdn/foxy-i18n.js +1 -1
  34. package/dist/cdn/foxy-items-form.js +1 -1
  35. package/dist/cdn/foxy-nucleon-element.js +1 -1
  36. package/dist/cdn/foxy-pagination.js +1 -0
  37. package/dist/cdn/foxy-payment-card.js +1 -1
  38. package/dist/cdn/foxy-payment-method-card.js +1 -1
  39. package/dist/cdn/foxy-query-builder.js +1 -69
  40. package/dist/cdn/foxy-sign-in-form.js +1 -1
  41. package/dist/cdn/foxy-spinner.js +2 -2
  42. package/dist/cdn/foxy-subscription-card.js +1 -1
  43. package/dist/cdn/foxy-subscription-form.js +4 -4
  44. package/dist/cdn/foxy-subscriptions-table.js +1 -1
  45. package/dist/cdn/foxy-table.js +1 -1
  46. package/dist/cdn/foxy-tax-card.js +1 -1
  47. package/dist/cdn/foxy-tax-form.js +1 -1
  48. package/dist/cdn/foxy-template-config-form.js +1 -1
  49. package/dist/cdn/foxy-template-form.js +1 -1
  50. package/dist/cdn/foxy-transaction-card.js +1 -1
  51. package/dist/cdn/foxy-transactions-table.js +1 -1
  52. package/dist/cdn/foxy-user-form.js +1 -1
  53. package/dist/cdn/foxy-users-table.js +1 -1
  54. package/dist/cdn/shared-00d6a968.js +1 -0
  55. package/dist/cdn/shared-023a97c2.js +302 -0
  56. package/dist/cdn/{shared-91e768be.js → shared-027c537d.js} +1 -1
  57. package/dist/cdn/{shared-f0a83bd6.js → shared-073cb8e9.js} +1 -1
  58. package/dist/cdn/{shared-8a7bee0d.js → shared-09c5f9f1.js} +1 -1
  59. package/dist/cdn/{shared-94b0ae99.js → shared-0f38a631.js} +2 -2
  60. package/dist/cdn/{shared-200f613b.js → shared-1a67bc75.js} +2 -2
  61. package/dist/cdn/{shared-34b2c1e2.js → shared-21419f10.js} +1 -1
  62. package/dist/cdn/{shared-b5147166.js → shared-340f7584.js} +3 -3
  63. package/dist/cdn/{shared-44cfc617.js → shared-39e3ae67.js} +1 -1
  64. package/dist/cdn/shared-3f0a9c2c.js +1 -0
  65. package/dist/cdn/shared-3f965dce.js +1 -0
  66. package/dist/cdn/{shared-e7f8ffe9.js → shared-448781f9.js} +1 -1
  67. package/dist/cdn/{shared-1761daef.js → shared-5535f38f.js} +1 -1
  68. package/dist/cdn/{shared-0ced76a0.js → shared-5a54a9bc.js} +1 -1
  69. package/dist/cdn/shared-5e2fd1c7.js +1 -0
  70. package/dist/cdn/{shared-5c8b531d.js → shared-60d43523.js} +1 -1
  71. package/dist/cdn/shared-625c1272.js +69 -0
  72. package/dist/cdn/shared-65dfd512.js +131 -0
  73. package/dist/cdn/{shared-a46edf4b.js → shared-756034e4.js} +1 -1
  74. package/dist/cdn/{shared-00563cb0.js → shared-7f0a9790.js} +1 -1
  75. package/dist/cdn/shared-84d2d490.js +1 -0
  76. package/dist/cdn/{shared-df573cea.js → shared-8b20bc23.js} +0 -0
  77. package/dist/cdn/shared-8c8a910c.js +1 -0
  78. package/dist/cdn/{shared-5f54e916.js → shared-9cd49a3e.js} +4 -4
  79. package/dist/cdn/{shared-7a42073a.js → shared-9fc4a896.js} +1 -1
  80. package/dist/cdn/{shared-bb824ab4.js → shared-a040d79d.js} +2 -2
  81. package/dist/cdn/{shared-bc2bfe52.js → shared-ab71552b.js} +1 -1
  82. package/dist/cdn/shared-ae8cd227.js +1 -0
  83. package/dist/cdn/{shared-322e60b1.js → shared-ba39823e.js} +1 -1
  84. package/dist/cdn/shared-d58c947c.js +804 -0
  85. package/dist/cdn/{shared-593f7e2c.js → shared-df730f90.js} +1 -1
  86. package/dist/cdn/shared-e55088b4.js +1 -0
  87. package/dist/cdn/shared-ecfd3539.js +1 -0
  88. package/dist/cdn/shared-f2a69797.js +1 -0
  89. package/dist/cdn/{shared-16f72e27.js → shared-f4ad24f4.js} +1 -1
  90. package/dist/cdn/{shared-ec861f31.js → shared-fab8c705.js} +3 -3
  91. package/dist/cdn/translations/access-recovery-form/en.json +12 -0
  92. package/dist/cdn/translations/address-card/en.json +11 -0
  93. package/dist/cdn/translations/address-form/en.json +27 -0
  94. package/dist/cdn/translations/applied-tax-card/en.json +9 -0
  95. package/dist/cdn/translations/attribute-card/en.json +7 -0
  96. package/dist/cdn/translations/attribute-form/en.json +22 -0
  97. package/dist/cdn/translations/cancellation-form/en.json +10 -0
  98. package/dist/cdn/translations/country/pl.json +251 -0
  99. package/dist/cdn/translations/coupon-card/en.json +36 -0
  100. package/dist/cdn/translations/coupon-code-form/en.json +17 -0
  101. package/dist/cdn/translations/coupon-codes-form/en.json +20 -0
  102. package/dist/cdn/translations/coupon-form/en.json +186 -0
  103. package/dist/cdn/translations/custom-field-card/en.json +7 -0
  104. package/dist/cdn/translations/custom-field-form/en.json +19 -0
  105. package/dist/cdn/translations/customer/en.json +247 -0
  106. package/dist/cdn/translations/customer-card/en.json +7 -0
  107. package/dist/cdn/translations/customer-form/en.json +21 -0
  108. package/dist/cdn/translations/customer-portal/de.json +202 -14
  109. package/dist/cdn/translations/customer-portal/en.json +202 -14
  110. package/dist/cdn/translations/customer-portal/es.json +202 -14
  111. package/dist/cdn/translations/customer-portal/pl.json +223 -0
  112. package/dist/cdn/translations/customer-portal/zh-hk.json +202 -14
  113. package/dist/cdn/translations/customers-table/en.json +9 -0
  114. package/dist/cdn/translations/discount-card/en.json +8 -0
  115. package/dist/cdn/translations/email-template-form/en.json +25 -0
  116. package/dist/cdn/translations/error-entry-card/en.json +7 -0
  117. package/dist/cdn/translations/generate-codes-form/en.json +19 -0
  118. package/dist/cdn/translations/gift-card-card/en.json +9 -0
  119. package/dist/cdn/translations/gift-card-code-form/en.json +19 -0
  120. package/dist/cdn/translations/gift-card-codes-form/en.json +25 -0
  121. package/dist/cdn/translations/gift-card-form/en.json +314 -0
  122. package/dist/cdn/translations/pagination/en.json +7 -0
  123. package/dist/cdn/translations/payment-card/en.json +12 -0
  124. package/dist/cdn/translations/payment-method-card/en.json +13 -0
  125. package/dist/cdn/translations/query-builder/en.json +32 -0
  126. package/dist/cdn/translations/sign-in-form/en.json +21 -0
  127. package/dist/cdn/translations/spinner/en.json +7 -0
  128. package/dist/cdn/translations/subscription-card/en.json +26 -0
  129. package/dist/cdn/translations/subscription-form/en.json +76 -0
  130. package/dist/cdn/translations/subscriptions-table/en.json +26 -0
  131. package/dist/cdn/translations/tax-card/en.json +11 -0
  132. package/dist/cdn/translations/tax-form/en.json +38 -0
  133. package/dist/cdn/translations/template-config-form/en.json +107 -0
  134. package/dist/cdn/translations/template-form/en.json +23 -0
  135. package/dist/cdn/translations/transaction-card/en.json +25 -0
  136. package/dist/cdn/translations/transactions-table/en.json +22 -0
  137. package/dist/cdn/translations/user-form/en.json +26 -0
  138. package/dist/cdn/translations/users-table/en.json +44 -0
  139. package/dist/elements/private/Checkbox/Checkbox.js +36 -22
  140. package/dist/elements/private/Checkbox/Checkbox.js.map +1 -1
  141. package/dist/elements/private/Choice/Choice.js +1 -0
  142. package/dist/elements/private/Choice/Choice.js.map +1 -1
  143. package/dist/elements/private/EditableList/EditableList.d.ts +20 -0
  144. package/dist/elements/private/EditableList/EditableList.js +124 -0
  145. package/dist/elements/private/EditableList/EditableList.js.map +1 -0
  146. package/dist/elements/private/FrequencyInput/FrequencyInput.d.ts +7 -6
  147. package/dist/elements/private/FrequencyInput/FrequencyInput.js +10 -23
  148. package/dist/elements/private/FrequencyInput/FrequencyInput.js.map +1 -1
  149. package/dist/elements/public/AccessRecoveryForm/AccessRecoveryForm.js +1 -1
  150. package/dist/elements/public/AccessRecoveryForm/AccessRecoveryForm.js.map +1 -1
  151. package/dist/elements/public/AttributeCard/types.d.ts +3 -3
  152. package/dist/elements/public/AttributeCard/types.js.map +1 -1
  153. package/dist/elements/public/AttributeForm/AttributeForm.js +2 -1
  154. package/dist/elements/public/AttributeForm/AttributeForm.js.map +1 -1
  155. package/dist/elements/public/AttributeForm/types.d.ts +3 -3
  156. package/dist/elements/public/AttributeForm/types.js.map +1 -1
  157. package/dist/elements/public/CollectionPage/CollectionPage.js +3 -1
  158. package/dist/elements/public/CollectionPage/CollectionPage.js.map +1 -1
  159. package/dist/elements/public/CollectionPage/types.d.ts +2 -0
  160. package/dist/elements/public/CollectionPage/types.js.map +1 -1
  161. package/dist/elements/public/CouponCard/CouponCard.d.ts +29 -0
  162. package/dist/elements/public/CouponCard/CouponCard.js +131 -0
  163. package/dist/elements/public/CouponCard/CouponCard.js.map +1 -0
  164. package/dist/elements/public/CouponCard/index.d.ts +5 -0
  165. package/dist/elements/public/CouponCard/index.js +7 -0
  166. package/dist/elements/public/CouponCard/index.js.map +1 -0
  167. package/dist/elements/public/CouponCard/types.d.ts +15 -0
  168. package/dist/elements/public/CouponCard/types.js +2 -0
  169. package/dist/elements/public/CouponCard/types.js.map +1 -0
  170. package/dist/elements/public/CouponCodeForm/CouponCodeForm.d.ts +45 -0
  171. package/dist/elements/public/CouponCodeForm/CouponCodeForm.js +218 -0
  172. package/dist/elements/public/CouponCodeForm/CouponCodeForm.js.map +1 -0
  173. package/dist/elements/public/CouponCodeForm/index.d.ts +8 -0
  174. package/dist/elements/public/CouponCodeForm/index.js +10 -0
  175. package/dist/elements/public/CouponCodeForm/index.js.map +1 -0
  176. package/dist/elements/public/CouponCodeForm/types.d.ts +15 -0
  177. package/dist/elements/public/CouponCodeForm/types.js +2 -0
  178. package/dist/elements/public/CouponCodeForm/types.js.map +1 -0
  179. package/dist/elements/public/CouponCodesForm/CouponCodesForm.d.ts +31 -0
  180. package/dist/elements/public/CouponCodesForm/CouponCodesForm.js +218 -0
  181. package/dist/elements/public/CouponCodesForm/CouponCodesForm.js.map +1 -0
  182. package/dist/elements/public/CouponCodesForm/index.d.ts +8 -0
  183. package/dist/elements/public/CouponCodesForm/index.js +12 -0
  184. package/dist/elements/public/CouponCodesForm/index.js.map +1 -0
  185. package/dist/elements/public/CouponCodesForm/internal/InternalCouponCodesFormListItem.d.ts +14 -0
  186. package/dist/elements/public/CouponCodesForm/internal/InternalCouponCodesFormListItem.js +48 -0
  187. package/dist/elements/public/CouponCodesForm/internal/InternalCouponCodesFormListItem.js.map +1 -0
  188. package/dist/elements/public/CouponCodesForm/types.d.ts +17 -0
  189. package/dist/elements/public/CouponCodesForm/types.js +2 -0
  190. package/dist/elements/public/CouponCodesForm/types.js.map +1 -0
  191. package/dist/elements/public/CouponForm/CouponForm.d.ts +77 -0
  192. package/dist/elements/public/CouponForm/CouponForm.js +1301 -0
  193. package/dist/elements/public/CouponForm/CouponForm.js.map +1 -0
  194. package/dist/elements/public/CouponForm/index.d.ts +19 -0
  195. package/dist/elements/public/CouponForm/index.js +21 -0
  196. package/dist/elements/public/CouponForm/index.js.map +1 -0
  197. package/dist/elements/public/CouponForm/private/CategoryRestrictionsPage.d.ts +20 -0
  198. package/dist/elements/public/CouponForm/private/CategoryRestrictionsPage.js +99 -0
  199. package/dist/elements/public/CouponForm/private/CategoryRestrictionsPage.js.map +1 -0
  200. package/dist/elements/public/CouponForm/private/CategoryRestrictionsPageItem.d.ts +18 -0
  201. package/dist/elements/public/CouponForm/private/CategoryRestrictionsPageItem.js +50 -0
  202. package/dist/elements/public/CouponForm/private/CategoryRestrictionsPageItem.js.map +1 -0
  203. package/dist/elements/public/CouponForm/private/CategoryRestrictionsPageItemContent.d.ts +18 -0
  204. package/dist/elements/public/CouponForm/private/CategoryRestrictionsPageItemContent.js +53 -0
  205. package/dist/elements/public/CouponForm/private/CategoryRestrictionsPageItemContent.js.map +1 -0
  206. package/dist/elements/public/CouponForm/types.d.ts +27 -0
  207. package/dist/elements/public/CouponForm/types.js +2 -0
  208. package/dist/elements/public/CouponForm/types.js.map +1 -0
  209. package/dist/elements/public/CustomFieldForm/CustomFieldForm.js +2 -1
  210. package/dist/elements/public/CustomFieldForm/CustomFieldForm.js.map +1 -1
  211. package/dist/elements/public/Customer/Customer.js +1 -1
  212. package/dist/elements/public/Customer/Customer.js.map +1 -1
  213. package/dist/elements/public/CustomerPortal/InternalCustomerPortalLoggedInView.js +25 -8
  214. package/dist/elements/public/CustomerPortal/InternalCustomerPortalLoggedInView.js.map +1 -1
  215. package/dist/elements/public/CustomerPortal/InternalCustomerPortalLoggedOutView.js +20 -6
  216. package/dist/elements/public/CustomerPortal/InternalCustomerPortalLoggedOutView.js.map +1 -1
  217. package/dist/elements/public/CustomerPortal/InternalCustomerPortalSubscriptions.js +2 -1
  218. package/dist/elements/public/CustomerPortal/InternalCustomerPortalSubscriptions.js.map +1 -1
  219. package/dist/elements/public/GenerateCodesForm/GenerateCodesForm.d.ts +43 -0
  220. package/dist/elements/public/GenerateCodesForm/GenerateCodesForm.js +249 -0
  221. package/dist/elements/public/GenerateCodesForm/GenerateCodesForm.js.map +1 -0
  222. package/dist/elements/public/GenerateCodesForm/index.d.ts +8 -0
  223. package/dist/elements/public/GenerateCodesForm/index.js +10 -0
  224. package/dist/elements/public/GenerateCodesForm/index.js.map +1 -0
  225. package/dist/elements/public/GenerateCodesForm/types.d.ts +24 -0
  226. package/dist/elements/public/GenerateCodesForm/types.js +2 -0
  227. package/dist/elements/public/GenerateCodesForm/types.js.map +1 -0
  228. package/dist/elements/public/GiftCardCard/GiftCardCard.d.ts +26 -0
  229. package/dist/elements/public/GiftCardCard/GiftCardCard.js +95 -0
  230. package/dist/elements/public/GiftCardCard/GiftCardCard.js.map +1 -0
  231. package/dist/elements/public/GiftCardCard/index.d.ts +5 -0
  232. package/dist/elements/public/GiftCardCard/index.js +7 -0
  233. package/dist/elements/public/GiftCardCard/index.js.map +1 -0
  234. package/dist/elements/public/GiftCardCard/types.d.ts +11 -0
  235. package/dist/elements/public/GiftCardCard/types.js +2 -0
  236. package/dist/elements/public/GiftCardCard/types.js.map +1 -0
  237. package/dist/elements/public/GiftCardCodeForm/GiftCardCodeForm.d.ts +55 -0
  238. package/dist/elements/public/GiftCardCodeForm/GiftCardCodeForm.js +292 -0
  239. package/dist/elements/public/GiftCardCodeForm/GiftCardCodeForm.js.map +1 -0
  240. package/dist/elements/public/GiftCardCodeForm/index.d.ts +10 -0
  241. package/dist/elements/public/GiftCardCodeForm/index.js +12 -0
  242. package/dist/elements/public/GiftCardCodeForm/index.js.map +1 -0
  243. package/dist/elements/public/GiftCardCodeForm/types.d.ts +19 -0
  244. package/dist/elements/public/GiftCardCodeForm/types.js +2 -0
  245. package/dist/elements/public/GiftCardCodeForm/types.js.map +1 -0
  246. package/dist/elements/public/GiftCardCodesForm/GiftCardCodesForm.d.ts +37 -0
  247. package/dist/elements/public/GiftCardCodesForm/GiftCardCodesForm.js +264 -0
  248. package/dist/elements/public/GiftCardCodesForm/GiftCardCodesForm.js.map +1 -0
  249. package/dist/elements/public/GiftCardCodesForm/index.d.ts +9 -0
  250. package/dist/elements/public/GiftCardCodesForm/index.js +13 -0
  251. package/dist/elements/public/GiftCardCodesForm/index.js.map +1 -0
  252. package/dist/elements/public/GiftCardCodesForm/internal/InternalGiftCardCodesFormListItem.d.ts +19 -0
  253. package/dist/elements/public/GiftCardCodesForm/internal/InternalGiftCardCodesFormListItem.js +48 -0
  254. package/dist/elements/public/GiftCardCodesForm/internal/InternalGiftCardCodesFormListItem.js.map +1 -0
  255. package/dist/elements/public/GiftCardCodesForm/types.d.ts +17 -0
  256. package/dist/elements/public/GiftCardCodesForm/types.js +2 -0
  257. package/dist/elements/public/GiftCardCodesForm/types.js.map +1 -0
  258. package/dist/elements/public/GiftCardForm/GiftCardForm.d.ts +67 -0
  259. package/dist/elements/public/GiftCardForm/GiftCardForm.js +684 -0
  260. package/dist/elements/public/GiftCardForm/GiftCardForm.js.map +1 -0
  261. package/dist/elements/public/GiftCardForm/currencies.d.ts +1 -0
  262. package/dist/elements/public/GiftCardForm/currencies.js +173 -0
  263. package/dist/elements/public/GiftCardForm/currencies.js.map +1 -0
  264. package/dist/elements/public/GiftCardForm/index.d.ts +18 -0
  265. package/dist/elements/public/GiftCardForm/index.js +20 -0
  266. package/dist/elements/public/GiftCardForm/index.js.map +1 -0
  267. package/dist/elements/public/GiftCardForm/private/CategoryRestrictionsPage.d.ts +20 -0
  268. package/dist/elements/public/GiftCardForm/private/CategoryRestrictionsPage.js +99 -0
  269. package/dist/elements/public/GiftCardForm/private/CategoryRestrictionsPage.js.map +1 -0
  270. package/dist/elements/public/GiftCardForm/private/CategoryRestrictionsPageItem.d.ts +18 -0
  271. package/dist/elements/public/GiftCardForm/private/CategoryRestrictionsPageItem.js +50 -0
  272. package/dist/elements/public/GiftCardForm/private/CategoryRestrictionsPageItem.js.map +1 -0
  273. package/dist/elements/public/GiftCardForm/private/CategoryRestrictionsPageItemContent.d.ts +18 -0
  274. package/dist/elements/public/GiftCardForm/private/CategoryRestrictionsPageItemContent.js +53 -0
  275. package/dist/elements/public/GiftCardForm/private/CategoryRestrictionsPageItemContent.js.map +1 -0
  276. package/dist/elements/public/GiftCardForm/types.d.ts +28 -0
  277. package/dist/elements/public/GiftCardForm/types.js +2 -0
  278. package/dist/elements/public/GiftCardForm/types.js.map +1 -0
  279. package/dist/elements/public/I18n/I18n.js +1 -1
  280. package/dist/elements/public/I18n/I18n.js.map +1 -1
  281. package/dist/elements/public/I18n/format/date.js +7 -6
  282. package/dist/elements/public/I18n/format/date.js.map +1 -1
  283. package/dist/elements/public/I18n/format/discount.d.ts +6 -0
  284. package/dist/elements/public/I18n/format/discount.js +20 -0
  285. package/dist/elements/public/I18n/format/discount.js.map +1 -0
  286. package/dist/elements/public/I18n/format/index.js +6 -0
  287. package/dist/elements/public/I18n/format/index.js.map +1 -1
  288. package/dist/elements/public/I18n/format/ordinal.d.ts +6 -0
  289. package/dist/elements/public/I18n/format/ordinal.js +9 -0
  290. package/dist/elements/public/I18n/format/ordinal.js.map +1 -0
  291. package/dist/elements/public/I18n/format/relative.d.ts +6 -0
  292. package/dist/elements/public/I18n/format/relative.js +15 -0
  293. package/dist/elements/public/I18n/format/relative.js.map +1 -0
  294. package/dist/elements/public/NucleonElement/NucleonElement.js +4 -4
  295. package/dist/elements/public/NucleonElement/NucleonElement.js.map +1 -1
  296. package/dist/elements/public/Pagination/Pagination.d.ts +37 -0
  297. package/dist/elements/public/Pagination/Pagination.js +158 -0
  298. package/dist/elements/public/Pagination/Pagination.js.map +1 -0
  299. package/dist/elements/public/Pagination/index.d.ts +6 -0
  300. package/dist/elements/public/Pagination/index.js +8 -0
  301. package/dist/elements/public/Pagination/index.js.map +1 -0
  302. package/dist/elements/public/SignInForm/SignInForm.js +1 -1
  303. package/dist/elements/public/SignInForm/SignInForm.js.map +1 -1
  304. package/dist/elements/public/SubscriptionForm/SubscriptionForm.js +1 -1
  305. package/dist/elements/public/SubscriptionForm/SubscriptionForm.js.map +1 -1
  306. package/dist/elements/public/Table/Table.js +20 -5
  307. package/dist/elements/public/Table/Table.js.map +1 -1
  308. package/dist/elements/public/TaxForm/TaxForm.js +16 -14
  309. package/dist/elements/public/TaxForm/TaxForm.js.map +1 -1
  310. package/dist/elements/public/TemplateForm/TemplateForm.js +1 -1
  311. package/dist/elements/public/TemplateForm/TemplateForm.js.map +1 -1
  312. package/dist/elements/public/UserForm/UserForm.js +2 -1
  313. package/dist/elements/public/UserForm/UserForm.js.map +1 -1
  314. package/dist/elements/public/UsersTable/UsersTable.d.ts +5 -1
  315. package/dist/elements/public/UsersTable/UsersTable.js +2 -1
  316. package/dist/elements/public/UsersTable/UsersTable.js.map +1 -1
  317. package/dist/elements/public/index.d.ts +10 -0
  318. package/dist/elements/public/index.defined.d.ts +10 -0
  319. package/dist/elements/public/index.defined.js +10 -0
  320. package/dist/elements/public/index.defined.js.map +1 -1
  321. package/dist/elements/public/index.js +10 -0
  322. package/dist/elements/public/index.js.map +1 -1
  323. package/dist/mixins/themeable.js +96 -4
  324. package/dist/mixins/themeable.js.map +1 -1
  325. package/dist/mixins/translatable.js +1 -1
  326. package/dist/mixins/translatable.js.map +1 -1
  327. package/dist/utils/parse-duration.d.ts +1 -1
  328. package/dist/utils/parse-duration.js +7 -3
  329. package/dist/utils/parse-duration.js.map +1 -1
  330. package/package.json +3 -3
  331. package/dist/cdn/shared-07abcd7b.js +0 -1
  332. package/dist/cdn/shared-35dbd2c5.js +0 -1
  333. package/dist/cdn/shared-6b7602c7.js +0 -1
  334. package/dist/cdn/shared-87ca7818.js +0 -1
  335. package/dist/cdn/shared-9a40309d.js +0 -1
  336. package/dist/cdn/shared-ce1da35d.js +0 -1
  337. package/dist/cdn/shared-d01d809a.js +0 -1
  338. package/dist/cdn/shared-d8ffb279.js +0 -264
  339. package/dist/cdn/shared-e5cbf291.js +0 -1
  340. package/dist/cdn/shared-f1dc1c6c.js +0 -1
  341. package/dist/cdn/translations/shared/de.json +0 -271
  342. package/dist/cdn/translations/shared/en.json +0 -272
  343. package/dist/cdn/translations/shared/es.json +0 -272
@@ -1,4 +1,4 @@
1
- import{C as e,j as t,L as s,_ as i,h as n}from"./shared-63eaded9.js";import{a as r,E as o,T as l,C as a}from"./shared-df573cea.js";import{T as d}from"./shared-bb824ab4.js";import{O as A,I as h}from"./shared-ec861f31.js";import{h as c,a as m,t as u,P as p}from"./shared-ff79f3f9.js";import{F as g,P as v,a as y}from"./shared-46ee137f.js";import{D as _}from"./shared-d8ffb279.js";import{b as f,c as b}from"./shared-9a40309d.js";class w extends CustomEvent{constructor(e){super("change",{detail:e})}}class x extends w{}const E=c`<dom-module id="lumo-list-box" theme-for="vaadin-list-box">
1
+ import{C as e,j as t,L as s,_ as i,h as n}from"./shared-63eaded9.js";import{a as r,E as o,T as l,C as a}from"./shared-8b20bc23.js";import{T as d}from"./shared-a040d79d.js";import{O as A,I as h}from"./shared-fab8c705.js";import{h as c,a as m,t as u,P as p}from"./shared-ff79f3f9.js";import{F as g,P as v,a as y}from"./shared-46ee137f.js";import{D as _}from"./shared-023a97c2.js";import{b as f,c as b}from"./shared-ae8cd227.js";class w extends CustomEvent{constructor(e){super("change",{detail:e})}}class x extends w{}const E=c`<dom-module id="lumo-list-box" theme-for="vaadin-list-box">
2
2
  <template>
3
3
  <style>
4
4
  :host {
@@ -301,7 +301,7 @@ const R=document.createElement("template");R.innerHTML="<custom-style>\n <style
301
301
  <vaadin-select-overlay opened="{{opened}}" with-backdrop="[[_phone]]" phone\$="[[_phone]]" theme\$="[[theme]]"></vaadin-select-overlay>
302
302
 
303
303
  <iron-media-query query="[[_phoneMediaQuery]]" query-matches="{{_phone}}"></iron-media-query>
304
- `}static get is(){return"vaadin-select"}static get version(){return"2.4.0"}static get properties(){return{opened:{type:Boolean,value:!1,notify:!0,reflectToAttribute:!0,observer:"_openedChanged"},renderer:Function,errorMessage:{type:String,value:""},label:{type:String},value:{type:String,value:"",notify:!0,observer:"_valueChanged"},required:{type:Boolean,reflectToAttribute:!0,observer:"_requiredChanged"},invalid:{type:Boolean,reflectToAttribute:!0,notify:!0,value:!1},name:{type:String,reflectToAttribute:!0},placeholder:{type:String},helperText:{type:String,value:""},readonly:{type:Boolean,value:!1,reflectToAttribute:!0},_phone:Boolean,_phoneMediaQuery:{value:"(max-width: 420px), (max-height: 420px)"},_overlayElement:Object,_inputElement:Object,_toggleElement:Object,_items:Object,_contentTemplate:Object,_oldTemplate:Object,_oldRenderer:Object}}static get observers(){return["_updateSelectedItem(value, _items)","_updateAriaExpanded(opened, _toggleElement, _inputElement)","_templateOrRendererChanged(_contentTemplate, renderer, _overlayElement)"]}constructor(){super(),this._boundSetPosition=this._setPosition.bind(this)}connectedCallback(){super.connectedCallback(),this.addEventListener("iron-resize",this._boundSetPosition)}ready(){super.ready(),this._overlayElement=this.shadowRoot.querySelector("vaadin-select-overlay"),this._valueElement=this.shadowRoot.querySelector('[part="value"]'),this._toggleElement=this.shadowRoot.querySelector('[part="toggle-button"]'),this._nativeInput=this.focusElement.shadowRoot.querySelector("input"),this._nativeInput.setAttribute("aria-hidden",!0),this._nativeInput.setAttribute("tabindex",-1),this._nativeInput.style.pointerEvents="none",this.focusElement.addEventListener("click",(e=>{const t=Array.from(e.composedPath()).some((e=>e.nodeType===Node.ELEMENT_NODE&&"helper"===e.getAttribute("slot")));this.opened=!this.readonly&&!t})),this.focusElement.addEventListener("keydown",(e=>this._onKeyDown(e))),this._observer=new g(this,(e=>this._setTemplateFromNodes(e.addedNodes))),this._observer.flush()}_setTemplateFromNodes(e){const t=Array.from(e).filter((e=>e.localName&&"template"===e.localName))[0]||this._contentTemplate;this._overlayElement.template=this._contentTemplate=t,this._setForwardHostProps()}_setForwardHostProps(){if(this._overlayElement.content){const e=this._overlayElement._instance&&this._overlayElement._instance.forwardHostProp;this._overlayElement._instance&&(this._overlayElement._instance.forwardHostProp=(...t)=>{e.apply(this._overlayElement._instance,t),setTimeout((()=>{this._updateValueSlot()}))},this._assignMenuElement())}}render(){this._overlayElement.render(),this._menuElement&&this._menuElement.items&&this._updateSelectedItem(this.value,this._menuElement.items)}_removeNewRendererOrTemplate(e,t,s,i){e!==t?this._contentTemplate=void 0:s!==i&&(this.renderer=void 0)}_templateOrRendererChanged(e,t,s){if(s){if(e&&t)throw this._removeNewRendererOrTemplate(e,this._oldTemplate,t,this._oldRenderer),new Error("You should only use either a renderer or a template for select content");this._oldTemplate=e,this._oldRenderer=t,t&&(s.setProperties({owner:this,renderer:t}),this.render(),s.content.firstChild&&this._assignMenuElement())}}_assignMenuElement(){this._menuElement=Array.from(this._overlayElement.content.children).filter((e=>"style"!==e.localName))[0],this._menuElement&&(this._menuElement.addEventListener("items-changed",(e=>{this._items=this._menuElement.items,this._items.forEach((e=>e.setAttribute("role","option")))})),this._menuElement.addEventListener("selected-changed",(e=>this._updateValueSlot())),this._menuElement.addEventListener("keydown",(e=>this._onKeyDownInside(e))),this._menuElement.addEventListener("click",(e=>{this.__userInteraction=!0,this.opened=!1}),!0),this._menuElement.setAttribute("role","listbox"))}get focusElement(){return this._inputElement||(this._inputElement=this.shadowRoot.querySelector("vaadin-select-text-field"))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("iron-resize",this._boundSetPosition),this.opened=!1}notifyResize(){super.notifyResize(),this.positionTarget&&this.opened&&(this._setPosition(),requestAnimationFrame(this._setPosition.bind(this)))}_requiredChanged(e){this.setAttribute("aria-required",e)}_valueChanged(e,t){""===e?this.focusElement.removeAttribute("has-value"):this.focusElement.setAttribute("has-value",""),""===e&&void 0===t||this.validate()}_onKeyDown(e){if(!this.readonly&&!this.opened)if(/^(Enter|SpaceBar|\s|ArrowDown|Down|ArrowUp|Up)$/.test(e.key))e.preventDefault(),this.opened=!0;else if(/[a-zA-Z0-9]/.test(e.key)&&1===e.key.length){const t=this._menuElement.selected,s=void 0!==t?t:-1,i=this._menuElement._searchKey(s,e.key);i>=0&&(this.__userInteraction=!0,this._updateSelectedItem(this._items[i].value,this._items))}}_onKeyDownInside(e){/^(Tab)$/.test(e.key)&&(this.opened=!1)}_openedChanged(e,t){if(e){if(!this._overlayElement||!this._menuElement||!this._toggleElement||!this.focusElement||this.disabled||this.readonly)return void(this.opened=!1);this._openedWithFocusRing=this.hasAttribute("focus-ring")||this.focusElement.hasAttribute("focus-ring"),this._menuElement.focus(),this._setPosition(),window.addEventListener("scroll",this._boundSetPosition,!0)}else t&&(this._phone?this._setFocused(!1):(this.focusElement.focus(),this._openedWithFocusRing&&this.focusElement.setAttribute("focus-ring","")),this.validate(),window.removeEventListener("scroll",this._boundSetPosition,!0))}_hasContent(e){return!!e&&Boolean(e.hasAttribute("label")?e.getAttribute("label"):e.textContent.trim()||e.children.length)}_attachSelectedItem(e){if(!e)return;let t;e.hasAttribute("label")?(t=document.createElement("vaadin-item"),t.textContent=e.getAttribute("label")):t=e.cloneNode(!0),t._sourceItem=e,t.removeAttribute("tabindex"),t.removeAttribute("role"),this._valueElement.appendChild(t),t.selected=!0}_updateAriaExpanded(e,t,s){t&&t.setAttribute("aria-expanded",e),s&&s.focusElement&&s.focusElement.setAttribute("aria-expanded",e)}_updateValueSlot(){this.opened=!1,this._valueElement.innerHTML="";const e=this._items[this._menuElement.selected],t=this._hasContent(e),s=this._inputElement.shadowRoot.querySelector('slot[name="input"]')?"input":"value";this._valueElement.slot=t?s:"",t&&window.ShadyDOM&&window.ShadyDOM.flush(),this._attachSelectedItem(e),!this._valueChanging&&e&&(this._selectedChanging=!0,this.value=e.value||"",this.__userInteraction&&(this.dispatchEvent(new CustomEvent("change",{bubbles:!0})),this.__userInteraction=!1),delete this._selectedChanging)}_updateSelectedItem(e,t){t&&(this._menuElement.selected=t.reduce(((t,s,i)=>void 0===t&&s.value===e?i:t),void 0),this._selectedChanging||(this._valueChanging=!0,this._updateValueSlot(),delete this._valueChanging))}_setFocused(e){super._setFocused(this.opened||e),this.focusElement._setFocused(this.hasAttribute("focused")),!this.hasAttribute("focused")&&this.validate()}_setPosition(){const e=this._inputElement.shadowRoot.querySelector('[part~="input-field"]').getBoundingClientRect(),t=Math.min(window.innerHeight,document.documentElement.clientHeight),s=e.top>(t-e.height)/2;"rtl"===this.getAttribute("dir")?this._overlayElement.style.right=document.documentElement.clientWidth-e.right+"px":this._overlayElement.style.left=e.left+"px",s?(this._overlayElement.setAttribute("bottom-aligned",""),this._overlayElement.style.removeProperty("top"),this._overlayElement.style.bottom=t-e.bottom+"px"):(this._overlayElement.removeAttribute("bottom-aligned"),this._overlayElement.style.removeProperty("bottom"),this._overlayElement.style.top=e.top+"px"),this._overlayElement.updateStyles({"--vaadin-select-text-field-width":e.width+"px"})}validate(){return!(this.invalid=!(this.disabled||!this.required||this.value))}}customElements.define(Q.is,Q);let D=0;const q={},$=(t,s,i)=>{const n=i&&i.moduleId||"custom-style-module-"+D++;Array.isArray(s)||(s=s?[s]:[]),s.forEach((t=>{if(!(t instanceof e))throw new Error("An item in styles is not of type CSSResult. Use `unsafeCSS` or `css`.");if(!q[t]){const e=document.createElement("dom-module");e.innerHTML=`\n <template>\n <style>${t.toString()}</style>\n </template>\n `;const s="custom-style-module-"+D++;e.register(s),q[t]=s}}));const r=document.createElement("dom-module");if(t){const e=window.customElements&&window.customElements.get(t);e&&e.hasOwnProperty("__finalized")&&console.warn(`The custom element definition for "${t}"\n was finalized before a style module was registered.\n Make sure to add component specific style modules before\n importing the corresponding custom element.`),r.setAttribute("theme-for",t)}const o=i&&i.include||[];r.innerHTML=`\n <template>\n ${o.map((e=>`<style include=${e}></style>`))}\n ${s.map((e=>`<style include=${q[e]}></style>`))}\n </template>\n `,r.register(n)};let O,P,H=e=>e;$("vaadin-list-box",t(O||(O=H`
304
+ `}static get is(){return"vaadin-select"}static get version(){return"2.4.3"}static get properties(){return{opened:{type:Boolean,value:!1,notify:!0,reflectToAttribute:!0,observer:"_openedChanged"},renderer:Function,errorMessage:{type:String,value:""},label:{type:String},value:{type:String,value:"",notify:!0,observer:"_valueChanged"},required:{type:Boolean,reflectToAttribute:!0,observer:"_requiredChanged"},invalid:{type:Boolean,reflectToAttribute:!0,notify:!0,value:!1},name:{type:String,reflectToAttribute:!0},placeholder:{type:String},helperText:{type:String,value:""},readonly:{type:Boolean,value:!1,reflectToAttribute:!0},_phone:Boolean,_phoneMediaQuery:{value:"(max-width: 420px), (max-height: 420px)"},_overlayElement:Object,_inputElement:Object,_toggleElement:Object,_items:Object,_contentTemplate:Object,_oldTemplate:Object,_oldRenderer:Object}}static get observers(){return["_updateSelectedItem(value, _items)","_updateAriaExpanded(opened, _toggleElement, _inputElement)","_templateOrRendererChanged(_contentTemplate, renderer, _overlayElement)"]}constructor(){super(),this._boundSetPosition=this._setPosition.bind(this)}connectedCallback(){super.connectedCallback(),this.addEventListener("iron-resize",this._boundSetPosition)}ready(){super.ready(),this._overlayElement=this.shadowRoot.querySelector("vaadin-select-overlay"),this._valueElement=this.shadowRoot.querySelector('[part="value"]'),this._toggleElement=this.shadowRoot.querySelector('[part="toggle-button"]'),this._nativeInput=this.focusElement.shadowRoot.querySelector("input"),this._nativeInput.setAttribute("aria-hidden",!0),this._nativeInput.setAttribute("tabindex",-1),this._nativeInput.style.pointerEvents="none",this.focusElement.addEventListener("click",(e=>{const t=Array.from(e.composedPath()).some((e=>e.nodeType===Node.ELEMENT_NODE&&"helper"===e.getAttribute("slot")));this.opened=!this.readonly&&!t})),this.focusElement.addEventListener("keydown",(e=>this._onKeyDown(e))),this._observer=new g(this,(e=>this._setTemplateFromNodes(e.addedNodes))),this._observer.flush()}_setTemplateFromNodes(e){const t=Array.from(e).filter((e=>e.localName&&"template"===e.localName))[0]||this._contentTemplate;this._overlayElement.template=this._contentTemplate=t,this._setForwardHostProps()}_setForwardHostProps(){if(this._overlayElement.content){const e=this._overlayElement._instance&&this._overlayElement._instance.forwardHostProp;this._overlayElement._instance&&(this._overlayElement._instance.forwardHostProp=(...t)=>{e.apply(this._overlayElement._instance,t),setTimeout((()=>{this._updateValueSlot()}))},this._assignMenuElement())}}render(){this._overlayElement&&(this._overlayElement.render(),this._menuElement&&this._menuElement.items&&this._updateSelectedItem(this.value,this._menuElement.items))}_removeNewRendererOrTemplate(e,t,s,i){e!==t?this._contentTemplate=void 0:s!==i&&(this.renderer=void 0)}_templateOrRendererChanged(e,t,s){if(s){if(e&&t)throw this._removeNewRendererOrTemplate(e,this._oldTemplate,t,this._oldRenderer),new Error("You should only use either a renderer or a template for select content");this._oldTemplate=e,this._oldRenderer=t,t&&(s.setProperties({owner:this,renderer:t}),this.render(),s.content.firstChild&&this._assignMenuElement())}}_assignMenuElement(){this._menuElement=Array.from(this._overlayElement.content.children).filter((e=>"style"!==e.localName))[0],this._menuElement&&(this._menuElement.addEventListener("items-changed",(e=>{this._items=this._menuElement.items,this._items.forEach((e=>e.setAttribute("role","option")))})),this._menuElement.addEventListener("selected-changed",(e=>this._updateValueSlot())),this._menuElement.addEventListener("keydown",(e=>this._onKeyDownInside(e))),this._menuElement.addEventListener("click",(e=>{this.__userInteraction=!0,this.opened=!1}),!0),this._menuElement.setAttribute("role","listbox"))}get focusElement(){return this._inputElement||(this._inputElement=this.shadowRoot.querySelector("vaadin-select-text-field"))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("iron-resize",this._boundSetPosition),this.opened=!1}notifyResize(){super.notifyResize(),this.positionTarget&&this.opened&&(this._setPosition(),requestAnimationFrame(this._setPosition.bind(this)))}_requiredChanged(e){this.setAttribute("aria-required",e)}_valueChanged(e,t){""===e?this.focusElement.removeAttribute("has-value"):this.focusElement.setAttribute("has-value",""),""===e&&void 0===t||this.validate()}_onKeyDown(e){if(!this.readonly&&!this.opened)if(/^(Enter|SpaceBar|\s|ArrowDown|Down|ArrowUp|Up)$/.test(e.key))e.preventDefault(),this.opened=!0;else if(/[a-zA-Z0-9]/.test(e.key)&&1===e.key.length){const t=this._menuElement.selected,s=void 0!==t?t:-1,i=this._menuElement._searchKey(s,e.key);i>=0&&(this.__userInteraction=!0,this._updateSelectedItem(this._items[i].value,this._items))}}_onKeyDownInside(e){/^(Tab)$/.test(e.key)&&(this.opened=!1)}_openedChanged(e,t){if(e){if(!this._overlayElement||!this._menuElement||!this._toggleElement||!this.focusElement||this.disabled||this.readonly)return void(this.opened=!1);this._openedWithFocusRing=this.hasAttribute("focus-ring")||this.focusElement.hasAttribute("focus-ring"),this._menuElement.focus(),this._setPosition(),window.addEventListener("scroll",this._boundSetPosition,!0)}else t&&(this.focusElement.focus(),this._openedWithFocusRing&&this.focusElement.setAttribute("focus-ring",""),this.validate(),window.removeEventListener("scroll",this._boundSetPosition,!0))}_hasContent(e){return!!e&&Boolean(e.hasAttribute("label")?e.getAttribute("label"):e.textContent.trim()||e.children.length)}_attachSelectedItem(e){if(!e)return;let t;e.hasAttribute("label")?(t=document.createElement("vaadin-item"),t.textContent=e.getAttribute("label")):t=e.cloneNode(!0),t._sourceItem=e,t.removeAttribute("tabindex"),t.removeAttribute("role"),this._valueElement.appendChild(t),t.selected=!0}_updateAriaExpanded(e,t,s){t&&t.setAttribute("aria-expanded",e),s&&s.focusElement&&s.focusElement.setAttribute("aria-expanded",e)}_updateValueSlot(){this.opened=!1,this._valueElement.innerHTML="";const e=this._items[this._menuElement.selected],t=this._hasContent(e),s=this._inputElement.shadowRoot.querySelector('slot[name="input"]')?"input":"value";this._valueElement.slot=t?s:"",t&&window.ShadyDOM&&window.ShadyDOM.flush(),this._attachSelectedItem(e),!this._valueChanging&&e&&(this._selectedChanging=!0,this.value=e.value||"",this.__userInteraction&&(this.dispatchEvent(new CustomEvent("change",{bubbles:!0})),this.__userInteraction=!1),delete this._selectedChanging)}_updateSelectedItem(e,t){t&&(this._menuElement.selected=t.reduce(((t,s,i)=>void 0===t&&s.value===e?i:t),void 0),this._selectedChanging||(this._valueChanging=!0,this._updateValueSlot(),delete this._valueChanging))}_setFocused(e){super._setFocused(this.opened||e),this.focusElement._setFocused(this.hasAttribute("focused")),!this.hasAttribute("focused")&&this.validate()}_setPosition(){const e=this._inputElement.shadowRoot.querySelector('[part~="input-field"]').getBoundingClientRect(),t=Math.min(window.innerHeight,document.documentElement.clientHeight),s=e.top>(t-e.height)/2;"rtl"===this.getAttribute("dir")?this._overlayElement.style.right=document.documentElement.clientWidth-e.right+"px":this._overlayElement.style.left=e.left+"px",s?(this._overlayElement.setAttribute("bottom-aligned",""),this._overlayElement.style.removeProperty("top"),this._overlayElement.style.bottom=t-e.bottom+"px"):(this._overlayElement.removeAttribute("bottom-aligned"),this._overlayElement.style.removeProperty("bottom"),this._overlayElement.style.top=e.top+"px"),this._overlayElement.updateStyles({"--vaadin-select-text-field-width":e.width+"px"})}validate(){return!(this.invalid=!(this.disabled||!this.required||this.value))}}customElements.define(Q.is,Q);let D=0;const q={},$=(t,s,i)=>{const n=i&&i.moduleId||"custom-style-module-"+D++;Array.isArray(s)||(s=s?[s]:[]),s.forEach((t=>{if(!(t instanceof e))throw new Error("An item in styles is not of type CSSResult. Use `unsafeCSS` or `css`.");if(!q[t]){const e=document.createElement("dom-module");e.innerHTML=`\n <template>\n <style>${t.toString()}</style>\n </template>\n `;const s="custom-style-module-"+D++;e.register(s),q[t]=s}}));const r=document.createElement("dom-module");if(t){const e=window.customElements&&window.customElements.get(t);e&&e.hasOwnProperty("__finalized")&&console.warn(`The custom element definition for "${t}"\n was finalized before a style module was registered.\n Make sure to add component specific style modules before\n importing the corresponding custom element.`),r.setAttribute("theme-for",t)}const o=i&&i.include||[];r.innerHTML=`\n <template>\n ${o.map((e=>`<style include=${e}></style>`))}\n ${s.map((e=>`<style include=${q[e]}></style>`))}\n </template>\n `,r.register(n)};let O,P,H=e=>e;$("vaadin-list-box",t(O||(O=H`
305
305
  [part='items'] ::slotted(vaadin-item.dropdown-divisor){
306
306
  color:var(--lumo-contrast-40pct);
307
307
  box-shadow:0 1px var(--lumo-contrast-10pct);
@@ -311,4 +311,4 @@ const R=document.createElement("template");R.innerHTML="<custom-style>\n <style
311
311
  [part='items'] ::slotted(vaadin-item.dropdown-sub-item){
312
312
  margin-left:var(--lumo-space-l);
313
313
  }
314
- `)));class j extends s{constructor(){super(),this.disabled=!1,this.label="",this.value=null,this.items=null,this.getText=e=>e,this.__unexistentValue=`@foxy.io/elements#dropdown-${Math.random().toFixed(16).substr(2)}`,this.__renderedItems={},this.__list=document.createElement("vaadin-list-box")}static get properties(){return i(i({},super.properties),{},{disabled:{type:Boolean},getText:{type:Object,attribute:!1},items:{type:Array},label:{type:String},value:{type:String}})}static get styles(){return f.styles}render(){return n(P||(P=H` <vaadin-select class="w-full ${0}" data-testid="select" .label="${0}" .value="${0}" .disabled="${0}" .renderer="${0}" @change="${0}"> </vaadin-select> `),this.label?"-mt-m":"",this.label,null===this.value?this.__unexistentValue:this.value,this.disabled,this.__renderItems.bind(this),this.__handleChange)}__renderItems(e){var t;let s=e.querySelector("vaadin-list-box");null===s&&(e.appendChild(this.__list),s=this.__list);for(const e of Object.values(this.__renderedItems))e.dataset.keep="";const i=null!==(t=this.items)&&void 0!==t?t:[];for(let e=0;e<i.length;++e)if("string"==typeof i[e])this.__addOrKeepItem(i[e],i[e],s).classList.add("dropdown-item");else if(Array.isArray(i[e])){const t=this.__addOrKeepItem(i[e][0],i[e][0],s);t.classList.add("dropdown-item","dropdown-divisor"),t.disabled=!0;for(const t of i[e][1])this.__addOrKeepItem(i[e][0]+": "+t,t,s).classList.add("dropdown-sub-item")}for(const e of Object.values(this.__renderedItems)){const t=e;t.dataset.keep||(e.remove(),delete this.__renderedItems[t.dataset.trackId])}}__addOrKeepItem(e,t,s){let i;return this.__renderedItems[e]?i=this.__renderedItems[e]:(i=document.createElement("vaadin-item"),this.__renderedItems[e]=i,i.value=e,s.appendChild(i)),i.dataset.keep="true",i.dataset.trackId=e,i.textContent=this.getText(t),i}__handleChange(e){const t=e.target.value,s=t===this.__unexistentValue?null:t;this.dispatchEvent(new _(s))}}let V,N,z=e=>e;class F extends s{constructor(){super(...arguments),this.variant=null}static get styles(){return[f.styles,t(V||(V=z`@keyframes blink{from{opacity:.5}to{opacity:1}}.animated{animation:blink .5s infinite alternate}:host{display:inline-block;min-width:4rem}`))]}static get properties(){return i(i({},super.properties),{},{variant:{type:String}})}render(){const e="error"===this.variant?"bg-error-10":"bg-contrast-10",t=null===this.variant?"animated":"";return n(N||(N=z` <div class="relative"> <span class="opacity-0"><slot></slot></span> <div class="${0} ${0} rounded my-xs absolute inset-0"></div> </div> `),e,t)}}let K,G,W,U=e=>e;class Y extends b{constructor(){super(...arguments),this.key=""}static get scopedElements(){return{"x-skeleton":F}}static get properties(){return i(i({},super.properties),{},{key:{type:String,reflect:!0},opts:{type:Object}})}static get styles(){return[super.styles,t(K||(K=U`:host{display:inline-block}`))]}get whenReady(){return this._whenI18nReady.then((()=>this.updateComplete))}render(){return this._isI18nReady?n(G||(G=U`${0}<slot></slot>`),this._t(this.key,this.opts)):n(W||(W=U`<x-skeleton class="block">${0}<slot></slot></x-skeleton>`),this.key)}}function J(...e){return e.filter((e=>!!e))}let Z,X,ee,te,se=e=>e;class ie extends b{constructor(){super(...arguments),this.disabled=!1,this.value=[]}static get scopedElements(){return{"x-i18n":Y}}static get properties(){return i(i({},super.properties),{},{disabled:{type:Boolean},value:{type:Array}})}render(){const e=ie._allDays.map((e=>{try{return e.toLocaleString(this.lang,{minimumIntegerDigits:2})}catch(t){return e.toString()}}));return n(Z||(Z=se` <div class="space-y-s"> <div class="flex flex-wrap -mx-xs -mb-xs" style="max-width:364px;font-feature-settings:'tnum' 1"> ${0} </div> ${0} </div> `),ie._allDays.map(((t,s)=>n(X||(X=se` <label class="${0}"> ${0} <input type="checkbox" class="sr-only" ?disabled="${0}" ?checked="${0}" @change="${0}"> </label> `),this._getLabelClass(t),e[s],this.disabled,this.value.includes(t),(e=>this._handleChange(e,t))))),J(this.value.length>0&&n(ee||(ee=se` <p class="text-s text-tertiary leading-s"> <x-i18n key="monthday-picker.hint" .opts="${0}" .lang="${0}"> </x-i18n> ${0} </p> `),{days:this.value},this.lang,J([29,30,31].some((e=>this.value.includes(e)))&&n(te||(te=se`<x-i18n key="monthday-picker.warning" .lang="${0}"></x-i18n>`),this.lang)))))}_getLabelClass(e){let t="flex items-center justify-center m-xs p-s rounded text-m font-medium transition duration-200 sm-p-0 sm-h-m sm-w-l ";return this.value.includes(e)||(t+="bg-contrast-5 "),this._isI18nReady&&!this.disabled?(t+="cursor-pointer ",t+=this.value.includes(e)?"text-base ":"hover-bg-primary-10 ",e<29?(t+="focus-within-shadow-outline ",t+=this.value.includes(e)?"bg-primary":"text-body"):(t+="focus-within-shadow-outline-error ",t+=this.value.includes(e)?"bg-error":"text-error")):(t+="text-transparent ",this.value.includes(e)&&(t+=e<29?"bg-primary-50":"bg-error-10")),t}_handleChange(e,t){e.stopPropagation(),this._toggle(t),this._sendChange()}_sendChange(){this.dispatchEvent(new w(this.value))}_toggle(e){const t=this.value.indexOf(e);this.value=-1===t?[...this.value,e]:this.value.filter(((e,s)=>s!==t))}}ie._allDays=Array.from(new Array(31),((e,t)=>t+1));const ne=document.createElement("template");function re(e,t,s="long"){const i=new Date;for(;i.getDay()!==e;)i.setDate(i.getDate()+1);return i.toLocaleDateString(t,{weekday:s})}ne.innerHTML='<dom-module id="lumo-badge">\n <template>\n <style>\n [theme~="badge"] {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n padding: 0.4em calc(0.5em + var(--lumo-border-radius-s) / 4);\n color: var(--lumo-primary-text-color);\n background-color: var(--lumo-primary-color-10pct);\n border-radius: var(--lumo-border-radius-s);\n font-family: var(--lumo-font-family);\n font-size: var(--lumo-font-size-s);\n line-height: 1;\n font-weight: 500;\n text-transform: initial;\n letter-spacing: initial;\n min-width: calc(var(--lumo-line-height-xs) * 1em + 0.45em);\n }\n\n /* Ensure proper vertical alignment */\n [theme~="badge"]::before {\n display: inline-block;\n content: "\\2003";\n width: 0;\n }\n\n [theme~="badge"][theme~="small"] {\n font-size: var(--lumo-font-size-xxs);\n line-height: 1;\n }\n\n /* Colors */\n\n [theme~="badge"][theme~="success"] {\n color: var(--lumo-success-text-color);\n background-color: var(--lumo-success-color-10pct);\n }\n\n [theme~="badge"][theme~="error"] {\n color: var(--lumo-error-text-color);\n background-color: var(--lumo-error-color-10pct);\n }\n\n [theme~="badge"][theme~="contrast"] {\n color: var(--lumo-contrast-80pct);\n background-color: var(--lumo-contrast-5pct);\n }\n\n /* Primary */\n\n [theme~="badge"][theme~="primary"] {\n color: var(--lumo-primary-contrast-color);\n background-color: var(--lumo-primary-color);\n }\n\n [theme~="badge"][theme~="success"][theme~="primary"] {\n color: var(--lumo-success-contrast-color);\n background-color: var(--lumo-success-color);\n }\n\n [theme~="badge"][theme~="error"][theme~="primary"] {\n color: var(--lumo-error-contrast-color);\n background-color: var(--lumo-error-color);\n }\n\n [theme~="badge"][theme~="contrast"][theme~="primary"] {\n color: var(--lumo-base-color);\n background-color: var(--lumo-contrast);\n }\n\n /* Links */\n\n [theme~="badge"][href]:hover {\n text-decoration: none;\n }\n\n /* Icon */\n\n [theme~="badge"] iron-icon {\n margin: -0.25em 0;\n --iron-icon-width: 1.5em;\n --iron-icon-height: 1.5em;\n }\n\n [theme~="badge"] iron-icon:first-child {\n margin-left: -0.375em;\n }\n\n [theme~="badge"] iron-icon:last-child {\n margin-right: -0.375em;\n }\n\n [theme~="badge"][icon] {\n min-width: 0;\n padding: 0;\n font-size: 1rem;\n --iron-icon-width: var(--lumo-icon-size-m);\n --iron-icon-height: var(--lumo-icon-size-m);\n }\n\n [theme~="badge"][icon][theme~="small"] {\n --iron-icon-width: var(--lumo-icon-size-s);\n --iron-icon-height: var(--lumo-icon-size-s);\n }\n\n /* Empty */\n\n [theme~="badge"]:not([icon]):empty {\n min-width: 0;\n width: 1em;\n height: 1em;\n padding: 0;\n border-radius: 50%;\n background-color: var(--lumo-primary-color);\n }\n\n [theme~="badge"][theme~="small"]:not([icon]):empty {\n width: 0.75em;\n height: 0.75em;\n }\n\n [theme~="badge"][theme~="contrast"]:not([icon]):empty {\n background-color: var(--lumo-contrast);\n }\n\n [theme~="badge"][theme~="success"]:not([icon]):empty {\n background-color: var(--lumo-success-color);\n }\n\n [theme~="badge"][theme~="error"]:not([icon]):empty {\n background-color: var(--lumo-error-color);\n }\n\n /* Pill */\n\n [theme~="badge"][theme~="pill"] {\n --lumo-border-radius-s: 1em;\n }\n\n /* RTL specific styles */\n\n [dir="rtl"][theme~="badge"] iron-icon:first-child {\n margin-right: -0.375em;\n margin-left: 0;\n }\n\n [dir="rtl"][theme~="badge"] iron-icon:last-child {\n margin-left: -0.375em;\n margin-right: 0;\n }\n </style>\n </template>\n</dom-module>',document.head.appendChild(ne.content);let oe,le,ae,de=e=>e;class Ae extends ie{render(){return n(oe||(oe=de` <div class="space-y-s"> <div class="flex flex-wrap -mx-xs -mb-xs text-m uppercase"> ${0} </div> ${0} </div> `),Ae._allDays.map((e=>n(le||(le=de` <label class="${0}"> ${0} <input type="checkbox" class="sr-only" ?disabled="${0}" ?checked="${0}" @change="${0}"> </label> `),this._getLabelClass(e),re(e,this.lang,"short"),this.disabled||!this._isI18nReady,this.value.includes(e),(t=>this._handleChange(t,e))))),J(this.value.length>0&&n(ae||(ae=de` <p class="text-s text-tertiary leading-s"> <x-i18n key="weekday-picker.hint" .lang="${0}" .opts="${0}"> </x-i18n> </p> `),this.lang,{days:this.value})))}_getLabelClass(e){let t="flex items-center justify-center m-xs h-m w-xl rounded font-medium transition duration-200 ";return this._isI18nReady&&!this.disabled?(t+="cursor-pointer focus-within-shadow-outline ",t+=this.value.includes(e)?"text-base bg-primary":"bg-contrast-5 hover-bg-contrast-10 text-body"):(t+="text-transparent ",t+=this.value.includes(e)?"bg-primary-50":"bg-contrast-5"),t}_sendChange(){this.dispatchEvent(new x(this.value))}}Ae._allDays=new Array(7).fill(0).map(((e,t)=>t));export{j as D,Y as I,ie as M,F as S,Ae as W,Q as a,J as c,$ as r,re as t};
314
+ `)));class j extends s{constructor(){super(),this.disabled=!1,this.label="",this.value=null,this.items=null,this.getText=e=>e,this.__unexistentValue=`@foxy.io/elements#dropdown-${Math.random().toFixed(16).substr(2)}`,this.__renderedItems={},this.__list=document.createElement("vaadin-list-box")}static get properties(){return i(i({},super.properties),{},{disabled:{type:Boolean},getText:{type:Object,attribute:!1},items:{type:Array},label:{type:String},value:{type:String}})}static get styles(){return f.styles}render(){return n(P||(P=H` <vaadin-select class="w-full ${0}" data-testid="select" .label="${0}" .value="${0}" .disabled="${0}" .renderer="${0}" @change="${0}"> </vaadin-select> `),this.label?"-mt-m":"",this.label,null===this.value?this.__unexistentValue:this.value,this.disabled,this.__renderItems.bind(this),this.__handleChange)}__renderItems(e){var t;let s=e.querySelector("vaadin-list-box");null===s&&(e.appendChild(this.__list),s=this.__list);for(const e of Object.values(this.__renderedItems))e.dataset.keep="";const i=null!==(t=this.items)&&void 0!==t?t:[];for(let e=0;e<i.length;++e)if("string"==typeof i[e])this.__addOrKeepItem(i[e],i[e],s).classList.add("dropdown-item");else if(Array.isArray(i[e])){const t=this.__addOrKeepItem(i[e][0],i[e][0],s);t.classList.add("dropdown-item","dropdown-divisor"),t.disabled=!0;for(const t of i[e][1])this.__addOrKeepItem(i[e][0]+": "+t,t,s).classList.add("dropdown-sub-item")}for(const e of Object.values(this.__renderedItems)){const t=e;t.dataset.keep||(e.remove(),delete this.__renderedItems[t.dataset.trackId])}}__addOrKeepItem(e,t,s){let i;return this.__renderedItems[e]?i=this.__renderedItems[e]:(i=document.createElement("vaadin-item"),this.__renderedItems[e]=i,i.value=e,s.appendChild(i)),i.dataset.keep="true",i.dataset.trackId=e,i.textContent=this.getText(t),i}__handleChange(e){const t=e.target.value,s=t===this.__unexistentValue?null:t;this.dispatchEvent(new _(s))}}let V,N,z=e=>e;class K extends s{constructor(){super(...arguments),this.variant=null}static get styles(){return[f.styles,t(V||(V=z`@keyframes blink{from{opacity:.5}to{opacity:1}}.animated{animation:blink .5s infinite alternate}:host{display:inline-block;min-width:4rem}`))]}static get properties(){return i(i({},super.properties),{},{variant:{type:String}})}render(){const e="error"===this.variant?"bg-error-10":"bg-contrast-10",t=null===this.variant?"animated":"";return n(N||(N=z` <div class="relative"> <span class="opacity-0"><slot></slot></span> <div class="${0} ${0} rounded my-xs absolute inset-0"></div> </div> `),e,t)}}let F,G,W,U=e=>e;class Y extends b{constructor(){super(...arguments),this.key=""}static get scopedElements(){return{"x-skeleton":K}}static get properties(){return i(i({},super.properties),{},{key:{type:String,reflect:!0},opts:{type:Object}})}static get styles(){return[super.styles,t(F||(F=U`:host{display:inline-block}`))]}get whenReady(){return this._whenI18nReady.then((()=>this.updateComplete))}render(){return this._isI18nReady?n(G||(G=U`${0}<slot></slot>`),this._t(this.key,this.opts)):n(W||(W=U`<x-skeleton class="block">${0}<slot></slot></x-skeleton>`),this.key)}}function J(...e){return e.filter((e=>!!e))}let Z,X,ee,te,se=e=>e;class ie extends b{constructor(){super(...arguments),this.disabled=!1,this.value=[]}static get scopedElements(){return{"x-i18n":Y}}static get properties(){return i(i({},super.properties),{},{disabled:{type:Boolean},value:{type:Array}})}render(){const e=ie._allDays.map((e=>{try{return e.toLocaleString(this.lang,{minimumIntegerDigits:2})}catch(t){return e.toString()}}));return n(Z||(Z=se` <div class="space-y-s"> <div class="flex flex-wrap -mx-xs -mb-xs" style="max-width:364px;font-feature-settings:'tnum' 1"> ${0} </div> ${0} </div> `),ie._allDays.map(((t,s)=>n(X||(X=se` <label class="${0}"> ${0} <input type="checkbox" class="sr-only" ?disabled="${0}" ?checked="${0}" @change="${0}"> </label> `),this._getLabelClass(t),e[s],this.disabled,this.value.includes(t),(e=>this._handleChange(e,t))))),J(this.value.length>0&&n(ee||(ee=se` <p class="text-s text-tertiary leading-s"> <x-i18n key="monthday-picker.hint" .opts="${0}" .lang="${0}"> </x-i18n> ${0} </p> `),{days:this.value},this.lang,J([29,30,31].some((e=>this.value.includes(e)))&&n(te||(te=se`<x-i18n key="monthday-picker.warning" .lang="${0}"></x-i18n>`),this.lang)))))}_getLabelClass(e){let t="flex items-center justify-center m-xs p-s rounded text-m font-medium transition duration-200 sm-p-0 sm-h-m sm-w-l ";return this.value.includes(e)||(t+="bg-contrast-5 "),this._isI18nReady&&!this.disabled?(t+="cursor-pointer ",t+=this.value.includes(e)?"text-base ":"hover-bg-primary-10 ",e<29?(t+="focus-within-shadow-outline ",t+=this.value.includes(e)?"bg-primary":"text-body"):(t+="focus-within-shadow-outline-error ",t+=this.value.includes(e)?"bg-error":"text-error")):(t+="text-transparent ",this.value.includes(e)&&(t+=e<29?"bg-primary-50":"bg-error-10")),t}_handleChange(e,t){e.stopPropagation(),this._toggle(t),this._sendChange()}_sendChange(){this.dispatchEvent(new w(this.value))}_toggle(e){const t=this.value.indexOf(e);this.value=-1===t?[...this.value,e]:this.value.filter(((e,s)=>s!==t))}}ie._allDays=Array.from(new Array(31),((e,t)=>t+1));const ne=document.createElement("template");function re(e,t,s="long"){const i=new Date;for(;i.getDay()!==e;)i.setDate(i.getDate()+1);return i.toLocaleDateString(t,{weekday:s})}ne.innerHTML='<dom-module id="lumo-badge">\n <template>\n <style>\n [theme~="badge"] {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n padding: 0.4em calc(0.5em + var(--lumo-border-radius-s) / 4);\n color: var(--lumo-primary-text-color);\n background-color: var(--lumo-primary-color-10pct);\n border-radius: var(--lumo-border-radius-s);\n font-family: var(--lumo-font-family);\n font-size: var(--lumo-font-size-s);\n line-height: 1;\n font-weight: 500;\n text-transform: initial;\n letter-spacing: initial;\n min-width: calc(var(--lumo-line-height-xs) * 1em + 0.45em);\n }\n\n /* Ensure proper vertical alignment */\n [theme~="badge"]::before {\n display: inline-block;\n content: "\\2003";\n width: 0;\n }\n\n [theme~="badge"][theme~="small"] {\n font-size: var(--lumo-font-size-xxs);\n line-height: 1;\n }\n\n /* Colors */\n\n [theme~="badge"][theme~="success"] {\n color: var(--lumo-success-text-color);\n background-color: var(--lumo-success-color-10pct);\n }\n\n [theme~="badge"][theme~="error"] {\n color: var(--lumo-error-text-color);\n background-color: var(--lumo-error-color-10pct);\n }\n\n [theme~="badge"][theme~="contrast"] {\n color: var(--lumo-contrast-80pct);\n background-color: var(--lumo-contrast-5pct);\n }\n\n /* Primary */\n\n [theme~="badge"][theme~="primary"] {\n color: var(--lumo-primary-contrast-color);\n background-color: var(--lumo-primary-color);\n }\n\n [theme~="badge"][theme~="success"][theme~="primary"] {\n color: var(--lumo-success-contrast-color);\n background-color: var(--lumo-success-color);\n }\n\n [theme~="badge"][theme~="error"][theme~="primary"] {\n color: var(--lumo-error-contrast-color);\n background-color: var(--lumo-error-color);\n }\n\n [theme~="badge"][theme~="contrast"][theme~="primary"] {\n color: var(--lumo-base-color);\n background-color: var(--lumo-contrast);\n }\n\n /* Links */\n\n [theme~="badge"][href]:hover {\n text-decoration: none;\n }\n\n /* Icon */\n\n [theme~="badge"] iron-icon {\n margin: -0.25em 0;\n --iron-icon-width: 1.5em;\n --iron-icon-height: 1.5em;\n }\n\n [theme~="badge"] iron-icon:first-child {\n margin-left: -0.375em;\n }\n\n [theme~="badge"] iron-icon:last-child {\n margin-right: -0.375em;\n }\n\n [theme~="badge"][icon] {\n min-width: 0;\n padding: 0;\n font-size: 1rem;\n --iron-icon-width: var(--lumo-icon-size-m);\n --iron-icon-height: var(--lumo-icon-size-m);\n }\n\n [theme~="badge"][icon][theme~="small"] {\n --iron-icon-width: var(--lumo-icon-size-s);\n --iron-icon-height: var(--lumo-icon-size-s);\n }\n\n /* Empty */\n\n [theme~="badge"]:not([icon]):empty {\n min-width: 0;\n width: 1em;\n height: 1em;\n padding: 0;\n border-radius: 50%;\n background-color: var(--lumo-primary-color);\n }\n\n [theme~="badge"][theme~="small"]:not([icon]):empty {\n width: 0.75em;\n height: 0.75em;\n }\n\n [theme~="badge"][theme~="contrast"]:not([icon]):empty {\n background-color: var(--lumo-contrast);\n }\n\n [theme~="badge"][theme~="success"]:not([icon]):empty {\n background-color: var(--lumo-success-color);\n }\n\n [theme~="badge"][theme~="error"]:not([icon]):empty {\n background-color: var(--lumo-error-color);\n }\n\n /* Pill */\n\n [theme~="badge"][theme~="pill"] {\n --lumo-border-radius-s: 1em;\n }\n\n /* RTL specific styles */\n\n [dir="rtl"][theme~="badge"] iron-icon:first-child {\n margin-right: -0.375em;\n margin-left: 0;\n }\n\n [dir="rtl"][theme~="badge"] iron-icon:last-child {\n margin-left: -0.375em;\n margin-right: 0;\n }\n </style>\n </template>\n</dom-module>',document.head.appendChild(ne.content);let oe,le,ae,de=e=>e;class Ae extends ie{render(){return n(oe||(oe=de` <div class="space-y-s"> <div class="flex flex-wrap -mx-xs -mb-xs text-m uppercase"> ${0} </div> ${0} </div> `),Ae._allDays.map((e=>n(le||(le=de` <label class="${0}"> ${0} <input type="checkbox" class="sr-only" ?disabled="${0}" ?checked="${0}" @change="${0}"> </label> `),this._getLabelClass(e),re(e,this.lang,"short"),this.disabled||!this._isI18nReady,this.value.includes(e),(t=>this._handleChange(t,e))))),J(this.value.length>0&&n(ae||(ae=de` <p class="text-s text-tertiary leading-s"> <x-i18n key="weekday-picker.hint" .lang="${0}" .opts="${0}"> </x-i18n> </p> `),this.lang,{days:this.value})))}_getLabelClass(e){let t="flex items-center justify-center m-xs h-m w-xl rounded font-medium transition duration-200 ";return this._isI18nReady&&!this.disabled?(t+="cursor-pointer focus-within-shadow-outline ",t+=this.value.includes(e)?"text-base bg-primary":"bg-contrast-5 hover-bg-contrast-10 text-body"):(t+="text-transparent ",t+=this.value.includes(e)?"bg-primary-50":"bg-contrast-5"),t}_sendChange(){this.dispatchEvent(new x(this.value))}}Ae._allDays=new Array(7).fill(0).map(((e,t)=>t));export{j as D,Y as I,ie as M,K as S,Ae as W,Q as a,J as c,$ as r,re as t};
@@ -1 +1 @@
1
- import{L as e,_ as t}from"./shared-63eaded9.js";import{t as s,m as r,a as i,b as n,R as h,F as o}from"./shared-1761daef.js";import{A as a}from"./shared-00563cb0.js";import{U as _}from"./shared-7684cb05.js";import{i as u}from"./shared-a46edf4b.js";function d(e,t){let r=null;return s(t).forEach((function(){var t,s,i,n,h,o,a,_,u,d,c;if(null===(i=null===(s=null===(t=this.node)||void 0===t?void 0:t._links)||void 0===s?void 0:s.self)||void 0===i?void 0:i.href){const t=null===(o=null===(h=null===(n=this.node)||void 0===n?void 0:n._links)||void 0===h?void 0:h.self)||void 0===o?void 0:o.href,s=new URL(null===(u=null===(_=null===(a=this.node)||void 0===a?void 0:a._links)||void 0===_?void 0:_.self)||void 0===u?void 0:u.href);if(s.searchParams.delete("zoom"),e===t||e===s.toString())return r=JSON.stringify(this.node),void this.stop()}Object.entries(null!==(c=null===(d=this.node)||void 0===d?void 0:d._links)&&void 0!==c?c:{}).some((([t,s])=>{var i,n;if(s.href!==e)return!1;const h=null===(n=null===(i=this.node)||void 0===i?void 0:i._embedded)||void 0===n?void 0:n[t];if(!h||!Array.isArray(h))return!1;const o=h.length<20?h.length:21,a=new URL(e),_=new URL(e);return a.searchParams.set("offset",h.length.toString()),_.searchParams.set("offset",o.toString()),r=JSON.stringify({returned_items:h.length,total_items:o,offset:0,limit:20,_embedded:{[t]:h},_links:{curies:this.node._links.curies,first:{href:e},last:{href:_.toString()},prev:{href:e},next:{href:a.toString()},self:{href:e}}}),this.stop(),!0}))})),new Response(r,{status:r?200:404})}class c extends e{constructor(){super(...arguments),this.lang="",this.parent="",this.related=[],this.__href="",this.__group="",this.__fetchEventQueue=[],this.__service=u(i.withConfig({services:{sendDelete:()=>this._sendDelete(),sendPatch:({edits:e})=>this._sendPatch(e),sendPost:({edits:e})=>this._sendPost(e),sendGet:()=>this._sendGet()},actions:{validate:n({errors:e=>{const s=this.constructor.v8n,r=t(t({},e.data),e.edits);return s.map((e=>e(r))).filter((e=>"string"==typeof e)).filter(((e,t,s)=>s.indexOf(e)===t))}})}}))}static get properties(){return{related:{type:Array},parent:{type:String},group:{type:String,noAccessor:!0},href:{type:String,noAccessor:!0},lang:{type:String}}}static get v8n(){return[]}get failure(){return this.__service.state.context.failure}get errors(){return this.__service.state.context.errors}get form(){const{data:e,edits:s}=this.__service.state.context;return t(t({},e),s)}get data(){return this.__service.state.context.data}set data(e){var t;this.__service.send({type:"SET_DATA",data:e}),this.__href=null!==(t=null==e?void 0:e._links.self.href)&&void 0!==t?t:""}get group(){return this.__group}set group(e){this.__group=e,this.__destroyRumour(),this.__createRumour()}get href(){return this.__href}set href(e){this.__href=e,e?this.__service.send({type:"FETCH"}):this.__service.send({type:"SET_DATA",data:null})}in(e){return this.__service.state.matches(e)}undo(){this.__service.send({type:"UNDO"})}edit(e){this.__service.send({type:"EDIT",data:e})}submit(){this.__service.send({type:"SUBMIT"})}delete(){this.__service.send({type:"DELETE"})}refresh(){this.__service.send({type:"REFRESH"})}connectedCallback(){super.connectedCallback(),this.__createService(),this.__createRumour(),this.__createServer(),this.__processFetchEventQueue()}disconnectedCallback(){super.disconnectedCallback(),this.__destroyService(),this.__destroyRumour(),this.__destroyServer(),this.__flushFetchEventQueue("parent element was disconnected")}async _fetch(...e){const t=await new a(this).fetch(...e);if(!t.ok)throw t;return t.json()}async _sendPost(e){const t=JSON.stringify(e),s=await this._fetch(this.parent,{body:t,method:"POST"}),r=c.Rumour(this.group),i=[...this.related,this.parent];return this.__destroyRumour(),r.share({data:s,related:i,source:s._links.self.href}),this.__createRumour(),s}async _sendGet(){const e=await this._fetch(this.href),t=c.Rumour(this.group);return this.__destroyRumour(),t.share({data:e,source:this.href}),this.__createRumour(),e}async _sendPatch(e){const t=JSON.stringify(e),s=await this._fetch(this.href,{body:t,method:"PATCH"}),r=c.Rumour(this.group);return this.__destroyRumour(),r.share({data:s,source:this.href,related:this.related}),this.__createRumour(),s}async _sendDelete(){const e=await this._fetch(this.href,{method:"DELETE"}),t=c.Rumour(this.group),s=[...this.related,this.parent];return this.__destroyRumour(),t.share({data:null,source:this.href,related:s}),this.__createRumour(),e}__createService(){this.__service.onTransition((e=>{if(!e.changed)return;const t=e.toStrings().reduce(((e,t)=>[...e,...t.split(".")]),[]);this.setAttribute("state",[...new Set(t)].join(" ")),this.requestUpdate(),this.dispatchEvent(new _),e.matches("busy")||this.__processFetchEventQueue()})),this.__service.onChange((()=>{this.requestUpdate(),this.dispatchEvent(new _)})),this.__service.start()}__destroyService(){this.__service.stop()}__createRumour(){const e=c.Rumour(this.group);this.__unsubscribeFromRumour=e.track((e=>this.__handleRumourUpdate(e)))}__destroyRumour(){var e;null===(e=this.__unsubscribeFromRumour)||void 0===e||e.call(this)}__createServer(){this.__fetchEventHandler=this.__handleFetchEvent.bind(this),this.addEventListener("fetch",this.__fetchEventHandler)}__destroyServer(){this.removeEventListener("fetch",this.__fetchEventHandler)}__handleRumourUpdate(e){var t;try{const s=null===(t=this.__service.state)||void 0===t?void 0:t.context.data;if(!s)return;const r=e(s);r!==s&&this.__service.send({data:r,type:"SET_DATA"})}catch(e){if(!(e instanceof h.UpdateError))throw e;this.__service.send({type:"REFRESH"})}}__processFetchEventQueue(){const e=new c.API(this);this.__fetchEventQueue.forEach((t=>{const s=t.request,r=d(s.url,this.data),i=r.ok?r:e.fetch(s);t.respondWith(Promise.resolve(i)),r.ok&&console.debug(`%c@foxy.io/elements::${this.localName}\n%c200%c GET ${s.url}`,"color: gray","background: gray; padding: 0 .2em; border-radius: .2em; color: white;","")})),this.__fetchEventQueue=[]}__flushFetchEventQueue(e){this.__fetchEventQueue.forEach((t=>{t.respondWith(Promise.reject(new Error(e)))})),this.__fetchEventQueue=[]}__handleFetchEvent(e){e instanceof o&&(e.defaultPrevented||"GET"===e.request.method&&(e.request.url.startsWith("foxy://")||e.composedPath()[0]!==this&&(e.preventDefault(),this.__fetchEventQueue.push(e),this.in("busy")||this.__processFetchEventQueue())))}}c.UpdateEvent=_,c.Rumour=r((()=>new h)),c.API=a;export{c as N,d as s};
1
+ import{L as e,_ as t}from"./shared-63eaded9.js";import{t as s,m as r,a as i,b as n,R as h,F as o}from"./shared-5535f38f.js";import{A as a}from"./shared-7f0a9790.js";import{U as _}from"./shared-7684cb05.js";import{i as u}from"./shared-756034e4.js";function d(e,t){let r=null;return s(t).forEach((function(){var t,s,i,n,h,o,a,_,u,d,c;if(null===(i=null===(s=null===(t=this.node)||void 0===t?void 0:t._links)||void 0===s?void 0:s.self)||void 0===i?void 0:i.href){const t=null===(o=null===(h=null===(n=this.node)||void 0===n?void 0:n._links)||void 0===h?void 0:h.self)||void 0===o?void 0:o.href,s=new URL(null===(u=null===(_=null===(a=this.node)||void 0===a?void 0:a._links)||void 0===_?void 0:_.self)||void 0===u?void 0:u.href);if(s.searchParams.delete("zoom"),e===t||e===s.toString())return r=JSON.stringify(this.node),void this.stop()}Object.entries(null!==(c=null===(d=this.node)||void 0===d?void 0:d._links)&&void 0!==c?c:{}).some((([t,s])=>{var i,n;if(s.href!==e)return!1;const h=null===(n=null===(i=this.node)||void 0===i?void 0:i._embedded)||void 0===n?void 0:n[t];if(!h||!Array.isArray(h))return!1;const o=h.length<20?h.length:21,a=new URL(e),_=new URL(e);return a.searchParams.set("offset",h.length.toString()),_.searchParams.set("offset",o.toString()),r=JSON.stringify({returned_items:h.length,total_items:o,offset:0,limit:20,_embedded:{[t]:h},_links:{curies:this.node._links.curies,first:{href:e},last:{href:_.toString()},prev:{href:e},next:{href:a.toString()},self:{href:e}}}),this.stop(),!0}))})),new Response(r,{status:r?200:404})}class c extends e{constructor(){super(...arguments),this.lang="",this.parent="",this.related=[],this.__href="",this.__group="",this.__fetchEventQueue=[],this.__service=u(i.withConfig({services:{sendDelete:()=>this._sendDelete(),sendPatch:({edits:e})=>this._sendPatch(e),sendPost:({edits:e})=>this._sendPost(e),sendGet:()=>this._sendGet()},actions:{validate:n({errors:e=>{const s=this.constructor.v8n,r=t(t({},e.data),e.edits);return s.map((e=>e(r))).filter((e=>"string"==typeof e)).filter(((e,t,s)=>s.indexOf(e)===t))}})}}))}static get properties(){return{related:{type:Array},parent:{type:String},group:{type:String,noAccessor:!0},href:{type:String,noAccessor:!0},lang:{type:String}}}static get v8n(){return[]}get failure(){return this.__service.state.context.failure}get errors(){return this.__service.state.context.errors}get form(){const{data:e,edits:s}=this.__service.state.context;return t(t({},e),s)}get data(){return this.__service.state.context.data}set data(e){var t;this.__service.send({type:"SET_DATA",data:e}),this.__href=null!==(t=null==e?void 0:e._links.self.href)&&void 0!==t?t:""}get group(){return this.__group}set group(e){this.__group=e,this.__destroyRumour(),this.__createRumour()}get href(){return this.__href}set href(e){this.__href=e,e?this.__service.send({type:"FETCH"}):this.__service.send({type:"SET_DATA",data:null})}in(e){return this.__service.state.matches(e)}undo(){this.__service.send({type:"UNDO"})}edit(e){this.__service.send({type:"EDIT",data:e})}submit(){this.__service.send({type:"SUBMIT"})}delete(){this.__service.send({type:"DELETE"})}refresh(){this.__service.send({type:"REFRESH"})}connectedCallback(){super.connectedCallback(),this.__createService(),this.__createRumour(),this.__createServer(),this.__processFetchEventQueue()}disconnectedCallback(){super.disconnectedCallback(),this.__destroyService(),this.__destroyRumour(),this.__destroyServer(),this.__flushFetchEventQueue("parent element was disconnected")}async _fetch(...e){const t=await new a(this).fetch(...e);if(!t.ok)throw t;return t.json()}async _sendPost(e){this.__destroyRumour();const t=JSON.stringify(e),s=await this._fetch(this.parent,{body:t,method:"POST"}),r=c.Rumour(this.group),i=[...this.related,this.parent];return r.share({data:s,related:i,source:s._links.self.href}),this.__createRumour(),s}async _sendGet(){this.__destroyRumour();const e=await this._fetch(this.href);return c.Rumour(this.group).share({data:e,source:this.href}),this.__createRumour(),e}async _sendPatch(e){this.__destroyRumour();const t=JSON.stringify(e),s=await this._fetch(this.href,{body:t,method:"PATCH"});return c.Rumour(this.group).share({data:s,source:this.href,related:this.related}),this.__createRumour(),s}async _sendDelete(){this.__destroyRumour();const e=await this._fetch(this.href,{method:"DELETE"}),t=c.Rumour(this.group),s=[...this.related,this.parent];return t.share({data:null,source:this.href,related:s}),this.__createRumour(),e}__createService(){this.__service.onTransition((e=>{if(!e.changed)return;const t=e.toStrings().reduce(((e,t)=>[...e,...t.split(".")]),[]);this.setAttribute("state",[...new Set(t)].join(" ")),this.requestUpdate(),this.dispatchEvent(new _),e.matches("busy")||this.__processFetchEventQueue()})),this.__service.onChange((()=>{this.requestUpdate(),this.dispatchEvent(new _)})),this.__service.start()}__destroyService(){this.__service.stop()}__createRumour(){const e=c.Rumour(this.group);this.__unsubscribeFromRumour=e.track((e=>this.__handleRumourUpdate(e)))}__destroyRumour(){var e;null===(e=this.__unsubscribeFromRumour)||void 0===e||e.call(this)}__createServer(){this.__fetchEventHandler=this.__handleFetchEvent.bind(this),this.addEventListener("fetch",this.__fetchEventHandler)}__destroyServer(){this.removeEventListener("fetch",this.__fetchEventHandler)}__handleRumourUpdate(e){var t;try{const s=null===(t=this.__service.state)||void 0===t?void 0:t.context.data;if(!s)return;const r=e(s);r!==s&&this.__service.send({data:r,type:"SET_DATA"})}catch(e){if(!(e instanceof h.UpdateError))throw e;this.__service.send({type:"REFRESH"})}}__processFetchEventQueue(){const e=new c.API(this);this.__fetchEventQueue.forEach((t=>{const s=t.request,r=d(s.url,this.data),i=r.ok?r:e.fetch(s);t.respondWith(Promise.resolve(i)),r.ok&&console.debug(`%c@foxy.io/elements::${this.localName}\n%c200%c GET ${s.url}`,"color: gray","background: gray; padding: 0 .2em; border-radius: .2em; color: white;","")})),this.__fetchEventQueue=[]}__flushFetchEventQueue(e){this.__fetchEventQueue.forEach((t=>{t.respondWith(Promise.reject(new Error(e)))})),this.__fetchEventQueue=[]}__handleFetchEvent(e){e instanceof o&&(e.defaultPrevented||"GET"===e.request.method&&(e.request.url.startsWith("foxy://")||e.composedPath()[0]!==this&&(e.preventDefault(),this.__fetchEventQueue.push(e),this.in("busy")||this.__processFetchEventQueue())))}}c.UpdateEvent=_,c.Rumour=r((()=>new h)),c.API=a;export{c as N,d as s};
@@ -0,0 +1 @@
1
+ import{L as e,j as t,_ as s,h as i}from"./shared-63eaded9.js";import{A as a}from"./shared-7f0a9790.js";import{C as o}from"./shared-df730f90.js";import{T as n,R as l,a as d}from"./shared-ae8cd227.js";import{F as r}from"./shared-5535f38f.js";import{c as h}from"./shared-4e709717.js";class c extends CustomEvent{constructor(e=!1){super("hide",{detail:{cancelled:e}})}}class u extends CustomEvent{constructor(){super("show")}}let p,m=e=>e;class v extends(n(l(e))){static get styles(){return[super.styles,t(p||(p=m`:host{position:relative;z-index:200}`))]}}let b,_,y,g,f,w,x,$=e=>e;class D extends(d(o(n(e)))){constructor(){super(...arguments),this.closable=!1,this.editable=!1,this.header="",this.alert=!1,this.__handleKeyDown=e=>{"Escape"===e.key&&D.openDialogs[0]===this&&this.closable&&this.hide(this.editable)},this.__connected=!1,this.__visible=!1}static get properties(){return s(s({},super.properties),{},{__connected:{attribute:!1},__visible:{attribute:!1},centered:{type:Boolean},closable:{type:Boolean},editable:{type:Boolean},header:{type:String},alert:{type:Boolean},open:{type:Boolean,noAccessor:!0}})}static get styles(){return[super.styles,t(b||(b=$`.grid-cols-header{grid-template-columns:1fr auto 1fr}.scale-85{--tw-scale-x:0.85;--tw-scale-y:0.85}`))]}get open(){return this.__visible&&this.__connected}set open(e){e===this.open||(e?this.show():this.hide(this.editable))}connectedCallback(){super.connectedCallback(),addEventListener("keydown",this.__handleKeyDown)}disconnectedCallback(){var e;super.disconnectedCallback(),removeEventListener("keydown",this.__handleKeyDown),null===(e=D.dialogWindows.get(this))||void 0===e||e.remove(),D.dialogWindows.delete(this)}createRenderRoot(){const e=new v,t=document.querySelectorAll(D.dialogWindowsHost),s=Array.from(t).pop();return e.addEventListener("fetch",(e=>{e instanceof r&&(e.stopImmediatePropagation(),e.preventDefault(),e.respondWith(new a(this).fetch(e.request)))})),null==s||s.appendChild(e),D.dialogWindows.set(this,e),e.shadowRoot}render(e){if(!this.__connected)return i(_||(_=$``));const t=D.openDialogs[0]===this,s=D.openDialogs[1]===this,a=D.openDialogs[2]===this,o=!t&&!s&&!a;return i(y||(y=$` <div class="${0}"> <div id="backdrop" class="${0}" tabindex="-1" @click="${0}"></div> <div role="dialog" aria-labelledby="dialog-title" class="${0}"> <div class="${0}"> <div class="h-l grid grid-cols-header text-m font-lumo font-medium border-b border-contrast-10"> ${0} <h1 id="dialog-title" class="truncate self-center text-center"> <foxy-i18n ns="${0}" lang="${0}" key="${0}"></foxy-i18n> </h1> ${0} </div> <div class="flex-1 overflow-y-auto overflow-x-hidden overscroll-contain"> <div class="p-m relative">${0}</div> </div> </div> </div> </div> `),h({"z-50 fixed inset-0":!0,"pointer-events-none":!this.__visible}),h({"select-none ease-in-out transition duration-500 absolute inset-0 bg-shade-50 focus-outline-none":!0,"opacity-100":this.__visible,"opacity-0":!this.__visible}),(()=>this.closable&&this.hide(this.editable)),h({"transform origin-bottom ease-in-out transition duration-500 relative h-full ml-auto sm-origin-center sm-max-w-modal":!0,"flex justify-center items-end sm-items-center mr-auto":this.alert,"translate-y-full sm-translate-y-0":!this.__visible,"sm-translate-x-full":!this.alert&&!this.__visible,"sm-opacity-0 sm-scale-110":this.alert&&!this.__visible,"translate-y-0 translate-x-0":t&&this.__visible,"scale-95 -translate-y-s sm-translate-y-0":s&&this.__visible,"scale-90 -translate-y-m sm-translate-y-0":a&&this.__visible,"opacity-0 scale-85 -translate-y-l sm-translate-y-0":o&&this.__visible}),h({"overflow-hidden flex flex-col bg-base rounded-t-l sm-rounded-b-l":!0,"absolute inset-0 mt-xl sm-m-xl":!this.alert,"shadow-xxl":this.__visible}),this.closable&&!this.hiddenSelector.matches("close-button",!0)?i(g||(g=$` <vaadin-button id="close-button" theme="tertiary-inline" class="mr-auto m-s px-s" ?disabled="${0}" @click="${0}"> <foxy-i18n lang="${0}" key="${0}" ns="${0}"> </foxy-i18n> </vaadin-button> `),this.disabledSelector.matches("close-button",!0),(()=>this.hide(this.editable)),this.lang,this.editable?"cancel":"close",this.ns):i(f||(f=$`<div></div>`)),this.ns,this.lang,this.header,this.editable&&!this.hiddenSelector.matches("save-button",!0)?i(w||(w=$` <vaadin-button data-testid="save-button" ?disabled="${0}" theme="primary" class="ml-auto h-auto min-h-0 min-w-0 m-xs px-m" @click="${0}"> <foxy-i18n ns="${0}" lang="${0}" key="save"></foxy-i18n> </vaadin-button> `),this.disabledSelector.matches("save-button",!0),this.save,this.ns,this.lang):i(x||(x=$`<div></div>`)),null==e?void 0:e())}async hide(e=!1){var t;null===(t=this.__returnFocusTo)||void 0===t||t.focus(),await this.__setOpenDialogs(D.openDialogs.filter((e=>e!==this))),await this.__setConnected(!1),this.dispatchEvent(new D.HideEvent(!!e))}async show(e){this.__returnFocusTo=e,await this.__setConnected(!0),await this.__setOpenDialogs([this,...D.openDialogs]);const t=this.renderRoot.querySelector("#close-button");null==t||t.focus(),this.dispatchEvent(new D.ShowEvent)}async save(){await this.hide(!1)}async __setOpenDialogs(e){D.openDialogs.length=0,D.openDialogs.push(...e),await Promise.all([Promise.all(D.openDialogs.map((e=>e.requestUpdate()))),new Promise((e=>{this.renderRoot.querySelector("#backdrop").addEventListener("transitionend",e,{once:!0}),this.__visible=D.openDialogs.includes(this)}))])}async __setConnected(e){this.__connected=e,await this.updateComplete.then((()=>this.getBoundingClientRect()))}}D.dialogWindowsHost="#foxy-dialog-windows-host, body",D.dialogWindows=new WeakMap,D.openDialogs=[],D.ShowEvent=u,D.HideEvent=c,customElements.define("foxy-dialog-window",v);export{D};
@@ -0,0 +1 @@
1
+ import{L as e,_ as t,h as s}from"./shared-63eaded9.js";import{C as i}from"./shared-df730f90.js";import{a as r,T as n}from"./shared-ae8cd227.js";import{c as o}from"./shared-4e709717.js";import{l as a}from"./shared-07134f93.js";import{r as l}from"./shared-b710881a.js";let d,c,h,u=e=>e;class m extends(r(i(n(e)))){constructor(){super(...arguments),this.options=[],this.items=[],this.__newItem=""}static get properties(){return t(t({},super.properties),{},{options:{type:Array},items:{type:Array},__newItem:{attribute:!1}})}render(){const e=o({"w-xs h-xs mr-xs rounded-full transition-colors flex-shrink-0":!0,"focus-outline-none focus-ring-2 ring-inset ring-error-50":!0,"text-tertiary hover-bg-error-10 hover-text-error":!this.disabled,"cursor-default text-disabled":this.disabled,"flex items-center justify-center":!this.readonly,hidden:this.readonly}),t=o({"transition-colors h-l ml-m flex items-center":!0,"text-secondary":this.readonly,"text-disabled":this.disabled}),i=this.disabled||!this.__newItem,r=()=>{this.__newItem&&(this.items.push({value:this.__newItem}),this.requestUpdate("items"),this.dispatchEvent(new CustomEvent("change")),this.__newItem="")};return s(d||(d=u` <slot></slot> <ol class="divide-y divide-contrast-10"> ${0} </ol> <div class="${0}"> <input placeholder="${0}" class="w-full bg-transparent appearance-none h-m focus-outline-none" list="list" .value="${0}" ?disabled="${0}" ?readonly="${0}" @keydown="${0}" @change="${0}" @input="${0}"> <datalist id="list"> ${0} </datalist> <div class="transition-opacity ${0}"> <button aria-label="${0}" class="${0}" ?disabled="${0}" @click="${0}"> <iron-icon icon="lumo:plus" class="icon-inline text-l"></iron-icon> </button> </div> </div> `),l(this.items,(e=>e.value),((i,r)=>{var n;return s(c||(c=u` <li class="${0}"> <div class="flex-1 mr-s">${0}</div> <button aria-label="${0}" class="${0}" ?disabled="${0}" @click="${0}"> <iron-icon icon="lumo:cross" class="icon-inline text-xl"></iron-icon> </button> </li> `),t,null!==(n=i.label)&&void 0!==n?n:i.value,this.t("delete"),e,this.disabled,(()=>{this.items.splice(r,1),this.requestUpdate("items"),this.dispatchEvent(new CustomEvent("change"))}))})),o({"ml-m h-l flex items-center":!0,"border-t border-contrast-10":this.items.length>0,flex:!this.readonly,hidden:this.readonly}),this.t("type_here"),a(this.__newItem),this.disabled,this.readonly,(e=>"Enter"===e.key&&r()),(e=>e.stopPropagation()),(e=>{this.__newItem=e.currentTarget.value.trim()}),this.options.map((({label:e,value:t})=>{if(!this.items.some((e=>e.value===t)))return s(h||(h=u`<option value="${0}">${0}</option>`),t,null!=e?e:t)})),this.__newItem?"opacity-100":"opacity-0",this.t("submit"),o({"w-xs h-xs mr-xs flex-shrink-0 ring-inset ring-success-50 focus-outline-none":!0,"flex items-center justify-center rounded-full transition-colors":!0,"bg-contrast-5 text-disabled cursor-default":i,"bg-success-10 text-success cursor-pointer":!i,"hover-bg-success hover-text-success-contrast":!i,"focus-ring-2":!i}),i,r)}}export{m as E};
@@ -1 +1 @@
1
- import{A as e,a7 as t}from"./shared-1761daef.js";import{d as s}from"./shared-63eaded9.js";var n=function(e,t,s,n){return new(s||(s=Promise))((function(i,o){function r(e){try{c(n.next(e))}catch(e){o(e)}}function a(e){try{c(n.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof s?t:new s((function(e){e(t)}))).then(r,a)}c((n=n.apply(e,t||[])).next())}))};class i extends e{constructor(e){super(Object.assign(Object.assign({},e),{fetch:(...e)=>this.__fetch(...e)}))}signIn(t){return n(this,void 0,void 0,(function*(){i.v8n.credentials.check(t);const s=yield this.fetch(new URL("./authenticate",this.base).toString(),{body:JSON.stringify(t),method:"POST"});if(!s.ok){const t=401===s.status?"UNAUTHORIZED":"UNKNOWN";throw new e.AuthError({code:t})}{const e=yield s.json(),t=Object.assign(Object.assign({},e),{date_created:(new Date).toISOString()});this.storage.setItem(i.SESSION,JSON.stringify(t))}}))}sendPasswordResetEmail(t){return n(this,void 0,void 0,(function*(){i.v8n.email.check(t.email);if(!(yield this.fetch(new URL("./forgot_password",this.base).toString(),{body:JSON.stringify(t),method:"POST"})).ok)throw new e.AuthError({code:"UNKNOWN"})}))}signOut(){return n(this,void 0,void 0,(function*(){if(!(yield this.fetch(new URL("./authenticate",this.base).toString(),{method:"DELETE"})).ok)throw new e.AuthError({code:"UNKNOWN"});this.storage.clear(),this.cache.clear()}))}__fetch(e,t){var o;return n(this,void 0,void 0,(function*(){let n=JSON.parse(null!==(o=this.storage.getItem(i.SESSION))&&void 0!==o?o:"null");const r=new s.Request(e,t);if(null!==n){new Date(n.date_created).getTime()+1e3*n.expires_in<Date.now()?(this.console.info("Session has expired, signing out."),this.storage.clear(),this.cache.clear(),n=null):r.headers.set("Authorization",`Bearer ${n.session_token}`)}r.headers.set("Content-Type","application/json"),r.headers.set("FOXY-API-VERSION","1"),this.console.trace(`${r.method} ${r.url}`);const a=yield s.fetch(r);if(n&&a.ok){const e=Object.assign(Object.assign({},n),{date_created:(new Date).toISOString()});this.storage.setItem(i.SESSION,JSON.stringify(e))}return a}))}}i.SESSION="session",i.v8n=Object.assign({},e.v8n,{credentials:t().schema({email:t().string(),newPassword:t().optional(t().string()),password:t().string()}),email:t().string()});let o=/(-?(?:\d+\.?\d*|\d*\.?\d+)(?:e[-+]?\d+)?)\s*([a-zµμ]*)/gi;function r(e="",t="ms"){var s=null;return(e=e.replace(/(\d),(\d)/g,"$1$2")).replace(o,(function(e,t,n){(n=r[n]||r[n.toLowerCase().replace(/s$/,"")])&&(s=(s||0)+parseFloat(t,10)*n)})),s&&s/r[t]}r.nanosecond=r.ns=1e-6,r["µs"]=r["μs"]=r.us=r.microsecond=.001,r.millisecond=r.ms=1,r.second=r.sec=r.s=1e3*r.ms,r.minute=r.min=r.m=60*r.s,r.hour=r.hr=r.h=60*r.m,r.day=r.d=24*r.h,r.week=r.wk=r.w=7*r.d,r.month=r.b=30.4375*r.d,r.year=r.yr=r.y=365.25*r.d;export{i as A,r as p};
1
+ import{A as e,a8 as t}from"./shared-5535f38f.js";import{d as s}from"./shared-63eaded9.js";var n=function(e,t,s,n){return new(s||(s=Promise))((function(i,o){function r(e){try{c(n.next(e))}catch(e){o(e)}}function a(e){try{c(n.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof s?t:new s((function(e){e(t)}))).then(r,a)}c((n=n.apply(e,t||[])).next())}))};class i extends e{constructor(e){super(Object.assign(Object.assign({},e),{fetch:(...e)=>this.__fetch(...e)}))}signIn(t){return n(this,void 0,void 0,(function*(){i.v8n.credentials.check(t);const s=yield this.fetch(new URL("./authenticate",this.base).toString(),{body:JSON.stringify(t),method:"POST"});if(!s.ok){const t=401===s.status?"UNAUTHORIZED":"UNKNOWN";throw new e.AuthError({code:t})}{const e=yield s.json(),t=Object.assign(Object.assign({},e),{date_created:(new Date).toISOString()});this.storage.setItem(i.SESSION,JSON.stringify(t))}}))}sendPasswordResetEmail(t){return n(this,void 0,void 0,(function*(){i.v8n.email.check(t.email);if(!(yield this.fetch(new URL("./forgot_password",this.base).toString(),{body:JSON.stringify(t),method:"POST"})).ok)throw new e.AuthError({code:"UNKNOWN"})}))}signOut(){return n(this,void 0,void 0,(function*(){if(!(yield this.fetch(new URL("./authenticate",this.base).toString(),{method:"DELETE"})).ok)throw new e.AuthError({code:"UNKNOWN"});this.storage.clear(),this.cache.clear()}))}__fetch(e,t){var o;return n(this,void 0,void 0,(function*(){let n=JSON.parse(null!==(o=this.storage.getItem(i.SESSION))&&void 0!==o?o:"null");const r=new s.Request(e,t);if(null!==n){new Date(n.date_created).getTime()+1e3*n.expires_in<Date.now()?(this.console.info("Session has expired, signing out."),this.storage.clear(),this.cache.clear(),n=null):r.headers.set("Authorization",`Bearer ${n.session_token}`)}r.headers.set("Content-Type","application/json"),r.headers.set("FOXY-API-VERSION","1"),this.console.trace(`${r.method} ${r.url}`);const a=yield s.fetch(r);if(n&&a.ok){const e=Object.assign(Object.assign({},n),{date_created:(new Date).toISOString()});this.storage.setItem(i.SESSION,JSON.stringify(e))}return a}))}}i.SESSION="session",i.v8n=Object.assign({},e.v8n,{credentials:t().schema({email:t().string(),newPassword:t().optional(t().string()),password:t().string()}),email:t().string()});let o=/(-?(?:\d+\.?\d*|\d*\.?\d+)(?:e[-+]?\d+)?)\s*([a-zµμ]*)/gi;function r(e="",t="ms"){var s=null;return(e=e.replace(/(\d),(\d)/g,"$1$2")).replace(o,(function(e,t,n){(n=r[n]||r[n.toLowerCase().replace(/s$/,"")])&&(s=(s||0)+parseFloat(t,10)*n)})),s&&s/r[t]}r.nanosecond=r.ns=1e-6,r["µs"]=r["μs"]=r.us=r.microsecond=.001,r.millisecond=r.ms=1,r.second=r.sec=r.s=1e3*r.ms,r.minute=r.min=r.m=60*r.s,r.hour=r.hr=r.h=60*r.m,r.day=r.d=24*r.h,r.week=r.wk=r.w=7*r.d,r.month=r.b=30.4375*r.d,r.year=r.yr=r.y=365.25*r.d;export{i as A,r as p};