@foxy.io/elements 1.25.0-beta.2 → 1.25.0-beta.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 (345) hide show
  1. package/dist/cdn/foxy-access-recovery-form.js +1 -1
  2. package/dist/cdn/foxy-address-card.js +85 -3
  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-api-browser.js +1 -1
  6. package/dist/cdn/foxy-applied-coupon-code-card.js +1 -1
  7. package/dist/cdn/foxy-applied-coupon-code-form.js +1 -1
  8. package/dist/cdn/foxy-applied-tax-card.js +1 -1
  9. package/dist/cdn/foxy-attribute-card.js +1 -1
  10. package/dist/cdn/foxy-attribute-form.js +1 -1
  11. package/dist/cdn/foxy-billing-address-card.js +1 -0
  12. package/dist/cdn/foxy-cancellation-form.js +1 -1
  13. package/dist/cdn/foxy-cart-card.js +1 -1
  14. package/dist/cdn/foxy-cart-form.js +1 -1
  15. package/dist/cdn/foxy-client-card.js +1 -1
  16. package/dist/cdn/foxy-client-form.js +1 -1
  17. package/dist/cdn/foxy-collection-page.js +1 -1
  18. package/dist/cdn/foxy-collection-pages.js +1 -1
  19. package/dist/cdn/foxy-copy-to-clipboard.js +1 -1
  20. package/dist/cdn/foxy-coupon-card.js +1 -1
  21. package/dist/cdn/foxy-coupon-code-form.js +1 -1
  22. package/dist/cdn/foxy-coupon-codes-form.js +1 -1
  23. package/dist/cdn/foxy-coupon-detail-card.js +1 -1
  24. package/dist/cdn/foxy-coupon-form.js +1 -1
  25. package/dist/cdn/foxy-custom-field-card.js +1 -1
  26. package/dist/cdn/foxy-custom-field-form.js +1 -1
  27. package/dist/cdn/foxy-customer-api.js +1 -1
  28. package/dist/cdn/foxy-customer-card.js +1 -1
  29. package/dist/cdn/foxy-customer-form.js +1 -1
  30. package/dist/cdn/foxy-customer-portal-settings.js +1 -1
  31. package/dist/cdn/foxy-customer-portal.js +1 -1
  32. package/dist/cdn/foxy-customer.js +3 -3
  33. package/dist/cdn/foxy-customers-table.js +1 -1
  34. package/dist/cdn/foxy-discount-builder.js +1 -1
  35. package/dist/cdn/foxy-discount-card.js +1 -1
  36. package/dist/cdn/foxy-discount-detail-card.js +1 -1
  37. package/dist/cdn/foxy-donation.js +1 -1
  38. package/dist/cdn/foxy-downloadable-card.js +1 -1
  39. package/dist/cdn/foxy-downloadable-form.js +1 -1
  40. package/dist/cdn/foxy-email-template-card.js +1 -1
  41. package/dist/cdn/foxy-email-template-form.js +1 -1
  42. package/dist/cdn/foxy-error-entry-card.js +1 -1
  43. package/dist/cdn/foxy-filter-attribute-card.js +1 -1
  44. package/dist/cdn/foxy-filter-attribute-form.js +1 -1
  45. package/dist/cdn/foxy-form-dialog.js +1 -1
  46. package/dist/cdn/foxy-generate-codes-form.js +1 -1
  47. package/dist/cdn/foxy-gift-card-card.js +1 -1
  48. package/dist/cdn/foxy-gift-card-code-form.js +1 -1
  49. package/dist/cdn/foxy-gift-card-code-log-card.js +1 -1
  50. package/dist/cdn/foxy-gift-card-codes-form.js +1 -1
  51. package/dist/cdn/foxy-gift-card-form.js +1 -1
  52. package/dist/cdn/foxy-i18n-editor.js +2 -2
  53. package/dist/cdn/foxy-i18n.js +1 -1
  54. package/dist/cdn/foxy-integration-card.js +1 -1
  55. package/dist/cdn/foxy-integration-form.js +1 -1
  56. package/dist/cdn/foxy-item-card.js +1 -1
  57. package/dist/cdn/foxy-item-category-card.js +1 -1
  58. package/dist/cdn/foxy-item-category-form.js +1 -1
  59. package/dist/cdn/foxy-item-form.js +179 -1
  60. package/dist/cdn/foxy-item-option-card.js +1 -1
  61. package/dist/cdn/foxy-item-option-form.js +1 -1
  62. package/dist/cdn/foxy-items-form.js +1 -1
  63. package/dist/cdn/foxy-native-integration-card.js +1 -1
  64. package/dist/cdn/foxy-native-integration-form.js +1 -1
  65. package/dist/cdn/foxy-nucleon-element.js +1 -1
  66. package/dist/cdn/foxy-pagination.js +1 -1
  67. package/dist/cdn/foxy-passkey-card.js +1 -1
  68. package/dist/cdn/foxy-passkey-form.js +1 -1
  69. package/dist/cdn/foxy-payment-card.js +1 -1
  70. package/dist/cdn/foxy-payment-method-card.js +1 -1
  71. package/dist/cdn/foxy-payments-api-fraud-protection-card.js +1 -1
  72. package/dist/cdn/foxy-payments-api-fraud-protection-form.js +1 -1
  73. package/dist/cdn/foxy-payments-api-payment-method-card.js +1 -1
  74. package/dist/cdn/foxy-payments-api-payment-method-form.js +1 -1
  75. package/dist/cdn/foxy-payments-api-payment-preset-card.js +1 -1
  76. package/dist/cdn/foxy-payments-api-payment-preset-form.js +1 -1
  77. package/dist/cdn/foxy-payments-api.js +1 -1
  78. package/dist/cdn/foxy-query-builder.js +1 -1
  79. package/dist/cdn/foxy-report-form.js +5 -5
  80. package/dist/cdn/foxy-reports-table.js +1 -1
  81. package/dist/cdn/foxy-shipment-card.js +1 -14
  82. package/dist/cdn/foxy-shipping-method-card.js +1 -1
  83. package/dist/cdn/foxy-sign-in-form.js +1 -1
  84. package/dist/cdn/foxy-spinner.js +2 -2
  85. package/dist/cdn/foxy-store-card.js +1 -1
  86. package/dist/cdn/foxy-store-form.js +1 -1
  87. package/dist/cdn/foxy-store-shipping-method-form.js +1 -1
  88. package/dist/cdn/foxy-subscription-card.js +1 -1
  89. package/dist/cdn/foxy-subscription-form.js +2 -96
  90. package/dist/cdn/foxy-subscription-settings-form.js +1 -1
  91. package/dist/cdn/foxy-subscriptions-table.js +1 -1
  92. package/dist/cdn/foxy-table.js +1 -1
  93. package/dist/cdn/foxy-tax-card.js +1 -1
  94. package/dist/cdn/foxy-tax-form.js +1 -1
  95. package/dist/cdn/foxy-template-config-form.js +1 -1
  96. package/dist/cdn/foxy-template-form.js +1 -1
  97. package/dist/cdn/foxy-template-set-card.js +1 -1
  98. package/dist/cdn/foxy-template-set-form.js +1 -1
  99. package/dist/cdn/foxy-transaction-card.js +95 -1
  100. package/dist/cdn/foxy-transaction.js +1 -1
  101. package/dist/cdn/foxy-transactions-table.js +7 -7
  102. package/dist/cdn/foxy-user-card.js +1 -1
  103. package/dist/cdn/foxy-user-form.js +1 -1
  104. package/dist/cdn/foxy-users-table.js +1 -1
  105. package/dist/cdn/foxy-webhook-card.js +1 -1
  106. package/dist/cdn/foxy-webhook-form.js +1 -1
  107. package/dist/cdn/foxy-webhook-log-card.js +1 -1
  108. package/dist/cdn/foxy-webhook-status-card.js +1 -1
  109. package/dist/cdn/shared-0037b9e6.js +1 -0
  110. package/dist/cdn/{shared-131988fc.js → shared-00c2793e.js} +1 -1
  111. package/dist/cdn/{shared-51a5af7e.js → shared-029816d7.js} +1 -1
  112. package/dist/cdn/{shared-c320cfef.js → shared-02bc0368.js} +1 -1
  113. package/dist/cdn/{shared-35728235.js → shared-07e9d1fb.js} +1 -1
  114. package/dist/cdn/{shared-4c2e9064.js → shared-1522d76f.js} +1 -1
  115. package/dist/cdn/{shared-4d555419.js → shared-174f37e9.js} +1 -1
  116. package/dist/cdn/{shared-f1b36324.js → shared-20ba4cdc.js} +1 -1
  117. package/dist/cdn/{shared-800ee6c0.js → shared-250a399a.js} +1 -1
  118. package/dist/cdn/{shared-8c681381.js → shared-268571df.js} +1 -1
  119. package/dist/cdn/{shared-4b20fc75.js → shared-293771ba.js} +1 -1
  120. package/dist/cdn/{shared-7b771301.js → shared-2b27e2e7.js} +1 -1
  121. package/dist/cdn/{shared-fed6cd4d.js → shared-2bdc99f4.js} +1 -1
  122. package/dist/cdn/{shared-71b3559f.js → shared-2c8c4b43.js} +1 -1
  123. package/dist/cdn/shared-2cf08dd4.js +1 -0
  124. package/dist/cdn/{shared-cb9cdc88.js → shared-2f09d4df.js} +4 -4
  125. package/dist/cdn/{shared-fd96bcd1.js → shared-30cbf0a6.js} +1 -1
  126. package/dist/cdn/{shared-417ab233.js → shared-30d00b64.js} +1 -1
  127. package/dist/cdn/{shared-1a65fd20.js → shared-32e736eb.js} +1 -1
  128. package/dist/cdn/{shared-e8a85228.js → shared-3d251e6f.js} +1 -1
  129. package/dist/cdn/shared-43e2c3f6.js +1 -0
  130. package/dist/cdn/{shared-f3b8de28.js → shared-43f449bb.js} +1 -1
  131. package/dist/cdn/{shared-9771ef0f.js → shared-4462dc70.js} +2 -2
  132. package/dist/cdn/{shared-a52c3d8c.js → shared-4aa4d980.js} +1 -1
  133. package/dist/cdn/{shared-e2db3ab5.js → shared-4c124efc.js} +7 -7
  134. package/dist/cdn/shared-4c650e5c.js +1 -0
  135. package/dist/cdn/{shared-96215749.js → shared-4e59fd48.js} +16 -16
  136. package/dist/cdn/{shared-ca428891.js → shared-54b0e48f.js} +1 -1
  137. package/dist/cdn/{shared-662c576b.js → shared-5fa697c4.js} +2 -2
  138. package/dist/cdn/shared-61ade33e.js +6 -0
  139. package/dist/cdn/{shared-9b12aeac.js → shared-6a7f96c4.js} +1 -1
  140. package/dist/cdn/{shared-8771fb61.js → shared-6a9ae42e.js} +1 -1
  141. package/dist/cdn/{shared-1105e4b9.js → shared-76400719.js} +1 -1
  142. package/dist/cdn/{shared-da5e32c1.js → shared-7dd17943.js} +1 -1
  143. package/dist/cdn/{shared-76e71481.js → shared-7deff07c.js} +1 -1
  144. package/dist/cdn/{shared-fff7db77.js → shared-7e1953f5.js} +1 -1
  145. package/dist/cdn/shared-8201d0b5.js +1 -0
  146. package/dist/cdn/{shared-5d718eaf.js → shared-8952aeac.js} +1 -1
  147. package/dist/cdn/{shared-92de4f37.js → shared-896982f9.js} +1 -1
  148. package/dist/cdn/{shared-b8963ec6.js → shared-8d8bed82.js} +1 -1
  149. package/dist/cdn/{shared-fc99076a.js → shared-99c0ae04.js} +1 -1
  150. package/dist/cdn/{shared-6e704d83.js → shared-9c08cfab.js} +1 -1
  151. package/dist/cdn/{shared-53d66db2.js → shared-9df8f842.js} +3 -3
  152. package/dist/cdn/{shared-1313f293.js → shared-a8dc23f1.js} +1 -1
  153. package/dist/cdn/{shared-d01f42d0.js → shared-ac7c5a5e.js} +14 -14
  154. package/dist/cdn/{shared-1dbad347.js → shared-ad34b6db.js} +1 -1
  155. package/dist/cdn/{shared-5d795aaf.js → shared-b1b8ea67.js} +1 -1
  156. package/dist/cdn/{shared-5cf7b194.js → shared-b23c903e.js} +1 -1
  157. package/dist/cdn/{shared-e60dc924.js → shared-b509bc2c.js} +1 -1
  158. package/dist/cdn/shared-bab2ea2c.js +1 -0
  159. package/dist/cdn/{shared-18672d26.js → shared-bc0d8d01.js} +2 -2
  160. package/dist/cdn/shared-be7bfbb0.js +1 -0
  161. package/dist/cdn/{shared-21293163.js → shared-bed7aae1.js} +1 -1
  162. package/dist/cdn/{shared-732bee4b.js → shared-c7b3d22b.js} +3 -3
  163. package/dist/cdn/{shared-7d933f9d.js → shared-c9ba1b64.js} +3 -3
  164. package/dist/cdn/{shared-783f5705.js → shared-ca4c5f0f.js} +1 -1
  165. package/dist/cdn/{shared-093b64b4.js → shared-cdd2358f.js} +1 -1
  166. package/dist/cdn/{shared-4e05dfb4.js → shared-d21fa1a6.js} +1 -1
  167. package/dist/cdn/{shared-4c3cb511.js → shared-d57fac94.js} +1 -1
  168. package/dist/cdn/{shared-3bcc07cd.js → shared-db306674.js} +1 -1
  169. package/dist/cdn/{shared-2f082f50.js → shared-dbadd9cf.js} +1 -1
  170. package/dist/cdn/{shared-5742a841.js → shared-e39807f8.js} +1 -1
  171. package/dist/cdn/shared-e83f2983.js +1 -0
  172. package/dist/cdn/{shared-f241722a.js → shared-e8621807.js} +1 -1
  173. package/dist/cdn/{shared-112dbca7.js → shared-e91453df.js} +1 -1
  174. package/dist/cdn/{shared-c00049b2.js → shared-ea527e98.js} +1 -1
  175. package/dist/cdn/{shared-e8a51c60.js → shared-eb116b3e.js} +1 -1
  176. package/dist/cdn/{shared-e006e82c.js → shared-f1e743df.js} +1 -1
  177. package/dist/cdn/shared-f9a3d1ff.js +6 -0
  178. package/dist/cdn/{shared-d123bea6.js → shared-fa4f6cd3.js} +1 -1
  179. package/dist/cdn/shared-fc15a882.js +1 -0
  180. package/dist/cdn/{shared-b7556b77.js → shared-ff18b2d1.js} +1 -1
  181. package/dist/cdn/{shared-870074ff.js → shared-ff8ca16b.js} +1 -1
  182. package/dist/cdn/{shared-fe927c53.js → shared-ff9791cf.js} +1 -1
  183. package/dist/cdn/translations/billing-address-card/en.json +9 -0
  184. package/dist/cdn/translations/cart-form/en.json +218 -299
  185. package/dist/cdn/translations/customer/en.json +151 -29
  186. package/dist/cdn/translations/customer-portal/en.json +35 -46
  187. package/dist/cdn/translations/item-card/en.json +13 -1
  188. package/dist/cdn/translations/item-form/en.json +201 -294
  189. package/dist/cdn/translations/native-integration-card/en.json +6 -2
  190. package/dist/cdn/translations/native-integration-form/en.json +17 -1
  191. package/dist/cdn/translations/payment-card/en.json +4 -0
  192. package/dist/cdn/translations/payments-api-payment-preset-form/en.json +2 -2
  193. package/dist/cdn/translations/shipment-card/en.json +6 -446
  194. package/dist/cdn/translations/store-form/en.json +1 -1
  195. package/dist/cdn/translations/subscription-form/en.json +35 -15
  196. package/dist/cdn/translations/template-config-form/en.json +2 -2
  197. package/dist/cdn/translations/transaction/en.json +1104 -857
  198. package/dist/cdn/translations/transaction-card/en.json +22 -22
  199. package/dist/elements/internal/InternalAsyncListControl/InternalAsyncListControl.d.ts +2 -0
  200. package/dist/elements/internal/InternalAsyncListControl/InternalAsyncListControl.js +43 -21
  201. package/dist/elements/internal/InternalAsyncListControl/InternalAsyncListControl.js.map +1 -1
  202. package/dist/elements/internal/InternalControl/InternalControl.js +2 -1
  203. package/dist/elements/internal/InternalControl/InternalControl.js.map +1 -1
  204. package/dist/elements/private/Dialog/Dialog.js +7 -1
  205. package/dist/elements/private/Dialog/Dialog.js.map +1 -1
  206. package/dist/elements/public/AttributeCard/AttributeCard.js +1 -1
  207. package/dist/elements/public/AttributeCard/AttributeCard.js.map +1 -1
  208. package/dist/elements/public/BillingAddressCard/BillingAddressCard.d.ts +15 -0
  209. package/dist/elements/public/BillingAddressCard/BillingAddressCard.js +28 -0
  210. package/dist/elements/public/BillingAddressCard/BillingAddressCard.js.map +1 -0
  211. package/dist/elements/public/BillingAddressCard/index.d.ts +4 -0
  212. package/dist/elements/public/BillingAddressCard/index.js +6 -0
  213. package/dist/elements/public/BillingAddressCard/index.js.map +1 -0
  214. package/dist/elements/public/BillingAddressCard/types.d.ts +3 -0
  215. package/dist/elements/public/BillingAddressCard/types.js +2 -0
  216. package/dist/elements/public/BillingAddressCard/types.js.map +1 -0
  217. package/dist/elements/public/CustomFieldCard/TwoLineCard.js +1 -1
  218. package/dist/elements/public/CustomFieldCard/TwoLineCard.js.map +1 -1
  219. package/dist/elements/public/I18n/I18n.d.ts +1 -0
  220. package/dist/elements/public/I18n/I18n.js +1 -0
  221. package/dist/elements/public/I18n/I18n.js.map +1 -1
  222. package/dist/elements/public/ItemCard/ItemCard.d.ts +2 -0
  223. package/dist/elements/public/ItemCard/ItemCard.js +70 -62
  224. package/dist/elements/public/ItemCard/ItemCard.js.map +1 -1
  225. package/dist/elements/public/ItemForm/ItemForm.d.ts +64 -12
  226. package/dist/elements/public/ItemForm/ItemForm.js +146 -28
  227. package/dist/elements/public/ItemForm/ItemForm.js.map +1 -1
  228. package/dist/elements/public/ItemForm/index.d.ts +7 -7
  229. package/dist/elements/public/ItemForm/index.js +7 -7
  230. package/dist/elements/public/ItemForm/index.js.map +1 -1
  231. package/dist/elements/public/ItemForm/types.d.ts +62 -2
  232. package/dist/elements/public/ItemForm/types.js.map +1 -1
  233. package/dist/elements/public/ItemsForm/private/Item.js +1 -0
  234. package/dist/elements/public/ItemsForm/private/Item.js.map +1 -1
  235. package/dist/elements/public/NativeIntegrationCard/NativeIntegrationCard.js +12 -10
  236. package/dist/elements/public/NativeIntegrationCard/NativeIntegrationCard.js.map +1 -1
  237. package/dist/elements/public/NativeIntegrationForm/NativeIntegrationForm.d.ts +2 -0
  238. package/dist/elements/public/NativeIntegrationForm/NativeIntegrationForm.js +41 -8
  239. package/dist/elements/public/NativeIntegrationForm/NativeIntegrationForm.js.map +1 -1
  240. package/dist/elements/public/NativeIntegrationForm/defaults.d.ts +7 -1
  241. package/dist/elements/public/NativeIntegrationForm/defaults.js +7 -1
  242. package/dist/elements/public/NativeIntegrationForm/defaults.js.map +1 -1
  243. package/dist/elements/public/NativeIntegrationForm/types.d.ts +6 -2
  244. package/dist/elements/public/NativeIntegrationForm/types.js.map +1 -1
  245. package/dist/elements/public/Pagination/Pagination.js +65 -60
  246. package/dist/elements/public/Pagination/Pagination.js.map +1 -1
  247. package/dist/elements/public/PaymentCard/PaymentCard.d.ts +24 -36
  248. package/dist/elements/public/PaymentCard/PaymentCard.js +139 -158
  249. package/dist/elements/public/PaymentCard/PaymentCard.js.map +1 -1
  250. package/dist/elements/public/PaymentCard/index.d.ts +2 -2
  251. package/dist/elements/public/PaymentCard/index.js +2 -2
  252. package/dist/elements/public/PaymentCard/index.js.map +1 -1
  253. package/dist/elements/public/PaymentCard/types.d.ts +2 -16
  254. package/dist/elements/public/PaymentCard/types.js.map +1 -1
  255. package/dist/elements/public/ShipmentCard/ShipmentCard.d.ts +9 -13
  256. package/dist/elements/public/ShipmentCard/ShipmentCard.js +93 -91
  257. package/dist/elements/public/ShipmentCard/ShipmentCard.js.map +1 -1
  258. package/dist/elements/public/ShipmentCard/index.d.ts +2 -6
  259. package/dist/elements/public/ShipmentCard/index.js +2 -6
  260. package/dist/elements/public/ShipmentCard/index.js.map +1 -1
  261. package/dist/elements/public/ShipmentCard/types.d.ts +7 -2
  262. package/dist/elements/public/ShipmentCard/types.js.map +1 -1
  263. package/dist/elements/public/StoreForm/StoreForm.js +1 -1
  264. package/dist/elements/public/StoreForm/StoreForm.js.map +1 -1
  265. package/dist/elements/public/Transaction/Transaction.d.ts +12 -5
  266. package/dist/elements/public/Transaction/Transaction.js +239 -77
  267. package/dist/elements/public/Transaction/Transaction.js.map +1 -1
  268. package/dist/elements/public/Transaction/index.d.ts +4 -3
  269. package/dist/elements/public/Transaction/index.js +4 -3
  270. package/dist/elements/public/Transaction/index.js.map +1 -1
  271. package/dist/elements/public/Transaction/internal/InternalTransactionActionsControl/InternalTransactionActionsControl.d.ts +1 -0
  272. package/dist/elements/public/Transaction/internal/InternalTransactionActionsControl/InternalTransactionActionsControl.js +17 -4
  273. package/dist/elements/public/Transaction/internal/InternalTransactionActionsControl/InternalTransactionActionsControl.js.map +1 -1
  274. package/dist/elements/public/Transaction/internal/InternalTransactionCustomerControl/InternalTransactionCustomerControl.d.ts +7 -1
  275. package/dist/elements/public/Transaction/internal/InternalTransactionCustomerControl/InternalTransactionCustomerControl.js +81 -24
  276. package/dist/elements/public/Transaction/internal/InternalTransactionCustomerControl/InternalTransactionCustomerControl.js.map +1 -1
  277. package/dist/elements/public/Transaction/internal/InternalTransactionCustomerControl/index.d.ts +3 -3
  278. package/dist/elements/public/Transaction/internal/InternalTransactionCustomerControl/index.js +3 -3
  279. package/dist/elements/public/Transaction/internal/InternalTransactionCustomerControl/index.js.map +1 -1
  280. package/dist/elements/public/Transaction/internal/InternalTransactionPostActionControl/InternalTransactionPostActionControl.js +1 -1
  281. package/dist/elements/public/Transaction/internal/InternalTransactionPostActionControl/InternalTransactionPostActionControl.js.map +1 -1
  282. package/dist/elements/public/Transaction/internal/InternalTransactionSummaryControl/InternalTransactionSummaryControl.d.ts +5 -3
  283. package/dist/elements/public/Transaction/internal/InternalTransactionSummaryControl/InternalTransactionSummaryControl.js +110 -61
  284. package/dist/elements/public/Transaction/internal/InternalTransactionSummaryControl/InternalTransactionSummaryControl.js.map +1 -1
  285. package/dist/elements/public/Transaction/internal/InternalTransactionSummaryControl/index.d.ts +1 -0
  286. package/dist/elements/public/Transaction/internal/InternalTransactionSummaryControl/index.js +1 -0
  287. package/dist/elements/public/Transaction/internal/InternalTransactionSummaryControl/index.js.map +1 -1
  288. package/dist/elements/public/Transaction/types.d.ts +15 -1
  289. package/dist/elements/public/Transaction/types.js.map +1 -1
  290. package/dist/elements/public/TransactionCard/TransactionCard.d.ts +8 -10
  291. package/dist/elements/public/TransactionCard/TransactionCard.js +71 -51
  292. package/dist/elements/public/TransactionCard/TransactionCard.js.map +1 -1
  293. package/dist/elements/public/TransactionCard/index.d.ts +2 -1
  294. package/dist/elements/public/TransactionCard/index.js +2 -1
  295. package/dist/elements/public/TransactionCard/index.js.map +1 -1
  296. package/dist/elements/public/TransactionCard/types.d.ts +8 -2
  297. package/dist/elements/public/TransactionCard/types.js.map +1 -1
  298. package/dist/elements/public/index.d.ts +1 -0
  299. package/dist/elements/public/index.defined.d.ts +1 -0
  300. package/dist/elements/public/index.defined.js +1 -0
  301. package/dist/elements/public/index.defined.js.map +1 -1
  302. package/dist/elements/public/index.js +1 -0
  303. package/dist/elements/public/index.js.map +1 -1
  304. package/dist/mixins/themeable.js +20 -0
  305. package/dist/mixins/themeable.js.map +1 -1
  306. package/package.json +1 -1
  307. package/dist/cdn/shared-074a74c3.js +0 -82
  308. package/dist/cdn/shared-26dea180.js +0 -1
  309. package/dist/cdn/shared-468de081.js +0 -1
  310. package/dist/cdn/shared-5e932eb5.js +0 -1
  311. package/dist/cdn/shared-702eae16.js +0 -1
  312. package/dist/cdn/shared-8a9c64b2.js +0 -1
  313. package/dist/cdn/shared-e3096241.js +0 -12
  314. package/dist/cdn/shared-e312da08.js +0 -1
  315. package/dist/cdn/shared-e79b5765.js +0 -1
  316. package/dist/elements/public/ItemForm/internal/InternalItemFormCartControl/InternalItemFormCartControl.d.ts +0 -5
  317. package/dist/elements/public/ItemForm/internal/InternalItemFormCartControl/InternalItemFormCartControl.js +0 -17
  318. package/dist/elements/public/ItemForm/internal/InternalItemFormCartControl/InternalItemFormCartControl.js.map +0 -1
  319. package/dist/elements/public/ItemForm/internal/InternalItemFormCartControl/index.d.ts +0 -6
  320. package/dist/elements/public/ItemForm/internal/InternalItemFormCartControl/index.js +0 -8
  321. package/dist/elements/public/ItemForm/internal/InternalItemFormCartControl/index.js.map +0 -1
  322. package/dist/elements/public/ItemForm/internal/InternalItemFormInventoryControl/InternalItemFormInventoryControl.d.ts +0 -5
  323. package/dist/elements/public/ItemForm/internal/InternalItemFormInventoryControl/InternalItemFormInventoryControl.js +0 -25
  324. package/dist/elements/public/ItemForm/internal/InternalItemFormInventoryControl/InternalItemFormInventoryControl.js.map +0 -1
  325. package/dist/elements/public/ItemForm/internal/InternalItemFormInventoryControl/index.d.ts +0 -5
  326. package/dist/elements/public/ItemForm/internal/InternalItemFormInventoryControl/index.js +0 -7
  327. package/dist/elements/public/ItemForm/internal/InternalItemFormInventoryControl/index.js.map +0 -1
  328. package/dist/elements/public/ItemForm/internal/InternalItemFormLineItemDiscountControl/InternalItemFormLineItemDiscountControl.d.ts +0 -5
  329. package/dist/elements/public/ItemForm/internal/InternalItemFormLineItemDiscountControl/InternalItemFormLineItemDiscountControl.js +0 -52
  330. package/dist/elements/public/ItemForm/internal/InternalItemFormLineItemDiscountControl/InternalItemFormLineItemDiscountControl.js.map +0 -1
  331. package/dist/elements/public/ItemForm/internal/InternalItemFormLineItemDiscountControl/index.d.ts +0 -6
  332. package/dist/elements/public/ItemForm/internal/InternalItemFormLineItemDiscountControl/index.js +0 -8
  333. package/dist/elements/public/ItemForm/internal/InternalItemFormLineItemDiscountControl/index.js.map +0 -1
  334. package/dist/elements/public/ItemForm/internal/InternalItemFormShippingControl/InternalItemFormShippingControl.d.ts +0 -5
  335. package/dist/elements/public/ItemForm/internal/InternalItemFormShippingControl/InternalItemFormShippingControl.js +0 -26
  336. package/dist/elements/public/ItemForm/internal/InternalItemFormShippingControl/InternalItemFormShippingControl.js.map +0 -1
  337. package/dist/elements/public/ItemForm/internal/InternalItemFormShippingControl/index.d.ts +0 -5
  338. package/dist/elements/public/ItemForm/internal/InternalItemFormShippingControl/index.js +0 -7
  339. package/dist/elements/public/ItemForm/internal/InternalItemFormShippingControl/index.js.map +0 -1
  340. package/dist/elements/public/ItemForm/internal/InternalItemFormSubscriptionControl/InternalItemFormSubscriptionControl.d.ts +0 -5
  341. package/dist/elements/public/ItemForm/internal/InternalItemFormSubscriptionControl/InternalItemFormSubscriptionControl.js +0 -72
  342. package/dist/elements/public/ItemForm/internal/InternalItemFormSubscriptionControl/InternalItemFormSubscriptionControl.js.map +0 -1
  343. package/dist/elements/public/ItemForm/internal/InternalItemFormSubscriptionControl/index.d.ts +0 -8
  344. package/dist/elements/public/ItemForm/internal/InternalItemFormSubscriptionControl/index.js +0 -10
  345. package/dist/elements/public/ItemForm/internal/InternalItemFormSubscriptionControl/index.js.map +0 -1
@@ -1 +1,95 @@
1
- import"./shared-f9180815.js";import"./foxy-spinner.js";import"./shared-51a5af7e.js";import{h as t}from"./shared-7f33a83a.js";import{C as e}from"./shared-5cf7b194.js";import{N as s}from"./shared-9b12aeac.js";import{T as i,a as r}from"./shared-662c576b.js";import{c as n}from"./shared-4e709717.js";import"./shared-fe927c53.js";import"./shared-f3b8de28.js";import"./shared-417ab233.js";import"./shared-4c2e9064.js";import"./shared-fd96bcd1.js";import"./shared-343d1fd7.js";import"./shared-d3bf9ac0.js";import"./shared-35728235.js";import"./shared-3ab0306f.js";import"./shared-e8a51c60.js";let a,o,d,c,l,p,u,m,h,f,v,y,_,$=t=>t;const x=i(e(r(s,"transaction-card")));class b extends x{constructor(){super(...arguments),this.templates={},this.__currencyDisplay=""}render(){var e,s;const i=this.hiddenSelector,r=!i.matches("total",!0),d=!i.matches("status",!0);return t(a||(a=$` <div aria-busy="${0}" aria-live="polite" class="relative leading-s font-lumo text-m"> <div class="${0}"> ${0} ${0} ${0} </div> <div class="${0}"> <foxy-spinner data-testid="spinner" state="${0}" class="m-auto" lang="${0}" ns="${0} ${0}"> </foxy-spinner> </div> </div> `),this.in("busy"),n({"transition-opacity":!0,"opacity-0":!this.data}),r||d?t(o||(o=$` <div class="flex items-center justify-between gap-s"> ${0} ${0} </div> `),r?this.__renderTotal():"",d?this.__renderStatus():""):"",i.matches("description",!0)?"":this.__renderDescription(),i.matches("customer",!0)?"":this.__renderCustomer(),n({"pointer-events-none absolute inset-0 flex transition-opacity":!0,"opacity-0":!!this.data}),this.in("fail")?"error":this.in({idle:"template"})?"empty":"busy",this.lang,this.ns,null!==(s=null===(e=customElements.get("foxy-spinner"))||void 0===e?void 0:e.defaultNS)&&void 0!==s?s:"")}async _sendGet(){var t;const e=await super._sendGet(),s=null===(t=e._links["fx:store"])||void 0===t?void 0:t.href;if("string"==typeof s){const t=await super._fetch(s);this.__currencyDisplay=t.use_international_currency_symbol?"code":"symbol"}else this.__currencyDisplay="symbol";return e}__renderTotal(){var e,s;const i=this.data;let r;if(i){const n=`${i.total_order} ${i.currency_code}`,a=this.__currencyDisplay,o=["subscription_cancellation","subscription_modification","subscription_renewal","updateinfo"].includes(i.type)?i.type:"fx:subscription"in i._links?"new_subscription":"new_order",l=null===(s=null===(e=this.data)||void 0===e?void 0:e.source)||void 0===s?void 0:s.substring(0,3).toUpperCase();r=t(d||(d=$` ${0} <foxy-i18n class="truncate" lang="${0}" key="type_${0}" ns="${0}"></foxy-i18n> <span>&bull;</span> <foxy-i18n options="${0}" lang="${0}" key="price" ns="${0}"> </foxy-i18n> `),l?t(c||(c=$`<span title="${0}">${0}</span>`),this.t(`source_${l}`),l):"",this.lang,o,this.ns,JSON.stringify({amount:n,currencyDisplay:a}),this.lang,this.ns)}else r=t(l||(l=$`&ZeroWidthSpace;`));return t(p||(p=$` <div class="min-w-0" data-testid="total"> ${0} <div class="font-medium flex items-center gap-xs">${0}</div> ${0} </div> `),this.renderTemplateOrSlot("total:before"),r,this.renderTemplateOrSlot("total:after"))}__renderStatus(){var e,s,i,r;const n=(null===(e=this.data)||void 0===e?void 0:e.status)||"completed";return t(u||(u=$` <div class="flex-shrink-0" data-testid="status"> ${0} <div class="text-tertiary text-s flex items-center space-x-s"> <foxy-i18n options="${0}" lang="${0}" key="time" ns="${0}"> </foxy-i18n> <iron-icon data-testid="status-icon" class="icon-inline text-l ${0}" title="${0}" icon="${0}"> </iron-icon> </div> ${0} </div> `),this.renderTemplateOrSlot("status:before"),JSON.stringify({value:null===(s=this.data)||void 0===s?void 0:s.transaction_date}),this.lang,this.ns,null!==(i={completed:"text-success",rejected:"text-error",declined:"text-error"}[n])&&void 0!==i?i:"text-tertiary",this.t(`transaction_${n}`),null!==(r={completed:"icons:done-all",refunded:"icons:restore",rejected:"icons:highlight-off",declined:"icons:highlight-off",voided:"icons:remove-circle-outline"}[n])&&void 0!==r?r:"icons:schedule",this.renderTemplateOrSlot("status:after"))}__renderDescription(){var e,s;const i=null===(s=null===(e=this.data)||void 0===e?void 0:e._embedded)||void 0===s?void 0:s["fx:items"];let r;if(i){const e={most_expensive_item:[...i].sort(((t,e)=>t.price-e.price))[0],count_minus_one:i.length-1,count:i.length};r=t(m||(m=$` <foxy-i18n options="${0}" lang="${0}" key="transaction_summary" ns="${0}"> </foxy-i18n> `),JSON.stringify(e),this.lang,this.ns)}else r=t(h||(h=$`&ZeroWidthSpace;`));return t(f||(f=$` <div data-testid="description"> ${0} <div class="text-s text-secondary truncate">${0}</div> ${0} </div> `),this.renderTemplateOrSlot("description:before"),r,this.renderTemplateOrSlot("description:after"))}__renderCustomer(){const e=this.data,s=e?t(v||(v=$`${0} ${0} (${0})`),e.customer_first_name,e.customer_last_name,e.customer_email):t(y||(y=$`&ZeroWidthSpace;`));return t(_||(_=$` <div data-testid="customer"> ${0} <div class="text-tertiary truncate text-s">${0}</div> ${0} </div> `),this.renderTemplateOrSlot("customer:before"),s,this.renderTemplateOrSlot("customer:after"))}}customElements.define("foxy-transaction-card",b);export{b as TransactionCard};
1
+ import{h as t,P as e}from"./shared-43f449bb.js";import{E as i,T as s}from"./shared-f9a3d1ff.js";import"./shared-ff9791cf.js";import"./shared-9c08cfab.js";import{y as o,a as n}from"./shared-5fa697c4.js";import{c as r,h as a}from"./shared-7f33a83a.js";import"./shared-f9180815.js";import"./shared-2cf08dd4.js";import"./shared-029816d7.js";import"./shared-1522d76f.js";import{g as d}from"./shared-bab2ea2c.js";import{C as l}from"./shared-b23c903e.js";import{I as c}from"./shared-e91453df.js";import{c as h}from"./shared-4e709717.js";import"./foxy-spinner.js";import"./shared-30d00b64.js";import"./shared-30cbf0a6.js";import"./shared-343d1fd7.js";import"./shared-d3bf9ac0.js";import"./shared-6a7f96c4.js";import"./shared-07e9d1fb.js";import"./shared-3ab0306f.js";import"./shared-eb116b3e.js";o("vcf-tooltip",r`
2
+ :host {
3
+ /* Sizing */
4
+ --lumo-tooltip-size: var(--lumo-size-m);
5
+ /* Style */
6
+ font-family: var(--lumo-font-family);
7
+ font-size: var(--lumo-font-size-s, 0.875rem);
8
+ line-height: var(--lumo-line-height-s, 1.375);
9
+ cursor: default;
10
+ -webkit-tap-highlight-color: transparent;
11
+ -webkit-font-smoothing: antialiased;
12
+ -moz-osx-font-smoothing: grayscale;
13
+ }
14
+ `,{include:["lumo-color","lumo-typography"]});class u extends(i(s(e))){static get template(){return t`
15
+ <style>
16
+ :host {
17
+ box-sizing: border-box;
18
+ padding: 0;
19
+ display: block;
20
+ position: absolute;
21
+ outline: none;
22
+ z-index: 1000;
23
+ -moz-user-select: none;
24
+ -ms-user-select: none;
25
+ -webkit-user-select: none;
26
+ user-select: none;
27
+
28
+ --tooltip-animation-duration: 250ms;
29
+ --tooltip-delay: 500ms;
30
+ animation: tooltipFadeIn var(--tooltip-animation-duration);
31
+ animation-delay: var(--tooltip-delay);
32
+ animation-fill-mode: both;
33
+ }
34
+
35
+ :host([manual]) {
36
+ --tooltip-delay: 0;
37
+ }
38
+
39
+ :host([close-button]) [part='close-button'] {
40
+ display: inline-block;
41
+ }
42
+
43
+ :host([close-button]) [part='container'] {
44
+ padding-right: 0;
45
+ }
46
+
47
+ [part='close-button'] {
48
+ display: none;
49
+ margin: 0;
50
+ padding: 0;
51
+ margin-top: calc(-1 * var(--lumo-tooltip-size) / 6);
52
+ cursor: pointer;
53
+ }
54
+
55
+ [part='content'] {
56
+ box-sizing: border-box;
57
+ width: 100%;
58
+ }
59
+
60
+ [part='container'] {
61
+ display: flex;
62
+ padding: calc(var(--lumo-tooltip-size) / 6) calc(var(--lumo-tooltip-size) / 4);
63
+ color: var(--lumo-body-text-color);
64
+ background-color: var(--lumo-base-color);
65
+ border-radius: var(--lumo-border-radius);
66
+ box-shadow: var(--lumo-box-shadow-xs);
67
+ }
68
+
69
+ :host([hidden]) [part='content'] {
70
+ display: none !important;
71
+ }
72
+
73
+ :host ::slotted(*) {
74
+ box-sizing: border-box;
75
+ }
76
+
77
+ @keyframes tooltipFadeIn {
78
+ 0% {
79
+ opacity: 0;
80
+ }
81
+ 100% {
82
+ opacity: 1;
83
+ }
84
+ }
85
+ </style>
86
+
87
+ <div part="container" theme$="[[theme]]">
88
+ <div part="content">
89
+ <slot></slot>
90
+ </div>
91
+ <vaadin-button part="close-button" theme="icon tertiary small" on-click="hide" title="Close tooltip">
92
+ <iron-icon icon="lumo:cross"></iron-icon>
93
+ </vaadin-button>
94
+ </div>
95
+ `}static get is(){return"vcf-tooltip"}static get version(){return"1.3.15"}static get properties(){return{for:{type:String},position:{type:String,value:"top"},align:{type:String,value:"center"},hidden:{type:Boolean,value:!0,notify:!0,reflectToAttribute:!0,observer:"_hiddenChanged"},manual:{type:Boolean,value:!1,reflectToAttribute:!0},targetElement:{type:Object,observer:"_attachToTarget"},closeButton:{type:Boolean,value:!1,reflectToAttribute:!0},theme:{type:String,reflectToAttribute:!0}}}static get observers(){return["_setPosition(targetElement, hidden, position, align)","_updateTarget(for)","_manualObserver(manual)"]}constructor(){super(),this._boundShow=this.show.bind(this),this._boundHide=this.hide.bind(this),this._boundOnKeyup=this._onKeyup.bind(this)}connectedCallback(){super.connectedCallback(),this._attachToTarget(),this._setDefaultId()}ready(){super.ready(),window.addEventListener("resize",(()=>{clearTimeout(this._resizeTimeout),this._resizeTimeout=setTimeout((()=>{const{targetElement:t,hidden:e,position:i}=this;this.hidden||this._setPosition(t,e,i)}),100)})),this.getAttribute("theme")||this.setAttribute("theme","dark")}disconnectedCallback(){super.disconnectedCallback(),this._detachFromTarget()}_manualObserver(){this.manual?this._removeEvents():this._addEvents()}_attachToTarget(t,e){e&&(this._removeTargetEvents(e),e.describedby&&(e.removeAttribute("aria-describedby"),delete e.describedby)),t&&(this._addEvents(),t.getAttribute("aria-describedby")||(t.setAttribute("aria-describedby",this.id),t.describedby=!0))}_addEvents(){this.targetElement&&!this.manual&&(this.targetElement.addEventListener("mouseenter",this._boundShow),this.targetElement.addEventListener("focus",this._boundShow),this.targetElement.addEventListener("mouseleave",this._boundHide),this.targetElement.addEventListener("blur",this._boundHide),this.targetElement.addEventListener("tap",this._boundHide)),this.manual||(this.addEventListener("mouseenter",this._boundShow),this.addEventListener("mouseleave",this._boundHide))}_detachFromTarget(){this.manual||this._removeEvents(),this.targetElement&&this.targetElement.describedby&&(this.targetElement.removeAttribute("aria-describedby"),delete this.targetElement.describedby)}_removeEvents(){this.targetElement&&this._removeTargetEvents(this.targetElement),this.removeEventListener("mouseenter",this._boundShow),this.removeEventListener("mouseleave",this._boundHide)}_removeTargetEvents(t){t.removeEventListener("mouseenter",this._boundShow),t.removeEventListener("focus",this._boundShow),t.removeEventListener("mouseleave",this._boundHide),t.removeEventListener("blur",this._boundHide),t.removeEventListener("tap",this._boundHide)}_updateTarget(){this.targetElement=this.parentNode.querySelector(`#${this.for}`)}_setPosition(t,e,i){if(t&&!e){let t=window.innerHeight,e=window.innerWidth;this.offsetParent&&(t=this.offsetParent.scrollHeight,e=this.offsetParent.scrollWidth);const s=this.targetElement.getBoundingClientRect(),o=this.getBoundingClientRect(),n=(s.width-o.width)/2,r=(s.height-o.height)/2;let a,d,l=s.left,c=s.top,h=window.pageYOffset;switch(this._parentPostioned&&(c=this.targetElement.offsetTop,l=this.targetElement.offsetLeft,h=0),i){case"top":d=c-o.height+h,a=this._calculateLeft(l,s,o,n);break;case"bottom":d=c+s.height+h,a=this._calculateLeft(l,s,o,n);break;case"left":a=l-o.width,d=this._calculateTop(c,s,o,r,h);break;case"right":a=l+s.width,d=this._calculateTop(c,s,o,r,h)}this._setPositionInVisibleBounds(t,e,a,d,o)}}get _parentPostioned(){return"static"!==window.getComputedStyle(this.offsetParent).position}_setPositionInVisibleBounds(t,e,i,s,o){i+o.width>e?(this.style.right="0px",this.style.left="auto"):(this.style.left=Math.max(0,i)+"px",this.style.right="auto"),s+o.height>t?(this.style.bottom=t+"px",this.style.top="auto"):(this.style.top=Math.max(0,s)+"px",this.style.bottom="auto")}_calculateLeft(t,e,i,s){switch(this.align){case"left":return t;case"right":return e.left+e.width-i.width;default:return t+s}}_calculateTop(t,e,i,s,o){switch(this.align){case"top":return t+o;case"bottom":return t+e.height-i.height+o;default:return t+s+o}}show(){this.hidden=!1}hide(){this.hidden=!0}_hiddenChanged(t){t?(this.setAttribute("aria-hidden",!0),window.removeEventListener("keyup",this._boundOnKeyup)):(this.setAttribute("aria-hidden",!1),window.addEventListener("keyup",this._boundOnKeyup))}_onKeyup(t){27===t.keyCode&&this.hide()}_setDefaultId(){this.id||(Vaadin.tooltipIndex||(Vaadin.tooltipIndex=0),this.id="vcf-tooltip"+ ++Vaadin.tooltipIndex)}}customElements.define(u.is,u),window.Vaadin.VcfTooltip=u;let m,p,f,v,b,y,_,g,x,E,w,$,T,S,j=t=>t;const k=l(n(c,"transaction-card"));class L extends k{constructor(){super(...arguments),this.templates={},this.__currencyDisplay=""}renderBody(){var t,e;const i=this.hiddenSelector,s=!i.matches("total",!0),o=!i.matches("status",!0);return a(m||(m=j` <div aria-busy="${0}" aria-live="polite" class="relative leading-s font-lumo text-m"> <div class="${0}"> ${0} ${0} ${0} </div> <div class="${0}"> <foxy-spinner data-testid="spinner" state="${0}" class="m-auto" lang="${0}" ns="${0} ${0}"> </foxy-spinner> </div> </div> `),this.in("busy"),h({"transition-opacity":!0,"opacity-0":!this.data}),s||o?a(p||(p=j` <div class="flex items-center justify-between gap-s"> ${0} ${0} </div> `),s?this.__renderIdAndTotal():"",o?this.__renderStatus():""):"",i.matches("description",!0)?"":this.__renderSummary(),i.matches("customer",!0)?"":this.__renderCustomer(),h({"pointer-events-none absolute inset-0 flex transition-opacity":!0,"opacity-0":!!this.data}),this.in("fail")?"error":this.in({idle:"template"})?"empty":"busy",this.lang,this.ns,null!==(e=null===(t=customElements.get("foxy-spinner"))||void 0===t?void 0:t.defaultNS)&&void 0!==e?e:"")}async _sendGet(){var t;const e=await super._sendGet(),i=null===(t=e._links["fx:store"])||void 0===t?void 0:t.href;if("string"==typeof i){const t=await super._fetch(i);this.__currencyDisplay=t.use_international_currency_symbol?"code":"symbol"}else this.__currencyDisplay="symbol";return e}__renderIdAndTotal(){const t=this.data;let e;if(t){const i={amount:`${t.total_order} ${t.currency_code}`,currencyDisplay:this.__currencyDisplay};e=a(f||(f=j` <span class="truncate">ID ${0}</span> ${0} `),t.display_id||d(t._links.self.href),"updateinfo"!==t.type&&"subscription_cancellation"!==t.type?a(v||(v=j` <span>&bull;</span> <foxy-i18n .options="${0}" infer="" key="price"></foxy-i18n> `),i):"")}else e=a(b||(b=j`&ZeroWidthSpace;`));return a(y||(y=j` <div class="min-w-0" data-testid="total"> ${0} <div class="font-medium flex items-center gap-xs">${0}</div> ${0} </div> `),this.renderTemplateOrSlot("total:before"),e,this.renderTemplateOrSlot("total:after"))}__renderStatus(){var t,e,i,s,o,n;const r=(null===(t=this.data)||void 0===t?void 0:t.status)||"completed",d=null===(i=null===(e=this.data)||void 0===e?void 0:e.source)||void 0===i?void 0:i.substring(0,3).toUpperCase();return a(_||(_=j` <div class="flex-shrink-0" data-testid="status"> ${0} <div class="text-tertiary text-s flex items-center space-x-xs"> ${0} <foxy-i18n options="${0}" lang="${0}" key="time" ns="${0}"> </foxy-i18n> <iron-icon data-testid="status-icon" class="icon-inline cursor-default text-l ${0}" id="status" icon="${0}"> </iron-icon> <vcf-tooltip for="status" theme="light" position="top"> <foxy-i18n infer="" key="status_${0}"></foxy-i18n> </vcf-tooltip> </div> ${0} </div> `),this.renderTemplateOrSlot("status:before"),d?a(g||(g=j` <vcf-tooltip for="source" theme="light" position="top"> <foxy-i18n infer="" key="source_${0}"></foxy-i18n> </vcf-tooltip> <span class="cursor-default" id="source">${0}</span> `),d,d):"",JSON.stringify({value:null===(s=this.data)||void 0===s?void 0:s.transaction_date}),this.lang,this.ns,null!==(o={authorized:"text-success",completed:"text-success",capturing:"text-success",captured:"text-success",approved:"text-success",pending:"text-success",pending_fraud_review:"text-error",declined:"text-error",rejected:"text-error",problem:"text-error"}[r])&&void 0!==o?o:"text-tertiary",null!==(n={authorized:"icons:done",capturing:"icons:done",captured:"icons:done",approved:"icons:done",pending:"icons:done",completed:"icons:done-all",pending_fraud_review:"icons:info-outline",declined:"icons:highlight-off",rejected:"icons:highlight-off",problem:"icons:info-outline",refunded:"icons:restore",voided:"icons:remove-circle-outline"}[r])&&void 0!==n?n:"icons:schedule",r,this.renderTemplateOrSlot("status:after"))}__renderSummary(){var t,e,i;const s=null===(e=null===(t=this.data)||void 0===t?void 0:t._embedded)||void 0===e?void 0:e["fx:items"],o=null===(i=this.data)||void 0===i?void 0:i.type;let n,r;if(r="updateinfo"===o?"summary_payment_method_change":"subscription_modification"===o?"summary_subscription_modification":"subscription_cancellation"===o?"summary_subscription_cancellation":"summary",s){const t={most_expensive_item:[...s].sort(((t,e)=>t.price-e.price))[0],count_minus_one:s.length-1,count:s.length};n=a(x||(x=j`<foxy-i18n .options="${0}" infer="" key="${0}"></foxy-i18n>`),t,r)}else n=a(E||(E=j`&ZeroWidthSpace;`));return a(w||(w=j` <div data-testid="description"> ${0} <div class="text-s text-secondary truncate">${0}</div> ${0} </div> `),this.renderTemplateOrSlot("description:before"),n,this.renderTemplateOrSlot("description:after"))}__renderCustomer(){const t=this.data,e=t?a($||($=j`${0} ${0} (${0})`),t.customer_first_name,t.customer_last_name,t.customer_email):a(T||(T=j`&ZeroWidthSpace;`));return a(S||(S=j` <div data-testid="customer"> ${0} <div class="text-tertiary truncate text-s">${0}</div> ${0} </div> `),this.renderTemplateOrSlot("customer:before"),e,this.renderTemplateOrSlot("customer:after"))}}customElements.define("foxy-transaction-card",L);export{L as TransactionCard};
@@ -1 +1 @@
1
- import"./foxy-attribute-card.js";import"./foxy-attribute-form.js";import"./foxy-custom-field-form.js";import"./foxy-custom-field-card.js";import"./foxy-applied-tax-card.js";import"./foxy-discount-card.js";import"./foxy-shipment-card.js";import"./foxy-payment-card.js";import"./foxy-item-form.js";import"./shared-51a5af7e.js";import"./shared-2f082f50.js";import{I as t}from"./shared-870074ff.js";import{I as o}from"./shared-702eae16.js";import"./foxy-customer-card.js";import"./foxy-form-dialog.js";import"./foxy-customer.js";import{h as r,c as e}from"./shared-7f33a83a.js";import{i}from"./shared-d3bf9ac0.js";import"./shared-732bee4b.js";import"./shared-4e05dfb4.js";import{_ as s,B as n}from"./shared-4c2e9064.js";import{N as a}from"./shared-9b12aeac.js";import{a as d}from"./shared-662c576b.js";import"./shared-417ab233.js";import"./shared-fe927c53.js";import"./shared-f3b8de28.js";import"./shared-f9180815.js";import"./foxy-spinner.js";import"./shared-fd96bcd1.js";import"./shared-343d1fd7.js";import"./shared-5cf7b194.js";import"./shared-4e709717.js";import"./shared-35728235.js";import"./shared-3ab0306f.js";import"./shared-e8a51c60.js";import"./shared-53d66db2.js";import"./shared-e3096241.js";import"./shared-7d933f9d.js";import"./shared-e60dc924.js";import"./shared-6e704d83.js";import"./shared-5742a841.js";import"./shared-c00049b2.js";import"./shared-fc99076a.js";import"./shared-1dbad347.js";import"./shared-96215749.js";import"./shared-71b3559f.js";import"./shared-11c2efc8.js";import"./shared-8c681381.js";import"./shared-e2db3ab5.js";import"./shared-7b771301.js";import"./shared-1313f293.js";import"./shared-fed6cd4d.js";import"./shared-9771ef0f.js";import"./shared-468de081.js";import"./shared-112dbca7.js";import"./shared-074a74c3.js";import"./foxy-item-card.js";import"./shared-26dea180.js";import"./foxy-nucleon-element.js";import"./shared-fff7db77.js";import"./shared-21293163.js";import"./shared-e312da08.js";import"./foxy-collection-page.js";import"./shared-d519a301.js";import"./foxy-swipe-actions.js";import"./foxy-pagination.js";import"./shared-8771fb61.js";import"./shared-f1b36324.js";import"./foxy-discount-detail-card.js";import"./foxy-coupon-detail-card.js";import"./foxy-item-option-card.js";import"./foxy-item-option-form.js";import"./foxy-coupon-card.js";import"./shared-da5e32c1.js";import"./foxy-discount-builder.js";import"./shared-bb05cfed.js";import"./shared-5d718eaf.js";import"./shared-d01f42d0.js";import"./shared-79d0699c.js";import"./shared-e79b5765.js";import"./foxy-subscription-card.js";import"./shared-5e932eb5.js";import"./foxy-subscription-form.js";import"./foxy-cancellation-form.js";import"./foxy-transaction-card.js";import"./shared-e006e82c.js";import"./shared-800ee6c0.js";import"./shared-d7be11de.js";import"./foxy-payment-method-card.js";import"./foxy-transactions-table.js";import"./shared-131988fc.js";import"./foxy-collection-pages.js";import"./foxy-customer-form.js";import"./shared-cb9cdc88.js";import"./shared-783f5705.js";import"./shared-4c3cb511.js";import"./shared-b738ee96.js";import"./foxy-address-card.js";import"./foxy-address-form.js";import"./foxy-table.js";import"./shared-c320cfef.js";let l,c=t=>t;customElements.define("foxy-internal-transaction-customer-control",class extends o{renderControl(){var t,o,e,s;return r(l||(l=c` <foxy-internal-details summary="customer" infer="" open> <foxy-form-dialog header="header" infer="dialog" form="foxy-customer" href="${0}" id="dialog"> </foxy-form-dialog> <button class="w-full text-left block rounded-b-l transition-colors hover-bg-contrast-5 focus-outline-none focus-ring-2 focus-ring-primary-50" @click="${0}"> <foxy-customer-card infer="card" class="p-m" href="${0}"> </foxy-customer-card> </button> </foxy-internal-details> `),i(null===(o=null===(t=this.nucleon)||void 0===t?void 0:t.data)||void 0===o?void 0:o._links["fx:customer"].href),(t=>{this.renderRoot.querySelector("#dialog").show(t.currentTarget)}),i(null===(s=null===(e=this.nucleon)||void 0===e?void 0:e.data)||void 0===s?void 0:s._links["fx:customer"].href))}});let f,m=t=>t;customElements.define("foxy-internal-transaction-post-action-control",class extends o{constructor(){super(...arguments),this.theme=null,this.href=null,this.__state="idle"}static get properties(){return s(s({},super.properties),{},{__state:{type:String},theme:{type:String},href:{type:String}})}renderControl(){const t=this.__state,o="fail"===t?"error":"idle"===t?this.theme:"";return r(f||(f=m` <foxy-internal-confirm-dialog header="header" infer="confirm" id="confirm" @hide="${0}"> </foxy-internal-confirm-dialog> <vaadin-button class="w-full" theme="${0} tertiary" ?disabled="${0}" @click="${0}"> <foxy-i18n key="${0}" infer=""></foxy-i18n> </vaadin-button> `),(t=>!t.detail.cancelled&&this.__submit()),o,"busy"===t||this.disabled,(t=>{this.renderRoot.querySelector("#confirm").show(t.currentTarget)}),t)}async __submit(){var t;if("busy"!==this.__state)try{this.__state="busy";const o=new a.API(this),r=await o.fetch(null!==(t=this.href)&&void 0!==t?t:"",{method:"POST"});this.__state=r.ok?"idle":"fail",r.ok&&this.dispatchEvent(new CustomEvent("done"))}catch(t){this.__state="fail"}}});let u,p,h,y,x,v=t=>t;customElements.define("foxy-internal-transaction-actions-control",class extends o{renderControl(){var t,o,e,i,s,n,a,d;return r(u||(u=v` <div class="divide-y divide-contrast-10"> ${0} ${0} ${0} ${0} </div> `),(null===(o=null===(t=this.nucleon)||void 0===t?void 0:t.data)||void 0===o?void 0:o._links["fx:capture"])?this.__renderCaptureAction():"",(null===(i=null===(e=this.nucleon)||void 0===e?void 0:e.data)||void 0===i?void 0:i._links["fx:void"])?this.__renderVoidAction():"",(null===(n=null===(s=this.nucleon)||void 0===s?void 0:s.data)||void 0===n?void 0:n._links["fx:refund"])?this.__renderRefundAction():"",(null===(d=null===(a=this.nucleon)||void 0===a?void 0:a.data)||void 0===d?void 0:d._links["fx:send_emails"])?this.__renderSendEmailsAction():"")}__renderSendEmailsAction(){var t,o;return r(p||(p=v` <foxy-internal-transaction-post-action-control infer="send-emails" theme="contrast" href="${0}" @done="${0}"> </foxy-internal-transaction-post-action-control> `),i(null===(o=null===(t=this.nucleon)||void 0===t?void 0:t.data)||void 0===o?void 0:o._links["fx:send_emails"].href),(()=>{var t;return null===(t=this.nucleon)||void 0===t?void 0:t.refresh()}))}__renderCaptureAction(){var t,o;return r(h||(h=v` <foxy-internal-transaction-post-action-control theme="success" infer="capture" href="${0}" @done="${0}"> </foxy-internal-transaction-post-action-control> `),i(null===(o=null===(t=this.nucleon)||void 0===t?void 0:t.data)||void 0===o?void 0:o._links["fx:capture"].href),(()=>{var t;return null===(t=this.nucleon)||void 0===t?void 0:t.refresh()}))}__renderVoidAction(){var t,o,e;return r(y||(y=v` <foxy-internal-transaction-post-action-control theme="error" infer="void" href="${0}" @done="${0}"> </foxy-internal-transaction-post-action-control> `),i(null===(e=null===(o=null===(t=this.nucleon)||void 0===t?void 0:t.data)||void 0===o?void 0:o._links["fx:void"])||void 0===e?void 0:e.href),(()=>{var t;return null===(t=this.nucleon)||void 0===t?void 0:t.refresh()}))}__renderRefundAction(){var t,o,e;return r(x||(x=v` <foxy-internal-transaction-post-action-control theme="contrast" infer="refund" href="${0}" @done="${0}"> </foxy-internal-transaction-post-action-control> `),i(null===(e=null===(o=null===(t=this.nucleon)||void 0===t?void 0:t.data)||void 0===o?void 0:o._links["fx:refund"])||void 0===e?void 0:e.href),(()=>{var t;return null===(t=this.nucleon)||void 0===t?void 0:t.refresh()}))}});let j,_,b,$,g,k,w,S,A,E=t=>t;customElements.define("foxy-internal-transaction-summary-control",class extends o{renderControl(){var t;return r(j||(j=E` <div class="border-t border-transparent"> <div class="h-m flex items-center justify-between"> <div class="text-xl font-medium">${0}</div> <div>${0}</div> </div> <div class="border-t border-contrast-10 mb-s"></div> ${0} </div> `),this.__renderPrice(),(null===(t=this.nucleon)||void 0===t?void 0:t.data)?this.__renderStatus():"",this.__renderTotals())}__renderStatus(){var t,o;const e={authorized:"bg-success text-success-contrast",completed:"bg-success text-success-contrast",declined:"bg-error text-error-contrast",rejected:"bg-error text-error-contrast"},i=(null===(o=null===(t=this.nucleon)||void 0===t?void 0:t.data)||void 0===o?void 0:o.status)||"completed";return r(_||(_=E` <foxy-i18n class="flex items-center h-xs px-s text-s font-medium rounded ${0}" infer="" key="transaction_${0}"> </foxy-i18n> `),i in e?e[i]:"bg-contrast-5 text-contrast",i)}__renderPrice(){var t;const o=null===(t=this.nucleon)||void 0===t?void 0:t.data,e=null==o?void 0:o.currency_code;if(!o)return r(b||(b=E`--`));const i={amount:`${o.total_order} ${e}`};return r($||($=E`<foxy-i18n infer="" key="price" .options="${0}"></foxy-i18n>`),i)}__renderTotals(){var t,o;const e=null===(t=this.nucleon)||void 0===t?void 0:t.data,i=null===(o=null==e?void 0:e._embedded)||void 0===o?void 0:o["fx:discounts"],s=null==i?void 0:i.reduce(((t,o)=>t+o.amount),0),n=null==e?void 0:e.currency_code;return r(g||(g=E` ${0} ${0} `),["total_item_price","total_shipping","total_tax"].map((t=>{const o={amount:`${null==e?void 0:e[t]} ${n}`};return r(k||(k=E` <div class="flex justify-between text-m text-secondary"> <foxy-i18n key="${0}" infer=""></foxy-i18n> ${0} </div> `),t,e?r(w||(w=E`<foxy-i18n infer="" key="price" .options="${0}"></foxy-i18n>`),o):r(S||(S=E`<span>--</span>`)))})),s?r(A||(A=E` <div class="flex justify-between text-m text-secondary"> <foxy-i18n key="total_discount" infer=""></foxy-i18n> <foxy-i18n infer="" key="${0}" .options="${0}"> </foxy-i18n> </div> `),20===(null==i?void 0:i.length)?"total_discount_see_below":"price",{amount:`${s} ${n}`}):"")}});let C,T,P=t=>t;class R extends(d(t,"transaction")){static get styles(){return[...super.styles,e(C||(C=P`#body{display:grid;grid-template-columns:repeat(auto-fill,minmax(calc(18.75 * var(--lumo-space-m)),1fr))}#body>:first-child{grid-column-start:1;grid-column-end:-2}`))]}get readonlySelector(){var t,o,r;return Boolean(null!==(o=null===(t=this.data)||void 0===t?void 0:t._links["fx:void"])&&void 0!==o?o:null===(r=this.data)||void 0===r?void 0:r._links["fx:refund"])?super.readonlySelector:new n(`${super.readonlySelector} attributes custom-fields`)}renderBody(){var t,o,e,s,n,a;return r(T||(T=P` <div id="body" class="gap-m"> <foxy-internal-async-details-control infer="shipments" first="${0}" item="foxy-shipment-card" open> </foxy-internal-async-details-control> <div class="grid gap-m self-start"> <foxy-internal-transaction-summary-control infer="summary"> </foxy-internal-transaction-summary-control> <foxy-internal-transaction-customer-control infer="customer"> </foxy-internal-transaction-customer-control> <foxy-internal-async-details-control infer="payments" class="max-w-full overflow-hidden" first="${0}" limit="1" item="foxy-payment-card" open> </foxy-internal-async-details-control> <foxy-internal-async-details-control infer="discounts" first="${0}" limit="5" item="foxy-discount-card"> </foxy-internal-async-details-control> <foxy-internal-async-details-control infer="applied-taxes" first="${0}" limit="5" item="foxy-applied-tax-card"> </foxy-internal-async-details-control> <foxy-internal-async-details-control infer="custom-fields" first="${0}" limit="5" form="foxy-custom-field-form" item="foxy-custom-field-card" .related="${0}"> </foxy-internal-async-details-control> <foxy-internal-async-details-control infer="attributes" first="${0}" limit="5" form="foxy-attribute-form" item="foxy-attribute-card" .related="${0}"> </foxy-internal-async-details-control> <foxy-internal-transaction-actions-control infer="actions"> </foxy-internal-transaction-actions-control> </div> </div> `),i(null===(t=this.data)||void 0===t?void 0:t._links["fx:shipments"].href),i(null===(o=this.data)||void 0===o?void 0:o._links["fx:payments"].href),i(null===(e=this.data)||void 0===e?void 0:e._links["fx:discounts"].href),i(null===(s=this.data)||void 0===s?void 0:s._links["fx:applied_taxes"].href),i(null===(n=this.data)||void 0===n?void 0:n._links["fx:custom_fields"].href),[this.href],i(null===(a=this.data)||void 0===a?void 0:a._links["fx:attributes"].href),[this.href])}}customElements.define("foxy-transaction",R);export{R as Transaction};
1
+ import"./foxy-billing-address-card.js";import"./foxy-attribute-card.js";import"./foxy-attribute-form.js";import"./foxy-custom-field-form.js";import"./foxy-custom-field-card.js";import"./foxy-copy-to-clipboard.js";import"./foxy-shipment-card.js";import"./foxy-payment-card.js";import"./foxy-item-card.js";import"./foxy-item-form.js";import"./shared-029816d7.js";import"./shared-8201d0b5.js";import{I as t}from"./shared-ff8ca16b.js";import{I as e}from"./shared-fc15a882.js";import"./foxy-customer-card.js";import"./foxy-swipe-actions.js";import"./foxy-spinner.js";import{_ as i,B as o}from"./shared-1522d76f.js";import{g as s}from"./shared-bab2ea2c.js";import{i as r}from"./shared-d3bf9ac0.js";import{h as n,s as a}from"./shared-7f33a83a.js";import{c as d}from"./shared-4e709717.js";import"./shared-c7b3d22b.js";import"./shared-d21fa1a6.js";import{N as l}from"./shared-6a7f96c4.js";import"./foxy-nucleon-element.js";import{R as c,a as u}from"./shared-5fa697c4.js";import"./shared-2cf08dd4.js";import"./shared-e91453df.js";import"./shared-ff9791cf.js";import"./shared-43f449bb.js";import"./shared-30d00b64.js";import"./shared-30cbf0a6.js";import"./shared-343d1fd7.js";import"./shared-07e9d1fb.js";import"./shared-3ab0306f.js";import"./shared-eb116b3e.js";import"./shared-f9180815.js";import"./shared-b23c903e.js";import"./shared-9df8f842.js";import"./shared-f9a3d1ff.js";import"./shared-c9ba1b64.js";import"./shared-b509bc2c.js";import"./shared-61ade33e.js";import"./shared-9c08cfab.js";import"./shared-e39807f8.js";import"./shared-ea527e98.js";import"./shared-99c0ae04.js";import"./shared-ad34b6db.js";import"./shared-4e59fd48.js";import"./shared-2c8c4b43.js";import"./shared-11c2efc8.js";import"./shared-268571df.js";import"./shared-4c124efc.js";import"./shared-2b27e2e7.js";import"./shared-a8dc23f1.js";import"./shared-2bdc99f4.js";import"./shared-4462dc70.js";import"./shared-e83f2983.js";import"./shared-293771ba.js";import"./shared-d7be11de.js";import"./shared-4c650e5c.js";import"./shared-7dd17943.js";import"./shared-bed7aae1.js";import"./shared-8952aeac.js";import"./shared-54b0e48f.js";import"./shared-7e1953f5.js";import"./shared-6a9ae42e.js";import"./shared-20ba4cdc.js";import"./shared-ac7c5a5e.js";import"./shared-79d0699c.js";import"./shared-43e2c3f6.js";import"./foxy-discount-detail-card.js";import"./foxy-coupon-detail-card.js";import"./foxy-discount-builder.js";import"./shared-d519a301.js";import"./shared-bb05cfed.js";import"./foxy-item-option-card.js";import"./foxy-item-option-form.js";import"./foxy-collection-page.js";import"./foxy-form-dialog.js";import"./foxy-pagination.js";let p,m,f,h,_=t=>t;customElements.define("foxy-internal-transaction-customer-control",class extends e{constructor(){super(...arguments),this.__copyEmailState="idle",this.__copyIdState="idle"}static get properties(){return i(i({},super.properties),{},{__copyEmailState:{attribute:!1},__copyIdState:{attribute:!1}})}renderControl(){var t,e,i,o;const l=this.nucleon,c=null===(t=null==l?void 0:l.data)||void 0===t?void 0:t._links["fx:customer"].href,u=c?null===(e=null==l?void 0:l.getCustomerPageHref)||void 0===e?void 0:e.call(l,c):void 0;return n(p||(p=_` <foxy-i18n infer="" class="block text-s font-medium leading-xs mb-xs" key="label"> </foxy-i18n> <foxy-swipe-actions> <a class="${0}" style="padding:calc(.625em + (var(--lumo-border-radius)/ 4) - 1px)" href="${0}"> <foxy-customer-card infer="" href="${0}"></foxy-customer-card> </a> <div class="h-full grid grid-cols-2 gap-s ml-s" slot="action"> ${0} ${0} </div> </foxy-swipe-actions> `),d({"block ring-inset rounded transition-colors":!0,"ring-1 ring-contrast-10":!u,"cursor-pointer bg-contrast-5 hover-bg-contrast-10":!!u,"focus-outline-none focus-ring-2 focus-ring-primary-50":!!u}),r(u),r(c),this.__renderCopyAction(a(m||(m=_`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" style="width: 1.2rem; height: 1.2rem"><path fill-rule="evenodd" d="M9.493 2.852a.75.75 0 0 0-1.486-.204L7.545 6H4.198a.75.75 0 0 0 0 1.5h3.14l-.69 5H3.302a.75.75 0 0 0 0 1.5h3.14l-.435 3.148a.75.75 0 0 0 1.486.204L7.955 14h2.986l-.434 3.148a.75.75 0 0 0 1.486.204L12.456 14h3.346a.75.75 0 0 0 0-1.5h-3.14l.69-5h3.346a.75.75 0 0 0 0-1.5h-3.14l.435-3.148a.75.75 0 0 0-1.486-.204L12.045 6H9.059l.434-3.148ZM8.852 7.5l-.69 5h2.986l.69-5H8.852Z" clip-rule="evenodd" /></svg>`)),"copy_id_caption","__copyIdState",c?String(s(c)):""),this.__renderCopyAction(a(f||(f=_`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" style="width: 1.2rem; height: 1.2rem"><path fill-rule="evenodd" d="M5.404 14.596A6.5 6.5 0 1 1 16.5 10a1.25 1.25 0 0 1-2.5 0 4 4 0 1 0-.571 2.06A2.75 2.75 0 0 0 18 10a8 8 0 1 0-2.343 5.657.75.75 0 0 0-1.06-1.06 6.5 6.5 0 0 1-9.193 0ZM10 7.5a2.5 2.5 0 1 0 0 5 2.5 2.5 0 0 0 0-5Z" clip-rule="evenodd" /></svg>`)),"copy_email_caption","__copyEmailState",null!==(o=null===(i=null==l?void 0:l.data)||void 0===i?void 0:i.customer_email)&&void 0!==o?o:""))}__renderCopyAction(t,e,i,o){const s=this[i],r="fail"===s?"error":"done"===s?"end":"busy";return n(h||(h=_` <button class="relative transition-colors bg-contrast-5 text-body hover-bg-contrast-10 rounded h-full py-0 px-m focus-outline-none focus-ring-2 focus-ring-inset focus-ring-primary-50" ?disabled="${0}" @click="${0}" @focusout="${0}" @mouseout="${0}"> <div class="${0}"> ${0} <foxy-i18n class="mt-xs text-s font-medium leading-none" infer="" key="${0}"> </foxy-i18n> </div> <div class="${0}"> <foxy-spinner layout="no-label" state="${0}" infer="spinner"> </foxy-spinner> </div> </button> `),"idle"!==s,(()=>"idle"===s&&this.__copy(o,i)),(t=>"idle"!==s&&t.stopPropagation()),(t=>"idle"!==s&&t.stopPropagation()),d({"relative flex flex-col items-center justify-center transition-opacity":!0,"opacity-0":"idle"!==s}),t,e,d({"absolute inset-0 flex items-center justify-center transition-opacity":!0,"opacity-0":"idle"===s}),r)}async __copy(t,e){this[e]="busy";try{await navigator.clipboard.writeText(t),this[e]="done"}catch(t){this[e]="fail"}setTimeout((()=>this[e]="idle"),3e3)}});let y,v=t=>t;customElements.define("foxy-internal-transaction-post-action-control",class extends e{constructor(){super(...arguments),this.theme=null,this.href=null,this.__state="idle"}static get properties(){return i(i({},super.properties),{},{__state:{type:String},theme:{type:String},href:{type:String}})}renderControl(){const t=this.__state,e="fail"===t?"error":"idle"===t?this.theme:"";return n(y||(y=v` <foxy-internal-confirm-dialog header="header" infer="confirm" id="confirm" @hide="${0}"> </foxy-internal-confirm-dialog> <vaadin-button class="w-full" theme="${0} tertiary-inline" ?disabled="${0}" @click="${0}"> <foxy-i18n key="${0}" infer=""></foxy-i18n> </vaadin-button> `),(t=>!t.detail.cancelled&&this.__submit()),e,"busy"===t||this.disabled,(t=>{this.renderRoot.querySelector("#confirm").show(t.currentTarget)}),t)}async __submit(){var t;if("busy"!==this.__state)try{this.__state="busy";const e=new l.API(this),i=await e.fetch(null!==(t=this.href)&&void 0!==t?t:"",{method:"POST"});this.__state=i.ok?"idle":"fail",i.ok&&this.dispatchEvent(new CustomEvent("done"))}catch(t){this.__state="fail"}}});let x,b,g,j,$,w,k=t=>t;customElements.define("foxy-internal-transaction-actions-control",class extends e{renderControl(){var t,e,i,o,s,r,a,d,l,c;return n(x||(x=k` <div class="flex flex-wrap gap-x-m gap-y-xs"> ${0} ${0} ${0} ${0} ${0} </div> `),(null===(e=null===(t=this.nucleon)||void 0===t?void 0:t.data)||void 0===e?void 0:e._links["fx:capture"])?this.__renderCaptureAction():"",(null===(o=null===(i=this.nucleon)||void 0===i?void 0:i.data)||void 0===o?void 0:o._links["fx:void"])?this.__renderVoidAction():"",(null===(r=null===(s=this.nucleon)||void 0===s?void 0:s.data)||void 0===r?void 0:r._links["fx:refund"])?this.__renderRefundAction():"",(null===(d=null===(a=this.nucleon)||void 0===a?void 0:a.data)||void 0===d?void 0:d._links["fx:send_emails"])?this.__renderSendEmailsAction():"",(null===(c=null===(l=this.nucleon)||void 0===l?void 0:l.data)||void 0===c?void 0:c._links["fx:subscription"])?this.__renderSubscriptionAction():"")}__renderSendEmailsAction(){var t,e;return n(b||(b=k` <foxy-internal-transaction-post-action-control infer="send-emails" href="${0}" @done="${0}"> </foxy-internal-transaction-post-action-control> `),r(null===(e=null===(t=this.nucleon)||void 0===t?void 0:t.data)||void 0===e?void 0:e._links["fx:send_emails"].href),(()=>{var t;return null===(t=this.nucleon)||void 0===t?void 0:t.refresh()}))}__renderCaptureAction(){var t,e;return n(g||(g=k` <foxy-internal-transaction-post-action-control theme="success" infer="capture" href="${0}" @done="${0}"> </foxy-internal-transaction-post-action-control> `),r(null===(e=null===(t=this.nucleon)||void 0===t?void 0:t.data)||void 0===e?void 0:e._links["fx:capture"].href),(()=>{var t;return null===(t=this.nucleon)||void 0===t?void 0:t.refresh()}))}__renderVoidAction(){var t,e,i;return n(j||(j=k` <foxy-internal-transaction-post-action-control theme="error" infer="void" href="${0}" @done="${0}"> </foxy-internal-transaction-post-action-control> `),r(null===(i=null===(e=null===(t=this.nucleon)||void 0===t?void 0:t.data)||void 0===e?void 0:e._links["fx:void"])||void 0===i?void 0:i.href),(()=>{var t;return null===(t=this.nucleon)||void 0===t?void 0:t.refresh()}))}__renderRefundAction(){var t,e,i;return n($||($=k` <foxy-internal-transaction-post-action-control infer="refund" href="${0}" @done="${0}"> </foxy-internal-transaction-post-action-control> `),r(null===(i=null===(e=null===(t=this.nucleon)||void 0===t?void 0:t.data)||void 0===e?void 0:e._links["fx:refund"])||void 0===i?void 0:i.href),(()=>{var t;return null===(t=this.nucleon)||void 0===t?void 0:t.refresh()}))}__renderSubscriptionAction(){var t,e,i;const o=this.nucleon,s=null===(e=null===(t=null==o?void 0:o.data)||void 0===t?void 0:t._links["fx:subscription"])||void 0===e?void 0:e.href,a=s?null===(i=null==o?void 0:o.getSubscriptionPageHref)||void 0===i?void 0:i.call(o,s):void 0;return n(w||(w=k` <a class="rounded text-m font-medium text-primary cursor-pointer transition-opacity hover-opacity-80 focus-outline-none focus-ring-2 focus-ring-primary-50" href="${0}"> <foxy-i18n infer="subscription" key="caption"></foxy-i18n> </a> `),r(a))}});let S,P,H,A,C,E,L,I,R,G,B=t=>t;customElements.define("foxy-internal-transaction-summary-control",class extends e{constructor(){super(...arguments),this.__storeLoaderId="storeLoader"}renderControl(){var t,e,i,o,s,a,d,l,c;const u=null===(t=this.nucleon)||void 0===t?void 0:t.data;if(!u)return n(S||(S=B``));const p=null!==(i=null===(e=null==u?void 0:u._embedded)||void 0===e?void 0:e["fx:applied_taxes"])&&void 0!==i?i:[],m=null!==(s=null===(o=u._embedded)||void 0===o?void 0:o["fx:shipments"])&&void 0!==s?s:[];return n(P||(P=B` <foxy-nucleon infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <p class="grid gap-x-s text-right text-s leading-m border-dashed border rounded border-contrast-20 whitespace-nowrap overflow-auto" style="padding:calc(.625em + (var(--lumo-border-radius)/ 4) - 2px);grid-template-columns:1fr min-content"> <span><foxy-i18n key="subtotal" infer=""></foxy-i18n>&colon;</span> <span>${0}</span> ${0} ${0} ${0} ${0} <span class="col-span-2 border-t border-dashed border-contrast-20 my-s"></span> <span class="col-span-2 flex gap-s justify-between items-center"> ${0} <span class="text-xl font-medium leading-xs"> <foxy-i18n infer="" key="total"></foxy-i18n>&colon; ${0} </span> </span> </p> `),r(this.__storeHref),this.__storeLoaderId,(()=>this.requestUpdate()),this.__renderPrice(u.total_item_price),0===m.length||0===u.total_shipping?n(H||(H=B` <span><foxy-i18n infer="" key="total_shipping"></foxy-i18n>&colon;</span> <span>${0} </span> `),this.__renderPrice(u.total_shipping,!0)):m.map((t=>n(A||(A=B` <span>${0}&colon;</span> <span>${0}</span> `),t.shipping_service_description,this.__renderPrice(t.total_shipping,!0)))),0===p.length||0===u.total_tax?n(C||(C=B` <span><foxy-i18n infer="" key="total_tax"></foxy-i18n>&colon;</span> <span>${0}</span> `),this.__renderPrice(u.total_tax,!0)):p.map((t=>n(E||(E=B` <span>${0}&colon;</span> <span>${0}</span> `),t.name,this.__renderPrice(t.amount,!0)))),null===(d=null===(a=null==u?void 0:u._embedded)||void 0===a?void 0:a["fx:applied_gift_card_codes"])||void 0===d?void 0:d.map((t=>{var e;return n(L||(L=B` <span>${0}&colon;</span> <span>${0}</span> `),t._embedded["fx:gift_card"].name,this.__renderPrice(null!==(e=t.balance_adjustment)&&void 0!==e?e:0,!0))})),null===(c=null===(l=null==u?void 0:u._embedded)||void 0===l?void 0:l["fx:discounts"])||void 0===c?void 0:c.map((t=>n(I||(I=B` <span data-testclass="discount">${0}&colon;</span> <span>${0}</span> `),t.name,this.__renderPrice(t.amount,!0)))),this.__renderStatus(),this.__renderPrice(u.total_order))}get __storeHref(){var t,e,i;return null===(i=null===(e=null===(t=this.nucleon)||void 0===t?void 0:t.data)||void 0===e?void 0:e._links["fx:store"])||void 0===i?void 0:i.href}get __store(){var t,e;const i=`#${this.__storeLoaderId}`;return null!==(e=null===(t=this.renderRoot.querySelector(i))||void 0===t?void 0:t.data)&&void 0!==e?e:null}__renderPrice(t,e=!1){var i,o,s;const r=(null===(i=this.__store)||void 0===i?void 0:i.use_international_currency_symbol)?"code":"symbol",a=null===(s=null===(o=this.nucleon)||void 0===o?void 0:o.data)||void 0===s?void 0:s.currency_code;return n(R||(R=B` <foxy-i18n class="${0}" infer="" key="price" .options="${0}"> </foxy-i18n> `),e&&0!==t?t>0?"text-success":"text-error":"",{currencyDisplay:r,signDisplay:e?"exceptZero":"auto",amount:`${t} ${a}`})}__renderStatus(){var t,e;const i=(null===(e=null===(t=this.nucleon)||void 0===t?void 0:t.data)||void 0===e?void 0:e.status)||"completed";let o="";return o=["capturing","captured","approved","authorized","pending"].includes(i)?"text-success bg-success-10":i&&"completed"!==i?["problem","pending_fraud_review","rejected","declined"].includes(i)?"text-error-contrast bg-error":"bg-contrast-5 text-body":"text-success-contrast bg-success",n(G||(G=B` <foxy-i18n infer="" class="${0} rounded-s py-xs px-s font-medium text-s leading-xs" key="status_${0}"></foxy-i18n> `),o,i)}});let Z,M,T=t=>t;const W=c(u(t,"transaction"));class q extends W{constructor(){super(...arguments),this.hostedPaymentGatewaysHelper=null,this.paymentGatewaysHelper=null,this.getSubscriptionPageHref=null,this.getCustomerPageHref=null}static get properties(){return i(i({},super.properties),{},{hostedPaymentGatewaysHelper:{attribute:"hosted-payment-gateways-helper"},paymentGatewaysHelper:{attribute:"payment-gateways-helper"},getSubscriptionPageHref:{attribute:!1},getCustomerPageHref:{attribute:!1}})}get readonlySelector(){var t,e,i;const s=Boolean(null!==(e=null===(t=this.data)||void 0===t?void 0:t._links["fx:void"])&&void 0!==e?e:null===(i=this.data)||void 0===i?void 0:i._links["fx:refund"]);return new o(s?`${super.readonlySelector} billing-addresses`:`${super.readonlySelector} billing-addresses items attributes custom-fields`)}get hiddenSelector(){var t,e;const i=["billing-addresses:dialog:delete billing-addresses:dialog:timestamps"],s=null===(t=this.data)||void 0===t?void 0:t.type;return(null===(e=this.data)||void 0===e?void 0:e._links["fx:subscription"])||i.push("subscription"),"subscription_modification"===s&&i.push("actions"),"updateinfo"===s&&i.push("not=customer,subscription,payments,custom-fields,attributes"),"subscription_cancellation"===s&&i.push("not=customer,subscription,custom-fields,attributes"),new o(`${super.hiddenSelector} ${i.join(" ")}`.trim())}renderBody(){var t,e,i,o,s,a,d,l,c,u,p,m,f;let h,_,y="subtitle";const v=this.hiddenSelector,x=null===(t=this.data)||void 0===t?void 0:t.source,b=null===(e=this.data)||void 0===e?void 0:e.type;if("updateinfo"===b?y=""===x||(null==x?void 0:x.startsWith("cit_"))?"subtitle_customer_changed_payment_method":"mit_uoe"===x?"subtitle_admin_changed_payment_method_with_uoe":"mit_api"===x?"subtitle_integration_changed_payment_method":"subtitle_admin_changed_payment_method":"subscription_modification"===b?y=""===x||(null==x?void 0:x.startsWith("cit_"))?"subtitle_customer_changed_subscription":"mit_uoe"===x?"subtitle_admin_changed_subscription_with_uoe":"mit_api"===x?"subtitle_integration_changed_subscription":"subtitle_admin_changed_subscription":"subscription_renewal"===b?"mit_recurring"===x?y="subtitle_subscription_renewal_attempt":"mit_recurring_reattempt_automated"===x?y="subtitle_subscription_renewal_automated_reattempt":"mit_recurring_reattempt_manual"===x&&(y="subtitle_subscription_renewal_manual_reattempt"):"subscription_cancellation"===b?"cit_recurring_cancellation"===x?y="subtitle_customer_canceled_subscription":"mit_recurring_cancellation"===x&&(y="subtitle_admin_canceled_subscription"):(null===(i=this.data)||void 0===i?void 0:i._links["fx:subscription"])?(null==x?void 0:x.startsWith("cit_"))?y="subtitle_customer_subscribed":"mit_uoe"===x?y="subtitle_admin_subscribed_with_uoe":"mit_api"===x&&(y="subtitle_integration_subscribed"):(null==x?void 0:x.startsWith("cit_"))?y="subtitle_customer_placed_order":"mit_uoe"===x?y="subtitle_admin_placed_order_with_uoe":"mit_api"===x&&(y="subtitle_integration_placed_order"),this.data)try{const t=new URL(this.data._links["fx:shipments"].href),e=new URL(this.data._links["fx:items"].href);t.searchParams.set("zoom","items:item_category"),e.searchParams.set("zoom","item_options"),h=t.toString(),_=e.toString()}catch(t){}return n(Z||(Z=T` <h2> <div class="flex items-center gap-s leading-xs text-xxl font-medium break-all"> <foxy-i18n infer="header" key="title" .options="${0}"></foxy-i18n> <foxy-copy-to-clipboard infer="header" class="inline-block text-m" text="${0}"> </foxy-copy-to-clipboard> </div> <foxy-i18n class="block leading-xs text-l text-secondary" infer="header" key="${0}" .options="${0}"> </foxy-i18n> <foxy-internal-transaction-actions-control class="mt-xs" infer="actions"> </foxy-internal-transaction-actions-control> </h2> ${0} <foxy-internal-transaction-customer-control infer="customer"> </foxy-internal-transaction-customer-control> <div class="grid gap-s" ?hidden="${0}"> <foxy-internal-async-list-control infer="items" class="min-w-0" first="${0}" limit="10" item="foxy-item-card" form="foxy-item-form" alert .related="${0}"> </foxy-internal-async-list-control> <foxy-internal-transaction-summary-control infer="summary" class="min-w-0"> </foxy-internal-transaction-summary-control> </div> <foxy-internal-async-list-control infer="billing-addresses" first="${0}" item="foxy-billing-address-card" form="foxy-address-form" hide-create-button hide-delete-button alert> </foxy-internal-async-list-control> <foxy-internal-async-list-control infer="payments" first="${0}" item="foxy-payment-card" .itemProps="${0}"> </foxy-internal-async-list-control> <div class="grid gap-m sm-grid-cols-2" ?hidden="${0}"> <foxy-internal-async-list-control infer="custom-fields" class="min-w-0" first="${0}" limit="5" form="foxy-custom-field-form" item="foxy-custom-field-card" alert> </foxy-internal-async-list-control> <foxy-internal-async-list-control infer="attributes" class="min-w-0" first="${0}" limit="5" form="foxy-attribute-form" item="foxy-attribute-card" alert> </foxy-internal-async-list-control> </div> <foxy-internal-async-list-control infer="shipments" first="${0}" item="foxy-shipment-card"> </foxy-internal-async-list-control> `),this.data,null===(o=this.data)||void 0===o?void 0:o.display_id,y,{transaction_date:null===(s=this.data)||void 0===s?void 0:s.transaction_date,ip_country:null===(a=this.data)||void 0===a?void 0:a.ip_country},["problem","pending_fraud_review","rejected","declined"].includes(null!==(l=null===(d=this.data)||void 0===d?void 0:d.status)&&void 0!==l?l:"")?n(M||(M=T` <p class="leading-xs text-body rounded bg-error-10 block" style="padding:calc(.625em + (var(--lumo-border-radius)/ 4) - 1px)"> <foxy-i18n infer="header" key="alert_status_${0}"></foxy-i18n> </p> `),null===(c=this.data)||void 0===c?void 0:c.status):"",v.matches("items",!0)&&v.matches("summary",!0),r(_),[this.href],r(null===(u=this.data)||void 0===u?void 0:u._links["fx:billing_addresses"].href),r(null===(p=this.data)||void 0===p?void 0:p._links["fx:payments"].href),{"hosted-payment-gateways-helper":this.hostedPaymentGatewaysHelper,"payment-gateways-helper":this.paymentGatewaysHelper},v.matches("custom-fields",!0)&&v.matches("attributes",!0),r(null===(m=this.data)||void 0===m?void 0:m._links["fx:custom_fields"].href),r(null===(f=this.data)||void 0===f?void 0:f._links["fx:attributes"].href),r(h))}}customElements.define("foxy-transaction",q);export{q as Transaction};
@@ -1,4 +1,4 @@
1
- import"./shared-417ab233.js";import"./shared-fe927c53.js";import"./foxy-spinner.js";import"./shared-51a5af7e.js";import{T as t}from"./shared-131988fc.js";import{a as s}from"./shared-662c576b.js";import"./shared-f3b8de28.js";import"./shared-4c2e9064.js";import"./shared-7f33a83a.js";import"./shared-fd96bcd1.js";import"./shared-343d1fd7.js";import"./shared-5cf7b194.js";import"./shared-d3bf9ac0.js";import"./foxy-nucleon-element.js";import"./shared-9b12aeac.js";import"./shared-35728235.js";import"./shared-3ab0306f.js";import"./shared-e8a51c60.js";import"./shared-4e709717.js";let e,a,n,o,r,i,l=t=>t;class c extends(s(t,"transactions-table")){constructor(){super(...arguments),this.columns=[c.priceColumn,c.summaryColumn,c.statusColumn,c.idColumn,c.dateColumn,c.receiptColumn]}}c.priceColumn={cell:t=>t.html(e||(e=l`
1
+ import"./shared-30d00b64.js";import"./shared-ff9791cf.js";import"./foxy-spinner.js";import"./shared-029816d7.js";import{T as t}from"./shared-00c2793e.js";import{a as s}from"./shared-5fa697c4.js";import"./shared-43f449bb.js";import"./shared-1522d76f.js";import"./shared-7f33a83a.js";import"./shared-30cbf0a6.js";import"./shared-343d1fd7.js";import"./shared-b23c903e.js";import"./shared-d3bf9ac0.js";import"./foxy-nucleon-element.js";import"./shared-6a7f96c4.js";import"./shared-07e9d1fb.js";import"./shared-3ab0306f.js";import"./shared-eb116b3e.js";import"./shared-4e709717.js";let e,n,a,o,r,i,l=t=>t;class m extends(s(t,"transactions-table")){constructor(){super(...arguments),this.columns=[m.priceColumn,m.summaryColumn,m.statusColumn,m.idColumn,m.dateColumn,m.receiptColumn]}}m.priceColumn={cell:t=>t.html(e||(e=l`
2
2
  <foxy-i18n
3
3
  data-testclass="i18n totals"
4
4
  class="text-m font-medium font-tnum"
@@ -8,7 +8,7 @@ import"./shared-417ab233.js";import"./shared-fe927c53.js";import"./foxy-spinner.
8
8
  .options=${0}
9
9
  >
10
10
  </foxy-i18n>
11
- `),t.lang,t.ns,{amount:`${t.data.total_order} ${t.data.currency_code}`})},c.summaryColumn={cell:t=>{var s;const e=null===(s=t.data._embedded)||void 0===s?void 0:s["fx:items"];if(!e)return"";const n={most_expensive_item:[...e].sort(((t,s)=>t.price-s.price))[0],count_minus_one:e.length-1,count:e.length};return t.html(a||(a=l`
11
+ `),t.lang,t.ns,{amount:`${t.data.total_order} ${t.data.currency_code}`})},m.summaryColumn={cell:t=>{var s;const e=null===(s=t.data._embedded)||void 0===s?void 0:s["fx:items"];if(!e)return"";const a={most_expensive_item:[...e].sort(((t,s)=>t.price-s.price))[0],count_minus_one:e.length-1,count:e.length};return t.html(n||(n=l`
12
12
  <foxy-i18n
13
13
  data-testclass="i18n summaries"
14
14
  class="text-m"
@@ -18,7 +18,7 @@ import"./shared-417ab233.js";import"./shared-fe927c53.js";import"./foxy-spinner.
18
18
  .options=${0}
19
19
  >
20
20
  </foxy-i18n>
21
- `),t.lang,t.ns,n)}},c.statusColumn={hideBelow:"sm",cell:t=>{const s={completed:"bg-success-10 text-success",declined:"bg-error-10 text-error",rejected:"bg-error-10 text-error"},e=t.data.status||"completed",a=e in s?s[e]:"bg-contrast-5 text-contrast";return t.html(n||(n=l`
21
+ `),t.lang,t.ns,a)}},m.statusColumn={hideBelow:"sm",cell:t=>{const s={completed:"bg-success-10 text-success",declined:"bg-error-10 text-error",rejected:"bg-error-10 text-error"},e=t.data.status||"completed",n=e in s?s[e]:"bg-contrast-5 text-contrast";return t.html(a||(a=l`
22
22
  <foxy-i18n
23
23
  data-testclass="i18n statuses"
24
24
  class="px-s py-xs text-m font-medium rounded ${0}"
@@ -27,11 +27,11 @@ import"./shared-417ab233.js";import"./shared-fe927c53.js";import"./foxy-spinner.
27
27
  ns=${0}
28
28
  >
29
29
  </foxy-i18n>
30
- `),a,t.lang,`transaction_${e}`,t.ns)}},c.idColumn={hideBelow:"sm",cell:t=>t.html(o||(o=l`
30
+ `),n,t.lang,`transaction_${e}`,t.ns)}},m.idColumn={hideBelow:"sm",cell:t=>t.html(o||(o=l`
31
31
  <span class="text-m text-secondary font-tnum" data-testclass="ids">
32
32
  <span class="text-tertiary">ID</span> ${0}
33
33
  </span>
34
- `),t.data.id)},c.dateColumn={hideBelow:"sm",cell:t=>t.html(r||(r=l`
34
+ `),t.data.id)},m.dateColumn={hideBelow:"sm",cell:t=>t.html(r||(r=l`
35
35
  <foxy-i18n
36
36
  data-testclass="i18n dates"
37
37
  class="text-m text-secondary font-tnum"
@@ -41,7 +41,7 @@ import"./shared-417ab233.js";import"./shared-fe927c53.js";import"./foxy-spinner.
41
41
  .options=${0}
42
42
  >
43
43
  </foxy-i18n>
44
- `),t.lang,t.ns,{value:t.data.transaction_date})},c.receiptColumn={cell:t=>t.html(i||(i=l`
44
+ `),t.lang,t.ns,{value:t.data.transaction_date})},m.receiptColumn={cell:t=>t.html(i||(i=l`
45
45
  <a
46
46
  data-testclass="links"
47
47
  target="_blank"
@@ -57,4 +57,4 @@ import"./shared-417ab233.js";import"./shared-fe927c53.js";import"./foxy-spinner.
57
57
  </foxy-i18n>
58
58
  <iron-icon icon="icons:open-in-new" class="icon-inline"></iron-icon>
59
59
  </a>
60
- `),t.data._links["fx:receipt"].href,t.ns,t.lang)},c.__ns="transactions-table",customElements.define("foxy-transactions-table",c);export{c as TransactionsTable};
60
+ `),t.data._links["fx:receipt"].href,t.ns,t.lang)},m.__ns="transactions-table",customElements.define("foxy-transactions-table",m);export{m as TransactionsTable};
@@ -1 +1 @@
1
- import"./shared-f9180815.js";import"./foxy-spinner.js";import"./shared-51a5af7e.js";import{a as r}from"./shared-662c576b.js";import{T as s}from"./shared-468de081.js";import{h as e}from"./shared-7f33a83a.js";import"./shared-fe927c53.js";import"./shared-f3b8de28.js";import"./shared-417ab233.js";import"./shared-4c2e9064.js";import"./shared-fd96bcd1.js";import"./shared-343d1fd7.js";import"./shared-5cf7b194.js";import"./shared-d3bf9ac0.js";import"./shared-112dbca7.js";import"./shared-9b12aeac.js";import"./shared-35728235.js";import"./shared-3ab0306f.js";import"./shared-e8a51c60.js";import"./shared-4e709717.js";let a,t,d=r=>r;const o=r(s,"user-card");class i extends o{renderBody(){return super.renderBody({title:r=>{const s=[r.first_name.trim(),r.last_name.trim()];return e(a||(a=d`${0}`),s.filter((r=>!!r)).join(" ")||this.t("no_name"))},subtitle:r=>e(t||(t=d`${0}`),r.email)})}}customElements.define("foxy-user-card",i);export{i as UserCard};
1
+ import"./shared-f9180815.js";import"./foxy-spinner.js";import"./shared-029816d7.js";import{a as r}from"./shared-5fa697c4.js";import{T as s}from"./shared-e83f2983.js";import{h as e}from"./shared-7f33a83a.js";import"./shared-ff9791cf.js";import"./shared-43f449bb.js";import"./shared-30d00b64.js";import"./shared-1522d76f.js";import"./shared-30cbf0a6.js";import"./shared-343d1fd7.js";import"./shared-b23c903e.js";import"./shared-d3bf9ac0.js";import"./shared-e91453df.js";import"./shared-6a7f96c4.js";import"./shared-07e9d1fb.js";import"./shared-3ab0306f.js";import"./shared-eb116b3e.js";import"./shared-4e709717.js";let t,a,d=r=>r;const o=r(s,"user-card");class i extends o{renderBody(){return super.renderBody({title:r=>{const s=[r.first_name.trim(),r.last_name.trim()];return e(t||(t=d`${0}`),s.filter((r=>!!r)).join(" ")||this.t("no_name"))},subtitle:r=>e(a||(a=d`${0}`),r.email)})}}customElements.define("foxy-user-card",i);export{i as UserCard};
@@ -1 +1 @@
1
- import"./shared-7d933f9d.js";import"./shared-732bee4b.js";import"./shared-4e05dfb4.js";import"./shared-870074ff.js";import"./foxy-spinner.js";import"./shared-51a5af7e.js";export{U as UserForm}from"./shared-b8963ec6.js";import"./shared-e3096241.js";import"./shared-f3b8de28.js";import"./shared-662c576b.js";import"./shared-4c2e9064.js";import"./shared-7f33a83a.js";import"./shared-e60dc924.js";import"./shared-8c681381.js";import"./shared-35728235.js";import"./shared-343d1fd7.js";import"./shared-5cf7b194.js";import"./shared-d3bf9ac0.js";import"./shared-fd96bcd1.js";import"./shared-4e709717.js";import"./shared-702eae16.js";import"./shared-f9180815.js";import"./shared-9b12aeac.js";import"./shared-3ab0306f.js";import"./shared-e8a51c60.js";import"./shared-fe927c53.js";import"./shared-417ab233.js";import"./shared-b738ee96.js";import"./shared-5d795aaf.js";import"./shared-6e704d83.js";import"./shared-1313f293.js";
1
+ import"./shared-c9ba1b64.js";import"./shared-c7b3d22b.js";import"./shared-d21fa1a6.js";import"./shared-ff8ca16b.js";import"./foxy-spinner.js";import"./shared-029816d7.js";export{U as UserForm}from"./shared-8d8bed82.js";import"./shared-f9a3d1ff.js";import"./shared-43f449bb.js";import"./shared-5fa697c4.js";import"./shared-1522d76f.js";import"./shared-7f33a83a.js";import"./shared-b509bc2c.js";import"./shared-61ade33e.js";import"./shared-268571df.js";import"./shared-07e9d1fb.js";import"./shared-343d1fd7.js";import"./shared-b23c903e.js";import"./shared-d3bf9ac0.js";import"./shared-30cbf0a6.js";import"./shared-4e709717.js";import"./shared-fc15a882.js";import"./shared-f9180815.js";import"./shared-6a7f96c4.js";import"./shared-3ab0306f.js";import"./shared-eb116b3e.js";import"./shared-ff9791cf.js";import"./shared-30d00b64.js";import"./shared-b738ee96.js";import"./shared-b1b8ea67.js";import"./shared-9c08cfab.js";import"./shared-a8dc23f1.js";
@@ -1 +1 @@
1
- import"./shared-732bee4b.js";import"./foxy-form-dialog.js";import{r as s}from"./shared-b8963ec6.js";import"./foxy-spinner.js";import"./shared-51a5af7e.js";import{h as e}from"./shared-7f33a83a.js";import{T as a}from"./shared-131988fc.js";import{a as t}from"./shared-662c576b.js";import"./shared-e3096241.js";import"./shared-f3b8de28.js";import"./shared-4e05dfb4.js";import"./shared-4c2e9064.js";import"./shared-8c681381.js";import"./shared-35728235.js";import"./shared-343d1fd7.js";import"./shared-5cf7b194.js";import"./shared-d3bf9ac0.js";import"./shared-fd96bcd1.js";import"./shared-4e709717.js";import"./shared-3ab0306f.js";import"./shared-11c2efc8.js";import"./shared-7d933f9d.js";import"./shared-e60dc924.js";import"./shared-870074ff.js";import"./shared-702eae16.js";import"./shared-f9180815.js";import"./shared-9b12aeac.js";import"./shared-e8a51c60.js";import"./shared-b738ee96.js";import"./shared-5d795aaf.js";import"./shared-fe927c53.js";import"./shared-6e704d83.js";import"./shared-1313f293.js";import"./shared-417ab233.js";import"./foxy-nucleon-element.js";let r,o,d,i,m,n,l,p=s=>s;class f extends(t(a,"users-table")){constructor(){super(...arguments),this.columns=[f.nameColumn,f.emailColumn,f.rolesColumn,f.lastUpdatedColumn,f.actionsColumn]}render(){return e(r||(r=p` <foxy-form-dialog parent="${0}" form="foxy-user-form" lang="${0}" ns="${0}" id="form"> </foxy-form-dialog> ${0} `),this.href,this.lang,this.ns,super.render())}}f.nameColumn={cell:s=>e(o||(o=p` <span data-testclass="name" class="text-m font-medium"> ${0} ${0} </span> `),s.data.first_name,s.data.last_name)},f.emailColumn={hideBelow:"md",cell:s=>e(d||(d=p` <span data-testclass="email" class="text-m text-secondary">${0}</span> `),s.data.email)},f.rolesColumn={cell:a=>e(i||(i=p` <div data-testclass="roles" class="flex space-x-s"> ${0} </div> `),["is_merchant","is_programmer","is_front_end_developer","is_designer"].map((t=>e(m||(m=p` <div class="${0}" style="width:1rem;height:1rem"> ${0} </div> `),a.data[t]?"":"text-disabled",s.find((s=>s.property===t)).icon))))},f.lastUpdatedColumn={hideBelow:"lg",cell:s=>e(n||(n=p` <span data-testclass="lastUpdated" class="text-m text-secondary font-tnum"> <foxy-i18n options="${0}" lang="${0}" key="date" ns="${0}"> </foxy-i18n> <foxy-i18n options="${0}" lang="${0}" key="time" ns="${0}"> </foxy-i18n> </span> `),JSON.stringify({value:s.data.date_modified}),s.lang,s.ns,JSON.stringify({value:s.data.date_modified}),s.lang,s.ns)},f.actionsColumn={cell:s=>e(l||(l=p` <vaadin-button data-testclass="actions" theme="tertiary small" @click="${0}"> <foxy-i18n lang="${0}" key="update" ns="${0}"></foxy-i18n> </vaadin-button> `),(e=>{const a=e.target,t=a.getRootNode().querySelector("#form");t.href=s.data._links.self.href,t.show(a)}),s.lang,s.ns)},customElements.define("foxy-users-table",f);export{f as UsersTable};
1
+ import"./shared-c7b3d22b.js";import"./foxy-form-dialog.js";import{r as s}from"./shared-8d8bed82.js";import"./foxy-spinner.js";import"./shared-029816d7.js";import{h as e}from"./shared-7f33a83a.js";import{T as a}from"./shared-00c2793e.js";import{a as t}from"./shared-5fa697c4.js";import"./shared-f9a3d1ff.js";import"./shared-43f449bb.js";import"./shared-61ade33e.js";import"./shared-d21fa1a6.js";import"./shared-1522d76f.js";import"./shared-268571df.js";import"./shared-07e9d1fb.js";import"./shared-343d1fd7.js";import"./shared-b23c903e.js";import"./shared-d3bf9ac0.js";import"./shared-30cbf0a6.js";import"./shared-4e709717.js";import"./shared-3ab0306f.js";import"./shared-11c2efc8.js";import"./shared-c9ba1b64.js";import"./shared-b509bc2c.js";import"./shared-ff8ca16b.js";import"./shared-fc15a882.js";import"./shared-f9180815.js";import"./shared-6a7f96c4.js";import"./shared-eb116b3e.js";import"./shared-b738ee96.js";import"./shared-b1b8ea67.js";import"./shared-ff9791cf.js";import"./shared-9c08cfab.js";import"./shared-a8dc23f1.js";import"./shared-30d00b64.js";import"./foxy-nucleon-element.js";let r,o,d,i,m,n,l,f=s=>s;class p extends(t(a,"users-table")){constructor(){super(...arguments),this.columns=[p.nameColumn,p.emailColumn,p.rolesColumn,p.lastUpdatedColumn,p.actionsColumn]}render(){return e(r||(r=f` <foxy-form-dialog parent="${0}" form="foxy-user-form" lang="${0}" ns="${0}" id="form"> </foxy-form-dialog> ${0} `),this.href,this.lang,this.ns,super.render())}}p.nameColumn={cell:s=>e(o||(o=f` <span data-testclass="name" class="text-m font-medium"> ${0} ${0} </span> `),s.data.first_name,s.data.last_name)},p.emailColumn={hideBelow:"md",cell:s=>e(d||(d=f` <span data-testclass="email" class="text-m text-secondary">${0}</span> `),s.data.email)},p.rolesColumn={cell:a=>e(i||(i=f` <div data-testclass="roles" class="flex space-x-s"> ${0} </div> `),["is_merchant","is_programmer","is_front_end_developer","is_designer"].map((t=>e(m||(m=f` <div class="${0}" style="width:1rem;height:1rem"> ${0} </div> `),a.data[t]?"":"text-disabled",s.find((s=>s.property===t)).icon))))},p.lastUpdatedColumn={hideBelow:"lg",cell:s=>e(n||(n=f` <span data-testclass="lastUpdated" class="text-m text-secondary font-tnum"> <foxy-i18n options="${0}" lang="${0}" key="date" ns="${0}"> </foxy-i18n> <foxy-i18n options="${0}" lang="${0}" key="time" ns="${0}"> </foxy-i18n> </span> `),JSON.stringify({value:s.data.date_modified}),s.lang,s.ns,JSON.stringify({value:s.data.date_modified}),s.lang,s.ns)},p.actionsColumn={cell:s=>e(l||(l=f` <vaadin-button data-testclass="actions" theme="tertiary small" @click="${0}"> <foxy-i18n lang="${0}" key="update" ns="${0}"></foxy-i18n> </vaadin-button> `),(e=>{const a=e.target,t=a.getRootNode().querySelector("#form");t.href=s.data._links.self.href,t.show(a)}),s.lang,s.ns)},customElements.define("foxy-users-table",p);export{p as UsersTable};
@@ -1 +1 @@
1
- import"./shared-26dea180.js";import{I as e}from"./shared-112dbca7.js";import{h as s}from"./shared-7f33a83a.js";import{a as r}from"./shared-662c576b.js";import"./foxy-spinner.js";import"./shared-fe927c53.js";import"./shared-f3b8de28.js";import"./shared-417ab233.js";import"./shared-51a5af7e.js";import"./shared-4c2e9064.js";import"./shared-343d1fd7.js";import"./shared-fd96bcd1.js";import"./shared-9b12aeac.js";import"./shared-35728235.js";import"./shared-3ab0306f.js";import"./shared-e8a51c60.js";import"./shared-4e709717.js";let a,t=e=>e;class d extends(r(e,"webhook-card")){renderBody(){var e,r,d,o;return s(a||(a=t` <div class="grid grid-cols-1 leading-s -my-xs"> <p class="text-m truncate text-body font-medium">${0}&ZeroWidthSpace;</p> <p class="text-s truncate text-secondary">${0}&ZeroWidthSpace;</p> <p class="text-s truncate text-tertiary"> ${0} &bull; ${0}&ZeroWidthSpace; </p> </div> `),null===(e=this.data)||void 0===e?void 0:e.name,null===(r=this.data)||void 0===r?void 0:r.url,null===(d=this.data)||void 0===d?void 0:d.format,null===(o=this.data)||void 0===o?void 0:o.event_resource)}}customElements.define("foxy-webhook-card",d);export{d as WebhookCard};
1
+ import"./shared-2cf08dd4.js";import{I as s}from"./shared-e91453df.js";import{h as r}from"./shared-7f33a83a.js";import{a as e}from"./shared-5fa697c4.js";import"./foxy-spinner.js";import"./shared-ff9791cf.js";import"./shared-43f449bb.js";import"./shared-30d00b64.js";import"./shared-029816d7.js";import"./shared-1522d76f.js";import"./shared-343d1fd7.js";import"./shared-30cbf0a6.js";import"./shared-6a7f96c4.js";import"./shared-07e9d1fb.js";import"./shared-3ab0306f.js";import"./shared-eb116b3e.js";import"./shared-4e709717.js";let t,d=s=>s;class a extends(e(s,"webhook-card")){renderBody(){var s,e,a,o;return r(t||(t=d` <div class="grid grid-cols-1 leading-s -my-xs"> <p class="text-m truncate text-body font-medium">${0}&ZeroWidthSpace;</p> <p class="text-s truncate text-secondary">${0}&ZeroWidthSpace;</p> <p class="text-s truncate text-tertiary"> ${0} &bull; ${0}&ZeroWidthSpace; </p> </div> `),null===(s=this.data)||void 0===s?void 0:s.name,null===(e=this.data)||void 0===e?void 0:e.url,null===(a=this.data)||void 0===a?void 0:a.format,null===(o=this.data)||void 0===o?void 0:o.event_resource)}}customElements.define("foxy-webhook-card",a);export{a as WebhookCard};
@@ -1 +1 @@
1
- import"./shared-2f082f50.js";import"./shared-cb9cdc88.js";import"./shared-f1b36324.js";import{I as e}from"./shared-870074ff.js";import"./foxy-webhook-status-card.js";import"./foxy-webhook-log-card.js";import{a as r}from"./shared-662c576b.js";import{B as o}from"./shared-4c2e9064.js";import{h as t}from"./shared-7f33a83a.js";import"./foxy-collection-page.js";import"./foxy-spinner.js";import"./shared-fe927c53.js";import"./shared-f3b8de28.js";import"./shared-417ab233.js";import"./shared-51a5af7e.js";import"./shared-343d1fd7.js";import"./shared-fd96bcd1.js";import"./shared-5cf7b194.js";import"./shared-d3bf9ac0.js";import"./shared-9b12aeac.js";import"./shared-35728235.js";import"./shared-3ab0306f.js";import"./shared-e8a51c60.js";import"./shared-d519a301.js";import"./shared-11c2efc8.js";import"./foxy-form-dialog.js";import"./shared-4e05dfb4.js";import"./shared-732bee4b.js";import"./shared-e3096241.js";import"./shared-8c681381.js";import"./shared-4e709717.js";import"./foxy-pagination.js";import"./shared-702eae16.js";import"./shared-f9180815.js";import"./shared-7d933f9d.js";import"./shared-e60dc924.js";import"./shared-21293163.js";import"./shared-26dea180.js";import"./shared-112dbca7.js";let s,a,n=e=>e;class i extends(r(e,"webhook-form")){constructor(){super(...arguments),this.__formats=[{value:"json",label:"JSON"},{value:"webflow",label:"Webflow"},{value:"zapier",label:"Zapier"}],this.__eventResources=[{value:"subscription",label:"event_resource_subscription"},{value:"transaction",label:"event_resource_transaction"},{value:"customer",label:"event_resource_customer"}]}static get v8n(){return[({name:e})=>!!e||"name:v8n_required",({name:e})=>!!e&&e.length<=255||"name:v8n_too_long",({version:e})=>!!e||"version:v8n_required",({format:e})=>!!e||"format:v8n_required",({url:e})=>!e||e.length<=1e3||"url:v8n_too_long",({query:e})=>!e||e.length<=1e3||"query:v8n_too_long",({encryption_key:e})=>!e||e.length<=1e3||"encryption-key:v8n_too_long"]}get readonlySelector(){const e=[];return this.data&&e.push("event-resource"),new o(`${super.readonlySelector} ${e.join(" ")}`.trim())}renderBody(){return t(s||(s=n` <foxy-internal-text-control infer="name"></foxy-internal-text-control> <foxy-internal-radio-group-control infer="event-resource" .options="${0}"> </foxy-internal-radio-group-control> <foxy-internal-text-control infer="query"></foxy-internal-text-control> <foxy-internal-text-control infer="url"></foxy-internal-text-control> <foxy-internal-radio-group-control infer="format" .options="${0}"> </foxy-internal-radio-group-control> <foxy-internal-text-control infer="encryption-key"></foxy-internal-text-control> <foxy-internal-text-control infer="version"></foxy-internal-text-control> ${0} ${0} `),this.__eventResources,this.__formats,this.data?t(a||(a=n` <foxy-internal-async-details-control first="${0}" infer="statuses" limit="10" item="foxy-webhook-status-card"> </foxy-internal-async-details-control> <foxy-internal-async-details-control first="${0}" infer="logs" limit="5" item="foxy-webhook-log-card"> </foxy-internal-async-details-control> `),this.data._links["fx:statuses"].href,this.data._links["fx:logs"].href):"",super.renderBody())}}customElements.define("foxy-webhook-form",i);export{i as WebhookForm};
1
+ import"./shared-dbadd9cf.js";import"./shared-2f09d4df.js";import"./shared-20ba4cdc.js";import{I as r}from"./shared-ff8ca16b.js";import"./foxy-webhook-status-card.js";import"./foxy-webhook-log-card.js";import{a as e}from"./shared-5fa697c4.js";import{B as o}from"./shared-1522d76f.js";import{h as t}from"./shared-7f33a83a.js";import"./foxy-collection-page.js";import"./foxy-spinner.js";import"./shared-ff9791cf.js";import"./shared-43f449bb.js";import"./shared-30d00b64.js";import"./shared-029816d7.js";import"./shared-343d1fd7.js";import"./shared-30cbf0a6.js";import"./shared-b23c903e.js";import"./shared-d3bf9ac0.js";import"./shared-6a7f96c4.js";import"./shared-07e9d1fb.js";import"./shared-3ab0306f.js";import"./shared-eb116b3e.js";import"./shared-d519a301.js";import"./shared-11c2efc8.js";import"./foxy-form-dialog.js";import"./shared-d21fa1a6.js";import"./shared-c7b3d22b.js";import"./shared-f9a3d1ff.js";import"./shared-61ade33e.js";import"./shared-268571df.js";import"./shared-4e709717.js";import"./foxy-pagination.js";import"./shared-fc15a882.js";import"./shared-f9180815.js";import"./shared-c9ba1b64.js";import"./shared-b509bc2c.js";import"./shared-bed7aae1.js";import"./shared-2cf08dd4.js";import"./shared-e91453df.js";let s,a,n=r=>r;class i extends(e(r,"webhook-form")){constructor(){super(...arguments),this.__formats=[{value:"json",label:"JSON"},{value:"webflow",label:"Webflow"},{value:"zapier",label:"Zapier"}],this.__eventResources=[{value:"subscription",label:"event_resource_subscription"},{value:"transaction",label:"event_resource_transaction"},{value:"customer",label:"event_resource_customer"}]}static get v8n(){return[({name:r})=>!!r||"name:v8n_required",({name:r})=>!!r&&r.length<=255||"name:v8n_too_long",({version:r})=>!!r||"version:v8n_required",({format:r})=>!!r||"format:v8n_required",({url:r})=>!r||r.length<=1e3||"url:v8n_too_long",({query:r})=>!r||r.length<=1e3||"query:v8n_too_long",({encryption_key:r})=>!r||r.length<=1e3||"encryption-key:v8n_too_long"]}get readonlySelector(){const r=[];return this.data&&r.push("event-resource"),new o(`${super.readonlySelector} ${r.join(" ")}`.trim())}renderBody(){return t(s||(s=n` <foxy-internal-text-control infer="name"></foxy-internal-text-control> <foxy-internal-radio-group-control infer="event-resource" .options="${0}"> </foxy-internal-radio-group-control> <foxy-internal-text-control infer="query"></foxy-internal-text-control> <foxy-internal-text-control infer="url"></foxy-internal-text-control> <foxy-internal-radio-group-control infer="format" .options="${0}"> </foxy-internal-radio-group-control> <foxy-internal-text-control infer="encryption-key"></foxy-internal-text-control> <foxy-internal-text-control infer="version"></foxy-internal-text-control> ${0} ${0} `),this.__eventResources,this.__formats,this.data?t(a||(a=n` <foxy-internal-async-details-control first="${0}" infer="statuses" limit="10" item="foxy-webhook-status-card"> </foxy-internal-async-details-control> <foxy-internal-async-details-control first="${0}" infer="logs" limit="5" item="foxy-webhook-log-card"> </foxy-internal-async-details-control> `),this.data._links["fx:statuses"].href,this.data._links["fx:logs"].href):"",super.renderBody())}}customElements.define("foxy-webhook-form",i);export{i as WebhookForm};
@@ -1 +1 @@
1
- import"./shared-51a5af7e.js";import"./shared-26dea180.js";import{a as e}from"./shared-662c576b.js";import{I as s}from"./shared-112dbca7.js";import{h as r}from"./shared-7f33a83a.js";import"./shared-4c2e9064.js";import"./shared-343d1fd7.js";import"./shared-fd96bcd1.js";import"./foxy-spinner.js";import"./shared-fe927c53.js";import"./shared-f3b8de28.js";import"./shared-417ab233.js";import"./shared-9b12aeac.js";import"./shared-35728235.js";import"./shared-3ab0306f.js";import"./shared-e8a51c60.js";import"./shared-4e709717.js";let a,o=e=>e;class t extends(e(s,"webhook-log-card")){renderBody(){var e;const{date_created:s,response_code:t,response_body:d}=null!==(e=this.data)&&void 0!==e?e:{};return r(a||(a=o` <div class="leading-none space-y-xs"> <p class="flex justify-between items-center font-medium"> <foxy-i18n .options="${0}" infer="" key="date"></foxy-i18n> <span class="inline-block text-xs bg-contrast-5 text-secondary rounded p-xs"> ${0}&ZeroWidthSpace; </span> </p> <p class="text-tertiary">${0}&ZeroWidthSpace;</p> </div> `),{value:s},t,d)}}customElements.define("foxy-webhook-log-card",t);export{t as WebhookLogCard};
1
+ import"./shared-029816d7.js";import"./shared-2cf08dd4.js";import{a as e}from"./shared-5fa697c4.js";import{I as s}from"./shared-e91453df.js";import{h as r}from"./shared-7f33a83a.js";import"./shared-1522d76f.js";import"./shared-343d1fd7.js";import"./shared-30cbf0a6.js";import"./foxy-spinner.js";import"./shared-ff9791cf.js";import"./shared-43f449bb.js";import"./shared-30d00b64.js";import"./shared-6a7f96c4.js";import"./shared-07e9d1fb.js";import"./shared-3ab0306f.js";import"./shared-eb116b3e.js";import"./shared-4e709717.js";let a,o=e=>e;class d extends(e(s,"webhook-log-card")){renderBody(){var e;const{date_created:s,response_code:d,response_body:t}=null!==(e=this.data)&&void 0!==e?e:{};return r(a||(a=o` <div class="leading-none space-y-xs"> <p class="flex justify-between items-center font-medium"> <foxy-i18n .options="${0}" infer="" key="date"></foxy-i18n> <span class="inline-block text-xs bg-contrast-5 text-secondary rounded p-xs"> ${0}&ZeroWidthSpace; </span> </p> <p class="text-tertiary">${0}&ZeroWidthSpace;</p> </div> `),{value:s},d,t)}}customElements.define("foxy-webhook-log-card",d);export{d as WebhookLogCard};
@@ -1 +1 @@
1
- import"./shared-51a5af7e.js";import"./shared-26dea180.js";import{a as s}from"./shared-662c576b.js";import{I as e}from"./shared-112dbca7.js";import{h as r}from"./shared-7f33a83a.js";import{c as a}from"./shared-4e709717.js";import"./shared-4c2e9064.js";import"./shared-343d1fd7.js";import"./shared-fd96bcd1.js";import"./foxy-spinner.js";import"./shared-fe927c53.js";import"./shared-f3b8de28.js";import"./shared-417ab233.js";import"./shared-9b12aeac.js";import"./shared-35728235.js";import"./shared-3ab0306f.js";import"./shared-e8a51c60.js";let t,o=s=>s;const d=s(e,"webhook-status-card");class i extends d{renderBody(){var s,e;const d=null===(s=this.data)||void 0===s?void 0:s.status;return r(t||(t=o` <p class="flex justify-between items-center leading-none"> <foxy-i18n .options="${0}" class="font-medium" infer="" key="date"> </foxy-i18n> <foxy-i18n class="${0}" infer="" key="status_${0}"> </foxy-i18n> </p> `),{value:null===(e=this.data)||void 0===e?void 0:e.date_created},a({"text-error":"failed"===d,"text-tertiary":"pending"===d,"text-success":"successful"===d}),d)}}customElements.define("foxy-webhook-status-card",i);export{i as WebhookStatusCard};
1
+ import"./shared-029816d7.js";import"./shared-2cf08dd4.js";import{a as s}from"./shared-5fa697c4.js";import{I as e}from"./shared-e91453df.js";import{h as r}from"./shared-7f33a83a.js";import{c as t}from"./shared-4e709717.js";import"./shared-1522d76f.js";import"./shared-343d1fd7.js";import"./shared-30cbf0a6.js";import"./foxy-spinner.js";import"./shared-ff9791cf.js";import"./shared-43f449bb.js";import"./shared-30d00b64.js";import"./shared-6a7f96c4.js";import"./shared-07e9d1fb.js";import"./shared-3ab0306f.js";import"./shared-eb116b3e.js";let a,o=s=>s;const d=s(e,"webhook-status-card");class i extends d{renderBody(){var s,e;const d=null===(s=this.data)||void 0===s?void 0:s.status;return r(a||(a=o` <p class="flex justify-between items-center leading-none"> <foxy-i18n .options="${0}" class="font-medium" infer="" key="date"> </foxy-i18n> <foxy-i18n class="${0}" infer="" key="status_${0}"> </foxy-i18n> </p> `),{value:null===(e=this.data)||void 0===e?void 0:e.date_created},t({"text-error":"failed"===d,"text-tertiary":"pending"===d,"text-success":"successful"===d}),d)}}customElements.define("foxy-webhook-status-card",i);export{i as WebhookStatusCard};
@@ -0,0 +1 @@
1
+ import{a as r}from"./shared-db306674.js";import{d as o,ae as a,af as t,ag as n}from"./shared-1522d76f.js";function s(s,e,f){return null==s?s:function(s,e,f,i){if(!o(s))return s;for(var u=-1,d=(e=a(e,s)).length,p=d-1,l=s;null!=l&&++u<d;){var v=t(e[u]),c=f;if("__proto__"===v||"constructor"===v||"prototype"===v)return s;if(u!=p){var m=l[v];void 0===(c=i?i(m,v,l):void 0)&&(c=o(m)?m:n(e[u+1])?[]:{})}r(l,v,c),l=l[v]}return s}(s,e,f)}export{s};
@@ -1 +1 @@
1
- import{_ as e}from"./shared-4c2e9064.js";import{h as t}from"./shared-7f33a83a.js";import{C as l}from"./shared-5cf7b194.js";import"./foxy-nucleon-element.js";import{R as s,T as a,a as i}from"./shared-662c576b.js";import{c as r}from"./shared-4e709717.js";import{N as d}from"./shared-9b12aeac.js";let n,o,h,c,m,u=e=>e;const b=l(s(a(i(d))));class p extends b{constructor(){super(...arguments),this.templates={},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=u` <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"> <thead class="${0}"> <tr> ${0} </tr> </thead> <tbody class="divide-y divide-contrast-10"> ${0} </tbody> </table> ${0} </div> ${0} `),this.in("busy"),s?"border-b border-contrast-10":"sr-only",this.columns.map(((e,l)=>{var s;return t(o||(o=u` <th class="${0}"> ${0} </th> `),r({"truncate h-l text-tertiary 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(h||(h=u` <tr class="h-l"> ${0} </tr> `),null===(l=this.columns)||void 0===l?void 0:l.map(((l,s)=>{var a;return t(c||(c=u` <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(m||(m=u` <div class="absolute inset-0 flex items-center justify-center"> <foxy-spinner data-testid="spinner" layout="vertical" state="${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.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{p as T};
1
+ import{_ as e}from"./shared-1522d76f.js";import{h as t}from"./shared-7f33a83a.js";import{C as l}from"./shared-b23c903e.js";import"./foxy-nucleon-element.js";import{R as s,T as a,a as i}from"./shared-5fa697c4.js";import{c as r}from"./shared-4e709717.js";import{N as d}from"./shared-6a7f96c4.js";let n,o,h,c,m,u=e=>e;const p=l(s(a(i(d))));class b extends p{constructor(){super(...arguments),this.templates={},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=u` <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"> <thead class="${0}"> <tr> ${0} </tr> </thead> <tbody class="divide-y divide-contrast-10"> ${0} </tbody> </table> ${0} </div> ${0} `),this.in("busy"),s?"border-b border-contrast-10":"sr-only",this.columns.map(((e,l)=>{var s;return t(o||(o=u` <th class="${0}"> ${0} </th> `),r({"truncate h-l text-tertiary 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(h||(h=u` <tr class="h-l"> ${0} </tr> `),null===(l=this.columns)||void 0===l?void 0:l.map(((l,s)=>{var a;return t(c||(c=u` <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(m||(m=u` <div class="absolute inset-0 flex items-center justify-center"> <foxy-spinner data-testid="spinner" layout="vertical" state="${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.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{b as T};
@@ -1 +1 @@
1
- import{A as e,_ as t}from"./shared-4c2e9064.js";import{h as n,L as r}from"./shared-7f33a83a.js";import{i as s,a}from"./shared-662c576b.js";import{F as i}from"./shared-343d1fd7.js";import{I as o}from"./shared-fd96bcd1.js";const l={type:"backend",init:()=>{},read:(t,n,r)=>{const s=async e=>{const t=e.ok?null:new Error(await e.text()),n=!!e.ok&&await e.json();r(t,n)},a=e=>{const t=e instanceof Error?e:new Error(String(e));r(t,!1)},o=new i("fetch",{cancelable:!0,composed:!0,bubbles:!0,request:new e.WHATWGRequest(`foxy://i18n/${n}/${t}`),resolve:s,reject:a});dispatchEvent(o),o.defaultPrevented||fetch(o.request).then(s).catch(a)},create:()=>{throw new Error("foxy-i18n does not support resource creation")}};function c(e,t=!1){var n;const r=e.replace(/^\.?\d+/,""),s=e.substring(0,e.length-r.length);return{count:".5"===s?.5:parseInt(s),units:t&&null!==(n={y:"year",m:"month",w:"week",d:"day"}[r])&&void 0!==n?n:r}}const u={discount:({ns:e,type:t,details:n},r,s)=>{const a=t.endsWith("_percentage")?.01:1,i=n.split("|"),o=`${["allunits","incremental","repeat","single"].includes(i[0])?i.shift():"single"}_${t}_discount_summary`;return i.map((t=>{var n,r;const s=null!==(r=null===(n=/[-+]/.exec(t))||void 0===n?void 0:n.index)&&void 0!==r?r:-1,i=parseFloat(t.substring(s))*a,l=parseFloat(t.substring(0,s));return`$t(${o}, ${JSON.stringify({maximumFractionDigits:10,adjustment:i,from:l,ns:e})})`})).join("; ")},relative:(e,t,n)=>{const r=new Intl.RelativeTimeFormat(n);let{count:s,units:a}=c(e,!0);return.5===s&&"month"===a&&(s=2,a="week"),r.format(s,a)},percent:(e,n,r,s)=>{let a=null;try{"number"==typeof e&&(a=e.toLocaleString(r,t(t({},s),{},{style:"percent"})))}catch(e){console.warn(`i18next formatter error: ${e.message}`)}return a||String(e)},ordinal:(e,t,n)=>`${e}$t(ordinal_${new Intl.PluralRules(n,{type:"ordinal"}).select(e)})`,price:(e,t,n,r)=>{var s;try{const[t,a]=e.split(" ");return parseFloat(t).toLocaleString(n,{maximumFractionDigits:2,minimumFractionDigits:2,currencyDisplay:null!==(s=null==r?void 0:r.currencyDisplay)&&void 0!==s?s:"symbol",signDisplay:null==r?void 0:r.signDisplay,style:"currency",currency:a})}catch(t){return e}},date:(e,t,n,r)=>{var s,a,i;if(!e)return"$t(unknown)";const o=new Date(e),l=null!==(s=null==r?void 0:r.month)&&void 0!==s?s:"long",c=(null!==(a=null==r?void 0:r.year)&&void 0!==a?a:(new Date).getFullYear()===o.getFullYear())?void 0:"numeric",u=null!==(i=null==r?void 0:r.day)&&void 0!==i?i:"numeric";return o.toLocaleDateString(n,{month:l,year:c,day:u})},time:(e,t,n)=>new Date(e).toLocaleTimeString(n,{hour:"numeric",minute:"numeric"})};let d,p=e=>e;class m extends(a(o(r),"")){constructor(){super(...arguments),this.options={},this.key=""}static onTranslationChange(e){const t=["initialized","loaded"],n=["removed","added"];return t.forEach((t=>m.i18next.on(t,e))),n.forEach((t=>m.i18next.store.on(t,e))),()=>{t.forEach((t=>m.i18next.off(t,e))),n.forEach((t=>m.i18next.store.off(t,e)))}}static onResourceFetch(e){const t=t=>{if(t instanceof i&&t.request.url.startsWith("foxy://i18n/")){const[n,r]=t.request.url.split("/").reverse();t.respondWith(e(r,n))}};return addEventListener("fetch",t),()=>removeEventListener("fetch",t)}static setGateways({values:e}){for(const t in e)this.i18next.addResource("en","gateways",`gateways.${t}`,e[t].name)}static get properties(){return t(t({},super.properties),{},{options:{type:Object},key:{type:String}})}connectedCallback(){super.connectedCallback(),this.__unsubscribe=m.onTranslationChange((()=>this.requestUpdate()))}render(){return n(d||(d=p`<span>${0}</span>`),this.t(this.key,t(t({},this.options),{},{lng:this.lang})))}disconnectedCallback(){var e;super.disconnectedCallback(),null===(e=this.__unsubscribe)||void 0===e||e.call(this)}}m.FetchEvent=i,m.i18next=s.createInstance().use(l),m.i18next.init({interpolation:{format:(e,t="",n="en",r={})=>t.split(" ").filter((e=>!!e.trim())).reduce(((e,t)=>{var s,a;return null!==(a=null===(s=u[t])||void 0===s?void 0:s.call(u,e,t,n,r))&&void 0!==a?a:e}),e),escapeValue:!1},fallbackLng:"en",fallbackNS:"shared",defaultNS:"shared",ns:["shared"]}),customElements.define("foxy-i18n",m);export{m as I,c as p};
1
+ import{A as e,_ as t}from"./shared-1522d76f.js";import{h as n,L as r}from"./shared-7f33a83a.js";import{i as s,a}from"./shared-5fa697c4.js";import{F as i}from"./shared-343d1fd7.js";import{I as o}from"./shared-30cbf0a6.js";const l={type:"backend",init:()=>{},read:(t,n,r)=>{const s=async e=>{const t=e.ok?null:new Error(await e.text()),n=!!e.ok&&await e.json();r(t,n)},a=e=>{const t=e instanceof Error?e:new Error(String(e));r(t,!1)},o=new i("fetch",{cancelable:!0,composed:!0,bubbles:!0,request:new e.WHATWGRequest(`foxy://i18n/${n}/${t}`),resolve:s,reject:a});dispatchEvent(o),o.defaultPrevented||fetch(o.request).then(s).catch(a)},create:()=>{throw new Error("foxy-i18n does not support resource creation")}};function c(e,t=!1){var n;const r=e.replace(/^\.?\d+/,""),s=e.substring(0,e.length-r.length);return{count:".5"===s?.5:parseInt(s),units:t&&null!==(n={y:"year",m:"month",w:"week",d:"day"}[r])&&void 0!==n?n:r}}const u={discount:({ns:e,type:t,details:n},r,s)=>{const a=t.endsWith("_percentage")?.01:1,i=n.split("|"),o=`${["allunits","incremental","repeat","single"].includes(i[0])?i.shift():"single"}_${t}_discount_summary`;return i.map((t=>{var n,r;const s=null!==(r=null===(n=/[-+]/.exec(t))||void 0===n?void 0:n.index)&&void 0!==r?r:-1,i=parseFloat(t.substring(s))*a,l=parseFloat(t.substring(0,s));return`$t(${o}, ${JSON.stringify({maximumFractionDigits:10,adjustment:i,from:l,ns:e})})`})).join("; ")},relative:(e,t,n)=>{const r=new Intl.RelativeTimeFormat(n);let{count:s,units:a}=c(e,!0);return.5===s&&"month"===a&&(s=2,a="week"),r.format(s,a)},percent:(e,n,r,s)=>{let a=null;try{"number"==typeof e&&(a=e.toLocaleString(r,t(t({},s),{},{style:"percent"})))}catch(e){console.warn(`i18next formatter error: ${e.message}`)}return a||String(e)},ordinal:(e,t,n)=>`${e}$t(ordinal_${new Intl.PluralRules(n,{type:"ordinal"}).select(e)})`,price:(e,t,n,r)=>{var s;try{const[t,a]=e.split(" ");return parseFloat(t).toLocaleString(n,{maximumFractionDigits:2,minimumFractionDigits:2,currencyDisplay:null!==(s=null==r?void 0:r.currencyDisplay)&&void 0!==s?s:"symbol",signDisplay:null==r?void 0:r.signDisplay,style:"currency",currency:a})}catch(t){return e}},date:(e,t,n,r)=>{var s,a,i;if(!e)return"$t(unknown)";const o=new Date(e),l=null!==(s=null==r?void 0:r.month)&&void 0!==s?s:"long",c=(null!==(a=null==r?void 0:r.year)&&void 0!==a?a:(new Date).getFullYear()===o.getFullYear())?void 0:"numeric",u=null!==(i=null==r?void 0:r.day)&&void 0!==i?i:"numeric";return o.toLocaleDateString(n,{month:l,year:c,day:u})},time:(e,t,n)=>new Date(e).toLocaleTimeString(n,{hour:"numeric",minute:"numeric"})};let d,p=e=>e;class m extends(a(o(r),"")){constructor(){super(...arguments),this.options={},this.key=""}static onTranslationChange(e){const t=["initialized","loaded"],n=["removed","added"];return t.forEach((t=>m.i18next.on(t,e))),n.forEach((t=>m.i18next.store.on(t,e))),()=>{t.forEach((t=>m.i18next.off(t,e))),n.forEach((t=>m.i18next.store.off(t,e)))}}static onResourceFetch(e){const t=t=>{if(t instanceof i&&t.request.url.startsWith("foxy://i18n/")){const[n,r]=t.request.url.split("/").reverse();t.respondWith(e(r,n))}};return addEventListener("fetch",t),()=>removeEventListener("fetch",t)}static setGateways({values:e}){for(const t in e)this.i18next.addResource("en","gateways",`gateways.${t}`,e[t].name)}static get properties(){return t(t({},super.properties),{},{options:{type:Object},key:{type:String}})}connectedCallback(){super.connectedCallback(),this.__unsubscribe=m.onTranslationChange((()=>this.requestUpdate()))}render(){return n(d||(d=p`<span>${0}</span>`),this.t(this.key,t(t({},this.options),{},{lng:this.lang})))}disconnectedCallback(){var e;super.disconnectedCallback(),null===(e=this.__unsubscribe)||void 0===e||e.call(this)}}m.FetchEvent=i,m.i18next=s.createInstance().use(l),m.i18next.init({interpolation:{format:(e,t="",n="en",r={})=>t.split(" ").filter((e=>!!e.trim())).reduce(((e,t)=>{var s,a;return null!==(a=null===(s=u[t])||void 0===s?void 0:s.call(u,e,t,n,r))&&void 0!==a?a:e}),e),escapeValue:!1},fallbackLng:"en",fallbackNS:"shared",defaultNS:"shared",ns:["shared"]}),customElements.define("foxy-i18n",m);export{m as I,c as p};
@@ -1,4 +1,4 @@
1
- import{_ as e}from"./shared-4c2e9064.js";import{T as t}from"./shared-131988fc.js";import{a as s}from"./shared-662c576b.js";import{p as n}from"./shared-5e932eb5.js";let a,o,i,r,l=e=>e;class c extends(s(t,"subscriptions-table")){constructor(){super(...arguments),this.columns=[c.priceColumn,c.summaryColumn,c.statusColumn,c.subTokenURLColumn]}}c.priceColumn={cell:t=>{const s=t.data._embedded["fx:transaction_template"],o=`${s.total_order} ${s.currency_code}`;return t.html(a||(a=l`
1
+ import{_ as e}from"./shared-1522d76f.js";import{T as t}from"./shared-00c2793e.js";import{a as s}from"./shared-5fa697c4.js";import{p as n}from"./shared-4c650e5c.js";let a,o,i,r,l=e=>e;class c extends(s(t,"subscriptions-table")){constructor(){super(...arguments),this.columns=[c.priceColumn,c.summaryColumn,c.statusColumn,c.subTokenURLColumn]}}c.priceColumn={cell:t=>{const s=t.data._embedded["fx:transaction_template"],o=`${s.total_order} ${s.currency_code}`;return t.html(a||(a=l`
2
2
  <foxy-i18n
3
3
  data-testclass="i18n frequencies"
4
4
  class="font-medium text-m font-tnum"
@@ -1 +1 @@
1
- import{A as e}from"./shared-4c2e9064.js";import{F as s}from"./shared-343d1fd7.js";class t extends e{constructor(e){super({base:new URL(document.baseURI),fetch:(...n)=>new Promise(((o,r)=>{const a="string"==typeof n[0]?new t.WHATWGRequest(...n):n[0];a.headers.set("Content-Type","application/json"),a.headers.set("FOXY-API-VERSION","1");const c=new s("fetch",{cancelable:!0,composed:!0,bubbles:!0,request:a,resolve:o,reject:r});e.dispatchEvent(c),c.defaultPrevented||o(new Response(null,{status:500}))}))})}}t.FetchEvent=s;export{t as A};
1
+ import{A as e}from"./shared-1522d76f.js";import{F as s}from"./shared-343d1fd7.js";class t extends e{constructor(e){super({base:new URL(document.baseURI),fetch:(...n)=>new Promise(((o,r)=>{const a="string"==typeof n[0]?new t.WHATWGRequest(...n):n[0];a.headers.set("Content-Type","application/json"),a.headers.set("FOXY-API-VERSION","1");const c=new s("fetch",{cancelable:!0,composed:!0,bubbles:!0,request:a,resolve:o,reject:r});e.dispatchEvent(c),c.defaultPrevented||o(new Response(null,{status:500}))}))})}}t.FetchEvent=s;export{t as A};