@foxy.io/elements 1.42.0-beta.6 → 1.42.0-beta.7

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 (236) hide show
  1. package/dist/cdn/foxy-access-recovery-form.js +1 -1
  2. package/dist/cdn/foxy-address-card.js +5 -5
  3. package/dist/cdn/foxy-address-form.js +1 -1
  4. package/dist/cdn/foxy-admin-subscription-card.js +1 -1
  5. package/dist/cdn/foxy-admin-subscription-form.js +1 -1
  6. package/dist/cdn/foxy-api-browser.js +1 -1
  7. package/dist/cdn/foxy-applied-coupon-code-card.js +1 -1
  8. package/dist/cdn/foxy-applied-coupon-code-form.js +1 -1
  9. package/dist/cdn/foxy-applied-tax-card.js +1 -1
  10. package/dist/cdn/foxy-attribute-card.js +1 -1
  11. package/dist/cdn/foxy-attribute-form.js +1 -1
  12. package/dist/cdn/foxy-billing-address-card.js +1 -1
  13. package/dist/cdn/foxy-cancellation-form.js +1 -1
  14. package/dist/cdn/foxy-cart-card.js +1 -1
  15. package/dist/cdn/foxy-cart-form.js +2 -2
  16. package/dist/cdn/foxy-client-card.js +1 -1
  17. package/dist/cdn/foxy-client-form.js +1 -1
  18. package/dist/cdn/foxy-collection-page.js +1 -1
  19. package/dist/cdn/foxy-collection-pages.js +1 -1
  20. package/dist/cdn/foxy-copy-to-clipboard.js +1 -1
  21. package/dist/cdn/foxy-coupon-card.js +1 -1
  22. package/dist/cdn/foxy-coupon-code-card.js +1 -1
  23. package/dist/cdn/foxy-coupon-code-form.js +1 -1
  24. package/dist/cdn/foxy-coupon-codes-form.js +1 -1
  25. package/dist/cdn/foxy-coupon-detail-card.js +1 -1
  26. package/dist/cdn/foxy-coupon-form.js +1 -1
  27. package/dist/cdn/foxy-custom-field-card.js +1 -1
  28. package/dist/cdn/foxy-custom-field-form.js +1 -1
  29. package/dist/cdn/foxy-customer-card.js +1 -1
  30. package/dist/cdn/foxy-customer-form.js +1 -1
  31. package/dist/cdn/foxy-customer-portal-settings-form.js +1 -1
  32. package/dist/cdn/foxy-customer-portal-settings.js +1 -1
  33. package/dist/cdn/foxy-customer-portal.js +1 -1
  34. package/dist/cdn/foxy-customer.js +1 -1
  35. package/dist/cdn/foxy-customers-table.js +1 -1
  36. package/dist/cdn/foxy-discount-builder.js +1 -1
  37. package/dist/cdn/foxy-discount-card.js +1 -1
  38. package/dist/cdn/foxy-discount-detail-card.js +1 -1
  39. package/dist/cdn/foxy-donation.js +1 -1
  40. package/dist/cdn/foxy-downloadable-card.js +1 -1
  41. package/dist/cdn/foxy-downloadable-form.js +1 -1
  42. package/dist/cdn/foxy-email-template-card.js +1 -1
  43. package/dist/cdn/foxy-email-template-form.js +1 -1
  44. package/dist/cdn/foxy-error-entry-card.js +1 -1
  45. package/dist/cdn/foxy-experimental-add-to-cart-builder.js +1 -1
  46. package/dist/cdn/foxy-filter-attribute-card.js +1 -1
  47. package/dist/cdn/foxy-filter-attribute-form.js +1 -1
  48. package/dist/cdn/foxy-form-dialog.js +1 -1
  49. package/dist/cdn/foxy-generate-codes-form.js +1 -1
  50. package/dist/cdn/foxy-gift-card-card.js +1 -1
  51. package/dist/cdn/foxy-gift-card-code-card.js +1 -1
  52. package/dist/cdn/foxy-gift-card-code-form.js +1 -1
  53. package/dist/cdn/foxy-gift-card-code-log-card.js +1 -1
  54. package/dist/cdn/foxy-gift-card-codes-form.js +1 -1
  55. package/dist/cdn/foxy-gift-card-form.js +1 -1
  56. package/dist/cdn/foxy-i18n-editor.js +4 -4
  57. package/dist/cdn/foxy-i18n.js +1 -1
  58. package/dist/cdn/foxy-integration-card.js +1 -1
  59. package/dist/cdn/foxy-integration-form.js +1 -1
  60. package/dist/cdn/foxy-item-card.js +1 -1
  61. package/dist/cdn/foxy-item-category-card.js +1 -1
  62. package/dist/cdn/foxy-item-category-form.js +1 -1
  63. package/dist/cdn/foxy-item-form.js +1 -1
  64. package/dist/cdn/foxy-item-option-card.js +1 -1
  65. package/dist/cdn/foxy-item-option-form.js +1 -1
  66. package/dist/cdn/foxy-items-form.js +1 -1
  67. package/dist/cdn/foxy-native-integration-card.js +1 -1
  68. package/dist/cdn/foxy-native-integration-form.js +1 -1
  69. package/dist/cdn/foxy-pagination.js +1 -1
  70. package/dist/cdn/foxy-passkey-card.js +1 -1
  71. package/dist/cdn/foxy-passkey-form.js +1 -1
  72. package/dist/cdn/foxy-payment-card-embed.js +1 -1
  73. package/dist/cdn/foxy-payment-card.js +1 -1
  74. package/dist/cdn/foxy-payment-method-card.js +1 -1
  75. package/dist/cdn/foxy-payments-api-fraud-protection-card.js +1 -1
  76. package/dist/cdn/foxy-payments-api-fraud-protection-form.js +1 -1
  77. package/dist/cdn/foxy-payments-api-payment-method-card.js +1 -1
  78. package/dist/cdn/foxy-payments-api-payment-method-form.js +1 -1
  79. package/dist/cdn/foxy-payments-api-payment-preset-card.js +1 -1
  80. package/dist/cdn/foxy-payments-api-payment-preset-form.js +1 -1
  81. package/dist/cdn/foxy-query-builder.js +1 -1
  82. package/dist/cdn/foxy-report-form.js +10 -10
  83. package/dist/cdn/foxy-reports-table.js +1 -1
  84. package/dist/cdn/foxy-shipment-card.js +1 -1
  85. package/dist/cdn/foxy-shipping-container-card.js +1 -1
  86. package/dist/cdn/foxy-shipping-drop-type-card.js +1 -1
  87. package/dist/cdn/foxy-shipping-method-card.js +1 -1
  88. package/dist/cdn/foxy-shipping-service-card.js +1 -1
  89. package/dist/cdn/foxy-sign-in-form.js +1 -1
  90. package/dist/cdn/foxy-spinner.js +2 -2
  91. package/dist/cdn/foxy-store-card.js +1 -1
  92. package/dist/cdn/foxy-store-form.js +1 -1
  93. package/dist/cdn/foxy-store-shipping-method-form.js +1 -1
  94. package/dist/cdn/foxy-subscription-card.js +1 -1
  95. package/dist/cdn/foxy-subscription-form.js +1 -1
  96. package/dist/cdn/foxy-subscription-settings-form.js +1 -1
  97. package/dist/cdn/foxy-subscriptions-table.js +1 -1
  98. package/dist/cdn/foxy-swipe-actions.js +1 -1
  99. package/dist/cdn/foxy-table.js +1 -1
  100. package/dist/cdn/foxy-tax-card.js +1 -1
  101. package/dist/cdn/foxy-tax-form.js +1 -1
  102. package/dist/cdn/foxy-template-config-form.js +1 -1
  103. package/dist/cdn/foxy-template-form.js +1 -1
  104. package/dist/cdn/foxy-template-set-card.js +1 -1
  105. package/dist/cdn/foxy-template-set-form.js +1 -1
  106. package/dist/cdn/foxy-transaction-card.js +1 -1
  107. package/dist/cdn/foxy-transaction.js +1 -1
  108. package/dist/cdn/foxy-transactions-table.js +7 -7
  109. package/dist/cdn/foxy-update-payment-method-form.js +1 -1
  110. package/dist/cdn/foxy-user-card.js +1 -1
  111. package/dist/cdn/foxy-user-form.js +1 -1
  112. package/dist/cdn/foxy-user-invitation-card.js +1 -1
  113. package/dist/cdn/foxy-user-invitation-form.js +1 -1
  114. package/dist/cdn/foxy-users-table.js +1 -1
  115. package/dist/cdn/foxy-webhook-card.js +1 -1
  116. package/dist/cdn/foxy-webhook-form.js +1 -1
  117. package/dist/cdn/foxy-webhook-log-card.js +1 -1
  118. package/dist/cdn/foxy-webhook-status-card.js +1 -1
  119. package/dist/cdn/{shared-864ea319.js → shared-0553380e.js} +1 -1
  120. package/dist/cdn/{shared-fca3a317.js → shared-0c242246.js} +1 -1
  121. package/dist/cdn/{shared-25167d28.js → shared-0cc8df04.js} +1 -1
  122. package/dist/cdn/{shared-4e309d01.js → shared-0cfb1c08.js} +1 -1
  123. package/dist/cdn/{shared-77f39a8a.js → shared-0f4dfb14.js} +1 -1
  124. package/dist/cdn/{shared-16ae74b2.js → shared-1aff90a9.js} +1 -1
  125. package/dist/cdn/shared-1b46df2a.js +417 -0
  126. package/dist/cdn/{shared-70380f94.js → shared-1d03f911.js} +1 -1
  127. package/dist/cdn/shared-241b6cca.js +231 -0
  128. package/dist/cdn/{shared-56d91134.js → shared-2939f350.js} +1 -1
  129. package/dist/cdn/shared-2b126cea.js +25 -0
  130. package/dist/cdn/{shared-4ded48ee.js → shared-2fe8aabd.js} +1 -1
  131. package/dist/cdn/{shared-7a2aaafa.js → shared-330e57d9.js} +1 -1
  132. package/dist/cdn/shared-35c9fa1d.js +1 -0
  133. package/dist/cdn/{shared-49337d35.js → shared-393a7ab2.js} +1 -1
  134. package/dist/cdn/{shared-bc2eb9bb.js → shared-3a2134c8.js} +1 -1
  135. package/dist/cdn/{shared-7f5f6657.js → shared-3aca4932.js} +1 -1
  136. package/dist/cdn/{shared-e4768909.js → shared-3cdec25d.js} +9 -9
  137. package/dist/cdn/{shared-8b891950.js → shared-40028e80.js} +1 -1
  138. package/dist/cdn/{shared-127ec8a7.js → shared-434cdfec.js} +1 -1
  139. package/dist/cdn/{shared-df369311.js → shared-46f8e3d9.js} +1 -1
  140. package/dist/cdn/{shared-5960c279.js → shared-4bd1f3d8.js} +1 -1
  141. package/dist/cdn/shared-4cae017c.js +1 -0
  142. package/dist/cdn/{shared-42c91940.js → shared-4d919766.js} +1 -1
  143. package/dist/cdn/{shared-e55e32dd.js → shared-4f808d2e.js} +1 -1
  144. package/dist/cdn/{shared-a4ca1c5d.js → shared-53253d60.js} +1 -1
  145. package/dist/cdn/{shared-663794ff.js → shared-5520b96c.js} +1 -1
  146. package/dist/cdn/shared-578cde14.js +1 -0
  147. package/dist/cdn/{shared-7b3aac7e.js → shared-58b6710c.js} +1 -1
  148. package/dist/cdn/{shared-16d1018b.js → shared-5a04e75c.js} +1 -1
  149. package/dist/cdn/{shared-92153a7f.js → shared-5d7c4673.js} +1 -1
  150. package/dist/cdn/{shared-1b7e17c7.js → shared-692691ca.js} +1 -1
  151. package/dist/cdn/{shared-e653b80e.js → shared-6f08d218.js} +1 -1
  152. package/dist/cdn/{shared-2a5d1cdf.js → shared-753fdd34.js} +1 -1
  153. package/dist/cdn/{shared-500b7eb7.js → shared-7977d581.js} +2 -2
  154. package/dist/cdn/{shared-d5f6483f.js → shared-7eeb591f.js} +1 -1
  155. package/dist/cdn/{shared-9a4d52dd.js → shared-86337ba8.js} +1 -1
  156. package/dist/cdn/{shared-3ca95e21.js → shared-8c42634c.js} +1 -1
  157. package/dist/cdn/{shared-1f6366c0.js → shared-8e010314.js} +1 -1
  158. package/dist/cdn/{shared-7995cbcf.js → shared-8f81f4ed.js} +1 -1
  159. package/dist/cdn/{shared-6f1261fa.js → shared-92995c02.js} +1 -1
  160. package/dist/cdn/{shared-076f086a.js → shared-948919d2.js} +1 -1
  161. package/dist/cdn/{shared-a1f654fc.js → shared-98f382f3.js} +1 -1
  162. package/dist/cdn/{shared-76cbea00.js → shared-9d4813e6.js} +1 -1
  163. package/dist/cdn/{shared-eb086cef.js → shared-a60ca6fe.js} +1 -1
  164. package/dist/cdn/{shared-ee9ee09a.js → shared-ae2336ab.js} +1 -1
  165. package/dist/cdn/{shared-6b3b8c63.js → shared-b05ef317.js} +1 -1
  166. package/dist/cdn/shared-b1c9199f.js +531 -0
  167. package/dist/cdn/{shared-5714fc55.js → shared-b6c5ac14.js} +2 -2
  168. package/dist/cdn/{shared-253e51f7.js → shared-c009b9b6.js} +1 -1
  169. package/dist/cdn/{shared-75e7361d.js → shared-c231e3bf.js} +1 -1
  170. package/dist/cdn/{shared-a3a18e8d.js → shared-c584966f.js} +1 -1
  171. package/dist/cdn/{shared-90754404.js → shared-c5b019e5.js} +1 -1
  172. package/dist/cdn/{shared-eed9b226.js → shared-cae254ee.js} +9 -9
  173. package/dist/cdn/{shared-771431a9.js → shared-ceeb14e9.js} +1 -1
  174. package/dist/cdn/{shared-fc66cb5d.js → shared-cf008f13.js} +1 -1
  175. package/dist/cdn/{shared-f9f64dee.js → shared-d3d4badd.js} +1 -1
  176. package/dist/cdn/{shared-d2304d50.js → shared-d743d0fd.js} +1 -1
  177. package/dist/cdn/{shared-a3a4c368.js → shared-d8694661.js} +6 -6
  178. package/dist/cdn/{shared-1ce5b073.js → shared-e1400289.js} +1 -1
  179. package/dist/cdn/shared-e615d2d9.js +1 -0
  180. package/dist/cdn/{shared-677953e0.js → shared-ec9893c7.js} +1 -1
  181. package/dist/cdn/{shared-68a5368a.js → shared-f79f08cc.js} +1 -1
  182. package/dist/cdn/translations/admin-subscription-form/en.json +112 -48
  183. package/dist/cdn/translations/api-browser/en.json +7 -3
  184. package/dist/cdn/translations/cart-form/en.json +91 -39
  185. package/dist/cdn/translations/coupon-code-form/en.json +7 -3
  186. package/dist/cdn/translations/coupon-form/en.json +28 -12
  187. package/dist/cdn/translations/customer/en.json +28 -12
  188. package/dist/cdn/translations/customer-portal/de.json +14 -6
  189. package/dist/cdn/translations/customer-portal/en.json +14 -6
  190. package/dist/cdn/translations/customer-portal/es.json +14 -6
  191. package/dist/cdn/translations/customer-portal/fr.json +14 -6
  192. package/dist/cdn/translations/customer-portal/nl.json +14 -6
  193. package/dist/cdn/translations/customer-portal/pl.json +14 -6
  194. package/dist/cdn/translations/customer-portal/sv.json +14 -6
  195. package/dist/cdn/translations/customer-portal/zh-HK.json +14 -6
  196. package/dist/cdn/translations/customer-portal-settings-form/en.json +14 -6
  197. package/dist/cdn/translations/experimental-add-to-cart-builder/en.json +28 -12
  198. package/dist/cdn/translations/gift-card-code-form/en.json +14 -6
  199. package/dist/cdn/translations/gift-card-form/en.json +35 -15
  200. package/dist/cdn/translations/item-category-form/en.json +14 -6
  201. package/dist/cdn/translations/item-form/en.json +35 -15
  202. package/dist/cdn/translations/native-integration-form/en.json +14 -6
  203. package/dist/cdn/translations/pagination/en.json +7 -3
  204. package/dist/cdn/translations/payment-method-card/en.json +7 -3
  205. package/dist/cdn/translations/store-shipping-method-form/en.json +28 -12
  206. package/dist/cdn/translations/subscription-form/en.json +21 -9
  207. package/dist/cdn/translations/tax-form/en.json +7 -3
  208. package/dist/cdn/translations/template-set-form/en.json +7 -3
  209. package/dist/cdn/translations/transaction/en.json +98 -42
  210. package/dist/cdn/translations/update-payment-method-form/en.json +7 -3
  211. package/dist/cdn/translations/webhook-form/en.json +14 -6
  212. package/dist/elements/internal/InternalNumberControl/InternalNumberControl.js +13 -31
  213. package/dist/elements/internal/InternalNumberControl/InternalNumberControl.js.map +1 -1
  214. package/dist/elements/public/Pagination/Pagination.js +98 -91
  215. package/dist/elements/public/Pagination/Pagination.js.map +1 -1
  216. package/dist/elements/public/Pagination/index.d.ts +1 -0
  217. package/dist/elements/public/Pagination/index.js +1 -0
  218. package/dist/elements/public/Pagination/index.js.map +1 -1
  219. package/dist/elements/public/SwipeActions/SwipeActions.d.ts +1 -0
  220. package/dist/elements/public/SwipeActions/SwipeActions.js +8 -5
  221. package/dist/elements/public/SwipeActions/SwipeActions.js.map +1 -1
  222. package/dist/mixins/themeable.js +0 -18
  223. package/dist/mixins/themeable.js.map +1 -1
  224. package/package.json +1 -1
  225. package/dist/cdn/shared-0662adb7.js +0 -1
  226. package/dist/cdn/shared-0995ae7c.js +0 -637
  227. package/dist/cdn/shared-0e1ad508.js +0 -1
  228. package/dist/cdn/shared-20fb2969.js +0 -88
  229. package/dist/cdn/shared-21fba20d.js +0 -1
  230. package/dist/cdn/shared-292dcee0.js +0 -10
  231. package/dist/cdn/shared-5c057c26.js +0 -419
  232. package/dist/cdn/shared-651c44fa.js +0 -6
  233. package/dist/cdn/shared-7a4ca3f1.js +0 -1
  234. package/dist/cdn/shared-986d0f7f.js +0 -1
  235. package/dist/cdn/shared-c365c1ae.js +0 -31
  236. package/dist/cdn/shared-f28e46bf.js +0 -12
@@ -1 +1 @@
1
- import"./shared-5960c279.js";import"./shared-0e1ad508.js";import{I as e}from"./shared-7995cbcf.js";import{a as r}from"./shared-1ce5b073.js";import{B as s}from"./shared-cb58dfcd.js";import{h as t}from"./shared-ba5c42c7.js";import"./shared-127ec8a7.js";import"./shared-a3a4c368.js";import"./shared-500b7eb7.js";import"./shared-7b3aac7e.js";import"./shared-0995ae7c.js";import"./shared-16ae74b2.js";import"./shared-677953e0.js";import"./shared-5212ef4f.js";import"./shared-70380f94.js";import"./shared-343d1fd7.js";import"./shared-2aa23b5f.js";import"./shared-5afb584d.js";import"./shared-53e42a77.js";import"./shared-f83207fb.js";import"./shared-5592ec6e.js";import"./shared-cd96ff03.js";import"./shared-5e4a03d1.js";import"./shared-7594e563.js";import"./shared-0aedd809.js";import"./shared-5ef40e86.js";import"./shared-4e709717.js";import"./shared-5fd5805c.js";import"./shared-d0aed1c1.js";import"./shared-53e476fd.js";import"./shared-6b3b8c63.js";import"./shared-76cbea00.js";import"./shared-d2304d50.js";import"./shared-4ded48ee.js";import"./shared-92153a7f.js";import"./shared-68a5368a.js";import"./shared-1f6366c0.js";import"./shared-a4ca1c5d.js";import"./foxy-copy-to-clipboard.js";import"./shared-75e7361d.js";import"./foxy-spinner.js";import"./shared-bab2ea2c.js";let a,d=e=>e;const o=r(e,"gift-card-codes-form");class i extends o{constructor(){super(...arguments),this.__giftCardCodesGetValue=()=>{var e,r;return null!==(r=null===(e=this.form.gift_card_codes)||void 0===e?void 0:e.map((e=>({value:e}))))&&void 0!==r?r:[]},this.__giftCardCodesSetValue=e=>{this.edit({gift_card_codes:e.map((({value:e})=>e.split(" ").map((e=>e.trim())))).flat().filter(((e,r,s)=>s.indexOf(e)===r))})}}static get v8n(){return[({gift_card_codes:e})=>e&&e.length>0||"gift-card-codes:v8n_required"]}get readonlySelector(){const e=[super.readonlySelector.toString()];return this.href&&e.push("gift-card-codes"),new s(e.join(" ").trim())}get hiddenSelector(){const e=["delete timestamps",super.hiddenSelector.toString()];return new s(e.join(" ").trim())}renderBody(){return t(a||(a=d` <foxy-internal-editable-list-control infer="gift-card-codes" .getValue="${0}" .setValue="${0}"> </foxy-internal-editable-list-control> <foxy-internal-number-control infer="current-balance" min="0"></foxy-internal-number-control> ${0} `),this.__giftCardCodesGetValue,this.__giftCardCodesSetValue,super.renderBody())}async _sendPost(e){const r=JSON.stringify(e),s=await this._fetch(this.parent,{body:r,method:"POST"});return this.status={key:"success"},s}}customElements.define("foxy-gift-card-codes-form",i);export{i as GiftCardCodesForm};
1
+ import"./shared-4bd1f3d8.js";import"./shared-4cae017c.js";import{I as e}from"./shared-8f81f4ed.js";import{a as r}from"./shared-e1400289.js";import{B as s}from"./shared-cb58dfcd.js";import{h as t}from"./shared-ba5c42c7.js";import"./shared-434cdfec.js";import"./shared-d8694661.js";import"./shared-7977d581.js";import"./shared-58b6710c.js";import"./shared-1b46df2a.js";import"./shared-241b6cca.js";import"./shared-1aff90a9.js";import"./shared-ec9893c7.js";import"./shared-5212ef4f.js";import"./shared-1d03f911.js";import"./shared-343d1fd7.js";import"./shared-2aa23b5f.js";import"./shared-5afb584d.js";import"./shared-53e42a77.js";import"./shared-f83207fb.js";import"./shared-5592ec6e.js";import"./shared-cd96ff03.js";import"./shared-5e4a03d1.js";import"./shared-7594e563.js";import"./shared-0aedd809.js";import"./shared-5ef40e86.js";import"./shared-4e709717.js";import"./shared-5fd5805c.js";import"./shared-d0aed1c1.js";import"./shared-53e476fd.js";import"./shared-b05ef317.js";import"./shared-9d4813e6.js";import"./shared-d743d0fd.js";import"./shared-2fe8aabd.js";import"./shared-5d7c4673.js";import"./shared-f79f08cc.js";import"./shared-8e010314.js";import"./shared-53253d60.js";import"./foxy-copy-to-clipboard.js";import"./shared-c231e3bf.js";import"./foxy-spinner.js";import"./shared-bab2ea2c.js";let d,a=e=>e;const o=r(e,"gift-card-codes-form");class i extends o{constructor(){super(...arguments),this.__giftCardCodesGetValue=()=>{var e,r;return null!==(r=null===(e=this.form.gift_card_codes)||void 0===e?void 0:e.map((e=>({value:e}))))&&void 0!==r?r:[]},this.__giftCardCodesSetValue=e=>{this.edit({gift_card_codes:e.map((({value:e})=>e.split(" ").map((e=>e.trim())))).flat().filter(((e,r,s)=>s.indexOf(e)===r))})}}static get v8n(){return[({gift_card_codes:e})=>e&&e.length>0||"gift-card-codes:v8n_required"]}get readonlySelector(){const e=[super.readonlySelector.toString()];return this.href&&e.push("gift-card-codes"),new s(e.join(" ").trim())}get hiddenSelector(){const e=["delete timestamps",super.hiddenSelector.toString()];return new s(e.join(" ").trim())}renderBody(){return t(d||(d=a` <foxy-internal-editable-list-control infer="gift-card-codes" .getValue="${0}" .setValue="${0}"> </foxy-internal-editable-list-control> <foxy-internal-number-control infer="current-balance" min="0"></foxy-internal-number-control> ${0} `),this.__giftCardCodesGetValue,this.__giftCardCodesSetValue,super.renderBody())}async _sendPost(e){const r=JSON.stringify(e),s=await this._fetch(this.parent,{body:r,method:"POST"});return this.status={key:"success"},s}}customElements.define("foxy-gift-card-codes-form",i);export{i as GiftCardCodesForm};
@@ -1 +1 @@
1
- import"./shared-df369311.js";import"./shared-663794ff.js";import"./shared-5960c279.js";import"./shared-7f5f6657.js";import"./shared-3ca95e21.js";import"./shared-56d91134.js";import"./shared-eb086cef.js";import"./shared-e653b80e.js";import"./shared-0e1ad508.js";import"./shared-076f086a.js";import{I as e}from"./shared-7995cbcf.js";import"./foxy-generate-codes-form.js";import"./foxy-gift-card-codes-form.js";import"./foxy-item-category-card.js";import"./foxy-gift-card-code-card.js";import"./foxy-gift-card-code-form.js";import"./foxy-nucleon-element.js";import"./foxy-attribute-card.js";import"./foxy-attribute-form.js";import{_ as r,B as t}from"./shared-cb58dfcd.js";import{T as i}from"./shared-8874ec69.js";import{h as o}from"./shared-ba5c42c7.js";import{R as a,a as s}from"./shared-1ce5b073.js";import{i as n}from"./shared-53e42a77.js";import"./shared-42c91940.js";import"./shared-7b3aac7e.js";import"./shared-a3a4c368.js";import"./shared-500b7eb7.js";import"./shared-68a5368a.js";import"./foxy-collection-page.js";import"./foxy-spinner.js";import"./shared-0995ae7c.js";import"./shared-75e7361d.js";import"./shared-70380f94.js";import"./shared-343d1fd7.js";import"./shared-2aa23b5f.js";import"./shared-5afb584d.js";import"./shared-f83207fb.js";import"./shared-5592ec6e.js";import"./shared-cd96ff03.js";import"./shared-5e4a03d1.js";import"./shared-7594e563.js";import"./shared-0aedd809.js";import"./shared-5ef40e86.js";import"./shared-5fd5805c.js";import"./shared-53e476fd.js";import"./foxy-pagination.js";import"./shared-677953e0.js";import"./shared-5212ef4f.js";import"./shared-6b3b8c63.js";import"./shared-76cbea00.js";import"./shared-d2304d50.js";import"./shared-4ded48ee.js";import"./shared-92153a7f.js";import"./shared-4e709717.js";import"./foxy-form-dialog.js";import"./shared-1f6366c0.js";import"./shared-a4ca1c5d.js";import"./shared-127ec8a7.js";import"./shared-16ae74b2.js";import"./shared-d0aed1c1.js";import"./shared-20fb2969.js";import"./shared-986d0f7f.js";import"./shared-292dcee0.js";import"./foxy-swipe-actions.js";import"./shared-7a2aaafa.js";import"./shared-f9f64dee.js";import"./shared-5c057c26.js";import"./shared-0662adb7.js";import"./shared-651c44fa.js";import"./shared-c365c1ae.js";import"./shared-f28e46bf.js";import"./foxy-copy-to-clipboard.js";import"./shared-bab2ea2c.js";import"./shared-2a5d1cdf.js";import"./shared-49337d35.js";import"./shared-253e51f7.js";import"./shared-7a4ca3f1.js";import"./shared-21fba20d.js";import"./shared-a1f654fc.js";import"./shared-e4768909.js";import"./shared-25167d28.js";import"./shared-79d0699c.js";import"./shared-43e2c3f6.js";import"./foxy-gift-card-code-log-card.js";import"./foxy-customer-card.js";import"./foxy-item-card.js";import"./shared-8b891950.js";import"./shared-eb963ba3.js";import"./shared-fca3a317.js";const d=["aed","afn","all","amd","ang","aoa","ars","aud","awg","azn","bam","bbd","bdt","bgn","bhd","bif","bmd","bnd","bob","brl","bsd","btc","btn","bwp","byn","bzd","cad","cdf","chf","clf","clp","cnh","cny","cop","crc","cuc","cup","cve","czk","djf","dkk","dop","dzd","egp","ern","etb","eur","fjd","fkp","gbp","gel","ggp","ghs","gip","gmd","gnf","gtq","gyd","hkd","hnl","hrk","htg","huf","idr","ils","imp","inr","iqd","irr","isk","jep","jmd","jod","jpy","kes","kgs","khr","kmf","kpw","krw","kwd","kyd","kzt","lak","lbp","lkr","lrd","lsl","lyd","mad","mdl","mga","mkd","mmk","mnt","mop","mru","mur","mvr","mwk","mxn","myr","mzn","nad","ngn","nio","nok","npr","nzd","omr","pab","pen","pgk","php","pkr","pln","pyg","qar","ron","rsd","rub","rwf","sar","sbd","scr","sdg","sek","sgd","shp","sll","sos","srd","ssp","std","stn","svc","syp","szl","thb","tjs","tmt","tnd","top","try","ttd","twd","tzs","uah","ugx","usd","uyu","uzs","vef","ves","vnd","vuv","wst","xaf","xag","xau","xcd","xdr","xof","xpd","xpf","xpt","yer","zar","zmw","zwl"];let l,c,f=e=>e;const m=a(s(e,"gift-card-form"));class p extends m{constructor(){var e;super(...arguments),e=this,this.getTransactionPageHref=null,this.getCustomerHref=e=>`https://api.foxycart.com/customers/${e}`,this.codesFilter=null,this.__provisioningMaxBalanceValueGetter=()=>{var e;return null===(e=this.form.provisioning_config)||void 0===e?void 0:e.initial_balance_max},this.__provisioningMaxBalanceValueSetter=e=>{var r,t;const i=null!==(t=null===(r=this.form.provisioning_config)||void 0===r?void 0:r.initial_balance_min)&&void 0!==t?t:e;this.edit({provisioning_config:{allow_autoprovisioning:!0,initial_balance_min:i>e?e:i,initial_balance_max:e}})},this.__provisioningMinBalanceValueGetter=()=>{var e;return null===(e=this.form.provisioning_config)||void 0===e?void 0:e.initial_balance_min},this.__provisioningMinBalanceValueSetter=e=>{var r,t;const i=null!==(t=null===(r=this.form.provisioning_config)||void 0===r?void 0:r.initial_balance_max)&&void 0!==t?t:e;this.edit({provisioning_config:{allow_autoprovisioning:!0,initial_balance_min:e,initial_balance_max:i<e?e:i}})},this.__provisioningToggleValueGetter=()=>{var e;return!!(null===(e=this.form.provisioning_config)||void 0===e?void 0:e.allow_autoprovisioning)},this.__provisioningToggleValueSetter=e=>{var r,t,i,o;e?this.edit({provisioning_config:{allow_autoprovisioning:!0,initial_balance_min:null!==(t=null===(r=this.form.provisioning_config)||void 0===r?void 0:r.initial_balance_min)&&void 0!==t?t:0,initial_balance_max:null!==(o=null===(i=this.form.provisioning_config)||void 0===i?void 0:i.initial_balance_max)&&void 0!==o?o:0}}):this.edit({provisioning_config:null})},this.__productCodeRestrictionsGetValue=()=>{var e;return null===(e=this.form.product_code_restrictions)||void 0===e?void 0:e.split(",").filter((e=>!!e.trim())).map((e=>({value:e,label:e.startsWith("-")?this.t("product-code-restrictions.label_block",{value:e.substring(1)}):this.t("product-code-restrictions.label_allow",{value:e})})))},this.__productCodeRestrictionsSetValue=e=>{this.edit({product_code_restrictions:e.map((({value:e,unit:r})=>"block"===r?`-${e}`:e)).filter(((e,r,t)=>!!e&&t.indexOf(e)===r)).join(",")})},this.__currencyCodeGetValue=()=>{var e;return null===(e=this.form.currency_code)||void 0===e?void 0:e.toLowerCase()},this.__storeLoaderId="storeLoader",this.__codesFilters=[{label:"code",path:"code",type:i.String},{label:"current_balance",path:"current_balance",type:i.Number},{label:"end_date",path:"end_date",type:i.Date},{label:"date_created",path:"date_created",type:i.Date},{label:"date_modified",path:"date_modified",type:i.Date}],this.__codesActions=[{theme:"contrast",state:"idle",text:"copy_button_text",onClick:async function(r){e.__codesActions[0].state="busy",e.__codesActions=[...e.__codesActions];try{await navigator.clipboard.writeText(r.code),e.__codesActions[0].state="end"}catch(r){e.__codesActions[0].state="error"}finally{e.__codesActions=[...e.__codesActions],setTimeout((()=>{e.__codesActions[0].state="idle",e.__codesActions=[...e.__codesActions]}),1e3)}}}]}static get properties(){return r(r({},super.properties),{},{getTransactionPageHref:{attribute:!1},getCustomerHref:{attribute:!1},codesFilter:{attribute:"codes-filter"}})}static get v8n(){return[({name:e})=>!!e||"name:v8n_required",({name:e})=>!e||e.length<=50||"name:v8n_too_long",e=>{var r;if(null===(r=e.provisioning_config)||void 0===r?void 0:r.allow_autoprovisioning){if(!e.sku)return"sku:v8n_required";if(e.sku.length>200)return"sku:v8n_too_long"}return!0},e=>{var r;const t=null===(r=e.provisioning_config)||void 0===r?void 0:r.initial_balance_min;return!("number"==typeof t&&t<0)||"min-balance:v8n_negative"},e=>{var r;const t=null===(r=e.provisioning_config)||void 0===r?void 0:r.initial_balance_max;return!("number"==typeof t&&t<0)||"max-balance:v8n_negative"},({product_code_restrictions:e})=>!e||e.length<=5e3||"product-code-restrictions:v8n_too_long"]}get hiddenSelector(){var e;const r=[super.hiddenSelector.toString()];return this.data||r.push("codes","category-restrictions","attributes"),(null===(e=this.form.provisioning_config)||void 0===e?void 0:e.allow_autoprovisioning)||r.push("provisioning:sku","provisioning:min-balance","provisioning:max-balance"),new t(r.join(" ").trim())}get headerSubtitleOptions(){return{id:this.headerCopyIdValue}}renderHeaderActions(e){return o(l||(l=f` <foxy-internal-bulk-add-action-control parent="${0}" infer="generate" form="foxy-generate-codes-form" .related="${0}"> </foxy-internal-bulk-add-action-control> <foxy-internal-bulk-add-action-control parent="${0}" infer="import" form="foxy-gift-card-codes-form" .related="${0}"> </foxy-internal-bulk-add-action-control> ${0} `),e._links["fx:generate_codes"].href,[e._links["fx:gift_card_codes"].href],e._links["fx:gift_card_codes"].href,[e._links["fx:gift_card_codes"].href],super.renderHeaderActions(e))}renderBody(){var e,r,t,i,a,s,l,m,p,u,_;let h;try{const t=new URL(null!==(r=null===(e=this.data)||void 0===e?void 0:e._links["fx:gift_card_codes"].href)&&void 0!==r?r:"");t.searchParams.set("order","date_created desc"),h=t.toString()}catch(e){h=void 0}return o(c||(c=f` ${0} <foxy-internal-summary-control infer="general"> <foxy-internal-text-control layout="summary-item" infer="name"> </foxy-internal-text-control> <foxy-internal-select-control property="currency_code" layout="summary-item" infer="currency" .getValue="${0}" .options="${0}"> </foxy-internal-select-control> <foxy-internal-frequency-control property="expires_after" layout="summary-item" infer="expires"> </foxy-internal-frequency-control> </foxy-internal-summary-control> <foxy-internal-summary-control infer="provisioning"> <foxy-internal-switch-control infer="toggle" .getValue="${0}" .setValue="${0}"> </foxy-internal-switch-control> <foxy-internal-text-control layout="summary-item" infer="sku"></foxy-internal-text-control> <foxy-internal-number-control layout="summary-item" suffix="${0}" infer="min-balance" min="0" .getValue="${0}" .setValue="${0}"> </foxy-internal-number-control> <foxy-internal-number-control layout="summary-item" suffix="${0}" infer="max-balance" min="0" .getValue="${0}" .setValue="${0}"> </foxy-internal-number-control> </foxy-internal-summary-control> <foxy-internal-async-list-control filter="${0}" first="${0}" limit="5" infer="codes" item="foxy-gift-card-code-card" form="foxy-gift-card-code-form" alert .actions="${0}" .filters="${0}" .formProps="${0}"> </foxy-internal-async-list-control> <foxy-internal-editable-list-control infer="product-code-restrictions" .getValue="${0}" .setValue="${0}" .units="${0}"> </foxy-internal-editable-list-control> <foxy-internal-async-resource-link-list-control foreign-key-for-uri="item_category_uri" foreign-key-for-id="item_category_id" own-key-for-uri="gift_card_uri" options-href="${0}" links-href="${0}" embed-key="fx:gift_card_item_categories" own-uri="${0}" infer="category-restrictions" limit="5" item="foxy-item-category-card"> </foxy-internal-async-resource-link-list-control> <foxy-internal-async-list-control first="${0}" limit="5" infer="attributes" item="foxy-attribute-card" form="foxy-attribute-form" alert> </foxy-internal-async-list-control> ${0} <foxy-nucleon infer="" class="hidden" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> `),this.renderHeader(),this.__currencyCodeGetValue,d.map((e=>({label:this.t(`general.currency.code_${e}`),value:e}))),this.__provisioningToggleValueGetter,this.__provisioningToggleValueSetter,n(null===(t=this.form.currency_code)||void 0===t?void 0:t.toUpperCase()),this.__provisioningMinBalanceValueGetter,this.__provisioningMinBalanceValueSetter,n(null===(i=this.form.currency_code)||void 0===i?void 0:i.toUpperCase()),this.__provisioningMaxBalanceValueGetter,this.__provisioningMaxBalanceValueSetter,n(null!==(a=this.codesFilter)&&void 0!==a?a:void 0),h,this.__codesActions,this.__codesFilters,{".getTransactionPageHref":this.getTransactionPageHref,".getCustomerHref":this.getCustomerHref},this.__productCodeRestrictionsGetValue,this.__productCodeRestrictionsSetValue,[{label:this.t("product-code-restrictions.unit_allow"),value:"allow"},{label:this.t("product-code-restrictions.unit_block"),value:"block"}],n(null===(l=null===(s=this.__storeLoader)||void 0===s?void 0:s.data)||void 0===l?void 0:l._links["fx:item_categories"].href),n(null===(m=this.data)||void 0===m?void 0:m._links["fx:gift_card_item_categories"].href),n(null===(p=this.data)||void 0===p?void 0:p._links.self.href),n(null===(u=this.data)||void 0===u?void 0:u._links["fx:attributes"].href),super.renderBody(),n(null===(_=this.data)||void 0===_?void 0:_._links["fx:store"].href),this.__storeLoaderId,(()=>this.requestUpdate()))}get __storeLoader(){return this.renderRoot.querySelector(`#${this.__storeLoaderId}`)}}customElements.define("foxy-gift-card-form",p);export{p as GiftCardForm};
1
+ import"./shared-46f8e3d9.js";import"./shared-5520b96c.js";import"./shared-4bd1f3d8.js";import"./shared-3aca4932.js";import"./shared-8c42634c.js";import"./shared-2939f350.js";import"./shared-a60ca6fe.js";import"./shared-6f08d218.js";import"./shared-4cae017c.js";import"./shared-948919d2.js";import{I as e}from"./shared-8f81f4ed.js";import"./foxy-generate-codes-form.js";import"./foxy-gift-card-codes-form.js";import"./foxy-item-category-card.js";import"./foxy-gift-card-code-card.js";import"./foxy-gift-card-code-form.js";import"./foxy-nucleon-element.js";import"./foxy-attribute-card.js";import"./foxy-attribute-form.js";import{_ as t,B as r}from"./shared-cb58dfcd.js";import{T as i}from"./shared-8874ec69.js";import{h as o}from"./shared-ba5c42c7.js";import{R as s,a}from"./shared-e1400289.js";import{i as n}from"./shared-53e42a77.js";import"./shared-4d919766.js";import"./shared-58b6710c.js";import"./shared-d8694661.js";import"./shared-7977d581.js";import"./shared-f79f08cc.js";import"./foxy-collection-page.js";import"./foxy-spinner.js";import"./shared-1b46df2a.js";import"./shared-241b6cca.js";import"./shared-c231e3bf.js";import"./shared-1d03f911.js";import"./shared-343d1fd7.js";import"./shared-2aa23b5f.js";import"./shared-5afb584d.js";import"./shared-f83207fb.js";import"./shared-5592ec6e.js";import"./shared-cd96ff03.js";import"./shared-5e4a03d1.js";import"./shared-7594e563.js";import"./shared-0aedd809.js";import"./shared-5ef40e86.js";import"./shared-5fd5805c.js";import"./shared-53e476fd.js";import"./foxy-pagination.js";import"./shared-ec9893c7.js";import"./shared-5212ef4f.js";import"./shared-b05ef317.js";import"./shared-9d4813e6.js";import"./shared-d743d0fd.js";import"./shared-2fe8aabd.js";import"./shared-5d7c4673.js";import"./shared-4e709717.js";import"./shared-b1c9199f.js";import"./shared-e615d2d9.js";import"./shared-2b126cea.js";import"./foxy-form-dialog.js";import"./shared-8e010314.js";import"./shared-53253d60.js";import"./shared-434cdfec.js";import"./shared-1aff90a9.js";import"./shared-d0aed1c1.js";import"./foxy-swipe-actions.js";import"./shared-330e57d9.js";import"./shared-d3d4badd.js";import"./foxy-copy-to-clipboard.js";import"./shared-bab2ea2c.js";import"./shared-753fdd34.js";import"./shared-393a7ab2.js";import"./shared-c009b9b6.js";import"./shared-578cde14.js";import"./shared-35c9fa1d.js";import"./shared-98f382f3.js";import"./shared-3cdec25d.js";import"./shared-0cc8df04.js";import"./shared-79d0699c.js";import"./shared-43e2c3f6.js";import"./foxy-gift-card-code-log-card.js";import"./foxy-customer-card.js";import"./foxy-item-card.js";import"./shared-40028e80.js";import"./shared-eb963ba3.js";import"./shared-0c242246.js";const d=["aed","afn","all","amd","ang","aoa","ars","aud","awg","azn","bam","bbd","bdt","bgn","bhd","bif","bmd","bnd","bob","brl","bsd","btc","btn","bwp","byn","bzd","cad","cdf","chf","clf","clp","cnh","cny","cop","crc","cuc","cup","cve","czk","djf","dkk","dop","dzd","egp","ern","etb","eur","fjd","fkp","gbp","gel","ggp","ghs","gip","gmd","gnf","gtq","gyd","hkd","hnl","hrk","htg","huf","idr","ils","imp","inr","iqd","irr","isk","jep","jmd","jod","jpy","kes","kgs","khr","kmf","kpw","krw","kwd","kyd","kzt","lak","lbp","lkr","lrd","lsl","lyd","mad","mdl","mga","mkd","mmk","mnt","mop","mru","mur","mvr","mwk","mxn","myr","mzn","nad","ngn","nio","nok","npr","nzd","omr","pab","pen","pgk","php","pkr","pln","pyg","qar","ron","rsd","rub","rwf","sar","sbd","scr","sdg","sek","sgd","shp","sll","sos","srd","ssp","std","stn","svc","syp","szl","thb","tjs","tmt","tnd","top","try","ttd","twd","tzs","uah","ugx","usd","uyu","uzs","vef","ves","vnd","vuv","wst","xaf","xag","xau","xcd","xdr","xof","xpd","xpf","xpt","yer","zar","zmw","zwl"];let l,c,f=e=>e;const m=s(a(e,"gift-card-form"));class p extends m{constructor(){var e;super(...arguments),e=this,this.getTransactionPageHref=null,this.getCustomerHref=e=>`https://api.foxycart.com/customers/${e}`,this.codesFilter=null,this.__provisioningMaxBalanceValueGetter=()=>{var e;return null===(e=this.form.provisioning_config)||void 0===e?void 0:e.initial_balance_max},this.__provisioningMaxBalanceValueSetter=e=>{var t,r;const i=null!==(r=null===(t=this.form.provisioning_config)||void 0===t?void 0:t.initial_balance_min)&&void 0!==r?r:e;this.edit({provisioning_config:{allow_autoprovisioning:!0,initial_balance_min:i>e?e:i,initial_balance_max:e}})},this.__provisioningMinBalanceValueGetter=()=>{var e;return null===(e=this.form.provisioning_config)||void 0===e?void 0:e.initial_balance_min},this.__provisioningMinBalanceValueSetter=e=>{var t,r;const i=null!==(r=null===(t=this.form.provisioning_config)||void 0===t?void 0:t.initial_balance_max)&&void 0!==r?r:e;this.edit({provisioning_config:{allow_autoprovisioning:!0,initial_balance_min:e,initial_balance_max:i<e?e:i}})},this.__provisioningToggleValueGetter=()=>{var e;return!!(null===(e=this.form.provisioning_config)||void 0===e?void 0:e.allow_autoprovisioning)},this.__provisioningToggleValueSetter=e=>{var t,r,i,o;e?this.edit({provisioning_config:{allow_autoprovisioning:!0,initial_balance_min:null!==(r=null===(t=this.form.provisioning_config)||void 0===t?void 0:t.initial_balance_min)&&void 0!==r?r:0,initial_balance_max:null!==(o=null===(i=this.form.provisioning_config)||void 0===i?void 0:i.initial_balance_max)&&void 0!==o?o:0}}):this.edit({provisioning_config:null})},this.__productCodeRestrictionsGetValue=()=>{var e;return null===(e=this.form.product_code_restrictions)||void 0===e?void 0:e.split(",").filter((e=>!!e.trim())).map((e=>({value:e,label:e.startsWith("-")?this.t("product-code-restrictions.label_block",{value:e.substring(1)}):this.t("product-code-restrictions.label_allow",{value:e})})))},this.__productCodeRestrictionsSetValue=e=>{this.edit({product_code_restrictions:e.map((({value:e,unit:t})=>"block"===t?`-${e}`:e)).filter(((e,t,r)=>!!e&&r.indexOf(e)===t)).join(",")})},this.__currencyCodeGetValue=()=>{var e;return null===(e=this.form.currency_code)||void 0===e?void 0:e.toLowerCase()},this.__storeLoaderId="storeLoader",this.__codesFilters=[{label:"code",path:"code",type:i.String},{label:"current_balance",path:"current_balance",type:i.Number},{label:"end_date",path:"end_date",type:i.Date},{label:"date_created",path:"date_created",type:i.Date},{label:"date_modified",path:"date_modified",type:i.Date}],this.__codesActions=[{theme:"contrast",state:"idle",text:"copy_button_text",onClick:async function(t){e.__codesActions[0].state="busy",e.__codesActions=[...e.__codesActions];try{await navigator.clipboard.writeText(t.code),e.__codesActions[0].state="end"}catch(t){e.__codesActions[0].state="error"}finally{e.__codesActions=[...e.__codesActions],setTimeout((()=>{e.__codesActions[0].state="idle",e.__codesActions=[...e.__codesActions]}),1e3)}}}]}static get properties(){return t(t({},super.properties),{},{getTransactionPageHref:{attribute:!1},getCustomerHref:{attribute:!1},codesFilter:{attribute:"codes-filter"}})}static get v8n(){return[({name:e})=>!!e||"name:v8n_required",({name:e})=>!e||e.length<=50||"name:v8n_too_long",e=>{var t;if(null===(t=e.provisioning_config)||void 0===t?void 0:t.allow_autoprovisioning){if(!e.sku)return"sku:v8n_required";if(e.sku.length>200)return"sku:v8n_too_long"}return!0},e=>{var t;const r=null===(t=e.provisioning_config)||void 0===t?void 0:t.initial_balance_min;return!("number"==typeof r&&r<0)||"min-balance:v8n_negative"},e=>{var t;const r=null===(t=e.provisioning_config)||void 0===t?void 0:t.initial_balance_max;return!("number"==typeof r&&r<0)||"max-balance:v8n_negative"},({product_code_restrictions:e})=>!e||e.length<=5e3||"product-code-restrictions:v8n_too_long"]}get hiddenSelector(){var e;const t=[super.hiddenSelector.toString()];return this.data||t.push("codes","category-restrictions","attributes"),(null===(e=this.form.provisioning_config)||void 0===e?void 0:e.allow_autoprovisioning)||t.push("provisioning:sku","provisioning:min-balance","provisioning:max-balance"),new r(t.join(" ").trim())}get headerSubtitleOptions(){return{id:this.headerCopyIdValue}}renderHeaderActions(e){return o(l||(l=f` <foxy-internal-bulk-add-action-control parent="${0}" infer="generate" form="foxy-generate-codes-form" .related="${0}"> </foxy-internal-bulk-add-action-control> <foxy-internal-bulk-add-action-control parent="${0}" infer="import" form="foxy-gift-card-codes-form" .related="${0}"> </foxy-internal-bulk-add-action-control> ${0} `),e._links["fx:generate_codes"].href,[e._links["fx:gift_card_codes"].href],e._links["fx:gift_card_codes"].href,[e._links["fx:gift_card_codes"].href],super.renderHeaderActions(e))}renderBody(){var e,t,r,i,s,a,l,m,p,u,_;let h;try{const r=new URL(null!==(t=null===(e=this.data)||void 0===e?void 0:e._links["fx:gift_card_codes"].href)&&void 0!==t?t:"");r.searchParams.set("order","date_created desc"),h=r.toString()}catch(e){h=void 0}return o(c||(c=f` ${0} <foxy-internal-summary-control infer="general"> <foxy-internal-text-control layout="summary-item" infer="name"> </foxy-internal-text-control> <foxy-internal-select-control property="currency_code" layout="summary-item" infer="currency" .getValue="${0}" .options="${0}"> </foxy-internal-select-control> <foxy-internal-frequency-control property="expires_after" layout="summary-item" infer="expires"> </foxy-internal-frequency-control> </foxy-internal-summary-control> <foxy-internal-summary-control infer="provisioning"> <foxy-internal-switch-control infer="toggle" .getValue="${0}" .setValue="${0}"> </foxy-internal-switch-control> <foxy-internal-text-control layout="summary-item" infer="sku"></foxy-internal-text-control> <foxy-internal-number-control layout="summary-item" suffix="${0}" infer="min-balance" min="0" .getValue="${0}" .setValue="${0}"> </foxy-internal-number-control> <foxy-internal-number-control layout="summary-item" suffix="${0}" infer="max-balance" min="0" .getValue="${0}" .setValue="${0}"> </foxy-internal-number-control> </foxy-internal-summary-control> <foxy-internal-async-list-control filter="${0}" first="${0}" limit="5" infer="codes" item="foxy-gift-card-code-card" form="foxy-gift-card-code-form" alert .actions="${0}" .filters="${0}" .formProps="${0}"> </foxy-internal-async-list-control> <foxy-internal-editable-list-control infer="product-code-restrictions" .getValue="${0}" .setValue="${0}" .units="${0}"> </foxy-internal-editable-list-control> <foxy-internal-async-resource-link-list-control foreign-key-for-uri="item_category_uri" foreign-key-for-id="item_category_id" own-key-for-uri="gift_card_uri" options-href="${0}" links-href="${0}" embed-key="fx:gift_card_item_categories" own-uri="${0}" infer="category-restrictions" limit="5" item="foxy-item-category-card"> </foxy-internal-async-resource-link-list-control> <foxy-internal-async-list-control first="${0}" limit="5" infer="attributes" item="foxy-attribute-card" form="foxy-attribute-form" alert> </foxy-internal-async-list-control> ${0} <foxy-nucleon infer="" class="hidden" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> `),this.renderHeader(),this.__currencyCodeGetValue,d.map((e=>({label:this.t(`general.currency.code_${e}`),value:e}))),this.__provisioningToggleValueGetter,this.__provisioningToggleValueSetter,n(null===(r=this.form.currency_code)||void 0===r?void 0:r.toUpperCase()),this.__provisioningMinBalanceValueGetter,this.__provisioningMinBalanceValueSetter,n(null===(i=this.form.currency_code)||void 0===i?void 0:i.toUpperCase()),this.__provisioningMaxBalanceValueGetter,this.__provisioningMaxBalanceValueSetter,n(null!==(s=this.codesFilter)&&void 0!==s?s:void 0),h,this.__codesActions,this.__codesFilters,{".getTransactionPageHref":this.getTransactionPageHref,".getCustomerHref":this.getCustomerHref},this.__productCodeRestrictionsGetValue,this.__productCodeRestrictionsSetValue,[{label:this.t("product-code-restrictions.unit_allow"),value:"allow"},{label:this.t("product-code-restrictions.unit_block"),value:"block"}],n(null===(l=null===(a=this.__storeLoader)||void 0===a?void 0:a.data)||void 0===l?void 0:l._links["fx:item_categories"].href),n(null===(m=this.data)||void 0===m?void 0:m._links["fx:gift_card_item_categories"].href),n(null===(p=this.data)||void 0===p?void 0:p._links.self.href),n(null===(u=this.data)||void 0===u?void 0:u._links["fx:attributes"].href),super.renderBody(),n(null===(_=this.data)||void 0===_?void 0:_._links["fx:store"].href),this.__storeLoaderId,(()=>this.requestUpdate()))}get __storeLoader(){return this.renderRoot.querySelector(`#${this.__storeLoaderId}`)}}customElements.define("foxy-gift-card-form",p);export{p as GiftCardForm};
@@ -1,4 +1,4 @@
1
- import"./shared-7b3aac7e.js";import{h as t,P as e}from"./shared-a3a4c368.js";import{E as r,T as o}from"./shared-500b7eb7.js";import{I as a}from"./shared-651c44fa.js";import"./shared-76cbea00.js";import{L as i}from"./shared-d5f6483f.js";import{I as s}from"./shared-f28e46bf.js";import{a as n}from"./shared-292dcee0.js";import{a as l}from"./shared-0995ae7c.js";import"./foxy-nucleon-element.js";import"./foxy-spinner.js";import"./shared-70380f94.js";import"./shared-68a5368a.js";import"./shared-75e7361d.js";import{_ as d}from"./shared-cb58dfcd.js";import{C as c}from"./shared-5afb584d.js";import{R as m,a as h,T as u}from"./shared-1ce5b073.js";import{N as f}from"./shared-f83207fb.js";import{c as p,h as v}from"./shared-ba5c42c7.js";import{c as b}from"./shared-4e709717.js";import{i as g}from"./shared-53e42a77.js";import{r as y}from"./shared-5fd5805c.js";import"./shared-5592ec6e.js";import"./shared-343d1fd7.js";import"./shared-cd96ff03.js";import"./shared-2aa23b5f.js";import"./shared-5e4a03d1.js";import"./shared-7594e563.js";import"./shared-0aedd809.js";import"./shared-5ef40e86.js";const w=t`<dom-module id="lumo-tab" theme-for="vaadin-tab">
1
+ import"./shared-58b6710c.js";import{h as t,P as e}from"./shared-d8694661.js";import{E as r,T as o}from"./shared-7977d581.js";import{I as a,a as i,b as s}from"./shared-2b126cea.js";import"./shared-9d4813e6.js";import{L as n}from"./shared-7eeb591f.js";import{a as l}from"./shared-241b6cca.js";import"./foxy-nucleon-element.js";import"./foxy-spinner.js";import"./shared-1d03f911.js";import"./shared-f79f08cc.js";import"./shared-c231e3bf.js";import"./shared-1b46df2a.js";import{_ as d}from"./shared-cb58dfcd.js";import{C as c}from"./shared-5afb584d.js";import{R as m,a as h,T as u}from"./shared-e1400289.js";import{N as f}from"./shared-f83207fb.js";import{c as p,h as v}from"./shared-ba5c42c7.js";import{c as b}from"./shared-4e709717.js";import{i as g}from"./shared-53e42a77.js";import{r as y}from"./shared-5fd5805c.js";import"./shared-5592ec6e.js";import"./shared-343d1fd7.js";import"./shared-cd96ff03.js";import"./shared-2aa23b5f.js";import"./shared-5e4a03d1.js";import"./shared-7594e563.js";import"./shared-0aedd809.js";import"./shared-5ef40e86.js";const w=t`<dom-module id="lumo-tab" theme-for="vaadin-tab">
2
2
  <template>
3
3
  <style>
4
4
  :host {
@@ -464,7 +464,7 @@ class x extends(r(o(a(e)))){static get template(){return t`
464
464
  Copyright (c) 2017 Vaadin Ltd.
465
465
  This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
466
466
  */
467
- const k=/Apple.* Version\/(9|10)/.test(navigator.userAgent);class $ extends(r(i(o(l([s],e))))){static get template(){return t`
467
+ const k=/Apple.* Version\/(9|10)/.test(navigator.userAgent);class $ extends(r(n(o(l([s],e))))){static get template(){return t`
468
468
  <style>
469
469
  :host {
470
470
  display: flex;
@@ -550,5 +550,5 @@ const k=/Apple.* Version\/(9|10)/.test(navigator.userAgent);class $ extends(r(i(
550
550
  </div>
551
551
 
552
552
  <div on-click="_scrollForward" part="forward-button"></div>
553
- `}static get is(){return"vaadin-tabs"}static get version(){return"3.2.0"}static get properties(){return{orientation:{value:"horizontal",type:String},selected:{value:0,type:Number}}}static get observers(){return["_updateOverflow(items.*, vertical)"]}ready(){super.ready(),this.addEventListener("iron-resize",(()=>this._updateOverflow())),this._scrollerElement.addEventListener("scroll",(()=>this._updateOverflow())),this.setAttribute("role","tablist"),n(this,(()=>{this._updateOverflow()}))}_scrollForward(){this._scroll(-this.__direction*this._scrollOffset)}_scrollBack(){this._scroll(this.__direction*this._scrollOffset)}get _scrollOffset(){return this._vertical?this._scrollerElement.offsetHeight:this._scrollerElement.offsetWidth}get _scrollerElement(){return this.$.scroll}get __direction(){return this._vertical||"rtl"!==this.getAttribute("dir")?-1:1}_updateOverflow(){const t=this._vertical?this._scrollerElement.scrollTop:this.__getNormalizedScrollLeft(this._scrollerElement);let e=this._vertical?this._scrollerElement.scrollHeight:this._scrollerElement.scrollWidth;e-=1;let r=t>0?"start":"";r+=t+this._scrollOffset<e?" end":"",1==this.__direction&&(r=r.replace(/start|end/gi,(t=>"start"===t?"end":"start"))),r?this.setAttribute("overflow",r.trim()):this.removeAttribute("overflow"),this._repaintShadowNodesHack()}_repaintShadowNodesHack(){if(k&&this.root){const t="-webkit-backface-visibility";this.root.querySelectorAll("*").forEach((e=>{e.style[t]="visible",e.style[t]=""}))}}}customElements.define($.is,$);let j,z,S,O=t=>t;const E=m(h(c(u(f))));customElements.define("foxy-internal-i18n-editor-entry",class extends E{constructor(){super(...arguments),this.defaultValue=null,this.gateway=null,this.code=null}static get properties(){return d(d({},super.properties),{},{defaultValue:{attribute:"default-value"},gateway:{},code:{}})}static get styles(){return[super.styles,p(j||(j=O`:host{--button-height:1.703rem}textarea{-webkit-text-fill-color:var(--lumo-body-text-color)}vaadin-button{height:var(--button-height);--lumo-primary-color-50pct:var(--lumo-success-contrast-color)}.h-bottom-bar{height:calc(var(--button-height) + (var(--lumo-space-xs) * 2))}.h-0{height:0}`))]}render(){var t,e,r;const o=null!==(t=this.form.custom_value)&&void 0!==t?t:this.defaultValue,a=this.in({idle:"snapshot"}),i=this.in({idle:"template"}),s=this.in({idle:{snapshot:"dirty"}}),n=this.in({idle:{template:"dirty"}}),l=s||n,d=!this.in("idle")||this.disabled,c=this.readonly,m=!d&&!c,h=this.in("fail");return v(z||(z=O` <div class="${0}"> <label class="group flex flex-col sm-flex-row"> <div class="flex-1 p-xs break-all" style="max-width:20rem"> <span class="inline-block rounded text-s p-xs font-medium"> ${0} </span> </div> <div class="flex-1 flex"> <div class="relative flex-1"> <div class="opacity-0 text-s p-s font-medium break-all"> <span class="whitespace-pre-wrap">${0}&ZeroWidthSpace;</span> </div> <textarea class="${0}" .value="${0}" ?disabled="${0}" ?readonly="${0}" @input="${0}">
554
- </textarea> </div> ${0} </div> </label> <div class="${0}"> <vaadin-button theme="primary success small" ?disabled="${0}" @click="${0}"> <foxy-i18n infer="" key="undo_button"></foxy-i18n> </vaadin-button> <vaadin-button theme="primary success small" ?disabled="${0}" @click="${0}"> <foxy-i18n infer="" key="save_button"></foxy-i18n> </vaadin-button> </div> </div> `),b({"transition-all rounded ring-1 leading-s text-secondary":!0,"ring-contrast-10":!h&&(!l||c),"ring-success":!h&&l&&!c,"ring-error":h,"opacity-75":d,"hover-ring-contrast-20":!h&&!l&&m,"hover-text-body":!h&&m}),null!==(r=null===(e=this.data)||void 0===e?void 0:e.code)&&void 0!==r?r:this.code,o,b({"absolute inset-0 p-s resize-none":!0,"sm-border-l sm-border-transparent":!0,"break-all text-body transition-colors text-s font-medium":!0,"rounded-b sm-rounded-bl-none sm-rounded-tr":i&&!l,"rounded-bl sm-rounded-bl-none":a&&!l,"sm-rounded-tr":i&&l,"sm-border-contrast-10":c,"bg-contrast-10":!c,"group-hover-bg-contrast-20":m,"focus-outline-none focus-ring-2 focus-ring-inset focus-ring-primary-50":!0}),o,d,c,(t=>{const e=t.currentTarget;this.gateway&&this.edit({gateway:this.gateway}),this.code&&this.edit({code:this.code}),this.edit({custom_value:e.value})}),a?v(S||(S=O` <button class="${0}" title="${0}" theme="contrast icon" ?disabled="${0}" @click="${0}"> <iron-icon class="icon-inline text-xl" icon="icons:restore"></iron-icon> </button> `),b({"flex-shrink-0 w-m flex items-center justify-center":!0,"transition-colors text-tertiary ring-inset":!0,"rounded-br sm-rounded-tr":!l,"sm-rounded-tr":l,"bg-contrast-10":!c,"cursor-default":!m,"cursor-pointer":m,"group-hover-bg-contrast-20 hover-text-body":m,"focus-outline-none focus-ring-2 focus-ring-primary-50":!0}),this.t("delete_button_title"),d||c,(()=>this.delete())):"",b({"transition-all bg-success rounded-b overflow-hidden":!0,"flex items-center justify-end gap-xs px-xs":!0,"h-bottom-bar":l&&!c,"h-0":!l||c}),!m,(()=>this.undo()),!m,(()=>this.submit()))}});let T,L,A,C,I,q,W=t=>t;const H=h(c(u(f)),"i18n-editor");class N extends H{constructor(){super(...arguments),this.languageOverrides=null,this.selectedLanguage=null,this.__selectedTabIndex=0}static get properties(){return d(d({},super.properties),{},{languageOverrides:{attribute:"language-overrides"},selectedLanguage:{attribute:"selected-language"},__selectedTabIndex:{attribute:!1}})}render(){var t,e,r;const o=this.__tabs,a=o[this.__selectedTabIndex],i=null!==(r=null===(t=this.data)||void 0===t?void 0:t.values[null!==(e=this.selectedLanguage)&&void 0!==e?e:""])&&void 0!==r?r:{},s={},n=!this.in({idle:"snapshot"});if(a)if(a.includes("_")){const t=a.substring(0,a.indexOf("_")),e=a.substring(a.indexOf("_")+1),r=i[t][e];for(const o in r)s[`${t}_${e}_${o}`]=r[o]}else for(const t in i)t.startsWith(a)&&(s[t]=i[t]);const l=this.__renderOverridesLoader(),d=l.overrides;return v(T||(T=W` ${0} <div aria-busy="${0}" aria-live="polite" class="relative"> <div class="${0}"> <vaadin-tabs selected="${0}" class="-mx-l" theme="minimal" @selected-changed="${0}"> ${0} </vaadin-tabs> ${0} </div> <div data-testid="spinner" class="${0}"> <foxy-spinner layout="${0}" class="m-auto" state="${0}" infer="spinner"> </foxy-spinner> </div> </div> `),l.template,this.in("busy"),b({"transition-opacity grid grid-cols-1 gap-s":!0,"opacity-0 pointer-events-none":n}),this.__selectedTabIndex,(t=>{var e;const r=t.currentTarget;this.__selectedTabIndex=null!==(e=r.selected)&&void 0!==e?e:0}),o.map((t=>{const e=t.substring(t.indexOf("_")+1).replace(/_/g," "),r=v(L||(L=W`<span class="capitalize">${0}</span>`),e);return v(A||(A=W`<vaadin-tab>${0}</vaadin-tab>`),r)})),y(Object.entries(s),(([t])=>t),(([t,e])=>{var r;let o,i,s;return t.startsWith("gateways_")?(o=t.substring(a.length+1),i=a.substring(9),s=d.find((t=>t.code===o&&t.gateway===i))):(o=t,i=void 0,s=d.find((t=>t.code===o))),v(C||(C=W` <foxy-internal-i18n-editor-entry default-value="${0}" gateway="${0}" parent="${0}" code="${0}" infer="" .data="${0}"> </foxy-internal-i18n-editor-entry> `),e,g(i),g(null!==(r=this.languageOverrides)&&void 0!==r?r:void 0),o,null!=s?s:null)})),b({"transition-opacity absolute inset-0 flex":!0,"opacity-0 pointer-events-none":!n}),this.in("busy")?"no-label":"horizontal",this.in("fail")?"error":this.in({idle:"template"})?"empty":"busy")}get __tabs(){var t;const e=this.selectedLanguage?null===(t=this.data)||void 0===t?void 0:t.values[this.selectedLanguage]:void 0,r=Object.entries(null!=e?e:{}).reduce(((t,[e,r])=>{if("string"==typeof r){const r=e.substring(0,e.indexOf("_"));t.add(r||e)}else Object.entries(r).forEach((([r,o])=>{0!==Object.keys(o).length&&t.add(`${e}_${r}`)}));return t}),new Set);return Array.from(r)}__renderOverridesLoader(){var t;const e=Array.from(this.renderRoot.querySelectorAll("foxy-nucleon")),r=e.reduce(((t,e)=>{var r,o;return[...t,...null!==(o=null===(r=e.data)||void 0===r?void 0:r._embedded["fx:language_overrides"])&&void 0!==o?o:[]]}),[]),o=e[0],a=new Array(Math.ceil(((null===(t=null==o?void 0:o.data)||void 0===t?void 0:t.total_items)||300)/300)).fill(0).map(((t,e)=>{var r;try{const t=new URL(null!==(r=this.languageOverrides)&&void 0!==r?r:"");return t.searchParams.set("offset",String(300*e)),t.searchParams.set("limit","300"),v(I||(I=W` <foxy-nucleon infer="" href="${0}" @update="${0}"> </foxy-nucleon> `),t.toString(),(()=>this.requestUpdate()))}catch(t){return}}));return{template:v(q||(q=W`<div class="hidden">${0}</div>`),a),overrides:r,loaders:e}}}customElements.define("foxy-i18n-editor",N);export{N as I18nEditor};
553
+ `}static get is(){return"vaadin-tabs"}static get version(){return"3.2.0"}static get properties(){return{orientation:{value:"horizontal",type:String},selected:{value:0,type:Number}}}static get observers(){return["_updateOverflow(items.*, vertical)"]}ready(){super.ready(),this.addEventListener("iron-resize",(()=>this._updateOverflow())),this._scrollerElement.addEventListener("scroll",(()=>this._updateOverflow())),this.setAttribute("role","tablist"),i(this,(()=>{this._updateOverflow()}))}_scrollForward(){this._scroll(-this.__direction*this._scrollOffset)}_scrollBack(){this._scroll(this.__direction*this._scrollOffset)}get _scrollOffset(){return this._vertical?this._scrollerElement.offsetHeight:this._scrollerElement.offsetWidth}get _scrollerElement(){return this.$.scroll}get __direction(){return this._vertical||"rtl"!==this.getAttribute("dir")?-1:1}_updateOverflow(){const t=this._vertical?this._scrollerElement.scrollTop:this.__getNormalizedScrollLeft(this._scrollerElement);let e=this._vertical?this._scrollerElement.scrollHeight:this._scrollerElement.scrollWidth;e-=1;let r=t>0?"start":"";r+=t+this._scrollOffset<e?" end":"",1==this.__direction&&(r=r.replace(/start|end/gi,(t=>"start"===t?"end":"start"))),r?this.setAttribute("overflow",r.trim()):this.removeAttribute("overflow"),this._repaintShadowNodesHack()}_repaintShadowNodesHack(){if(k&&this.root){const t="-webkit-backface-visibility";this.root.querySelectorAll("*").forEach((e=>{e.style[t]="visible",e.style[t]=""}))}}}customElements.define($.is,$);let j,z,S,O=t=>t;const E=m(h(c(u(f))));customElements.define("foxy-internal-i18n-editor-entry",class extends E{constructor(){super(...arguments),this.defaultValue=null,this.gateway=null,this.code=null}static get properties(){return d(d({},super.properties),{},{defaultValue:{attribute:"default-value"},gateway:{},code:{}})}static get styles(){return[super.styles,p(j||(j=O`:host{--button-height:1.703rem}textarea{-webkit-text-fill-color:var(--lumo-body-text-color)}vaadin-button{height:var(--button-height);--lumo-primary-color-50pct:var(--lumo-success-contrast-color)}.h-bottom-bar{height:calc(var(--button-height) + (var(--lumo-space-xs) * 2))}.h-0{height:0}`))]}render(){var t,e,r;const o=null!==(t=this.form.custom_value)&&void 0!==t?t:this.defaultValue,a=this.in({idle:"snapshot"}),i=this.in({idle:"template"}),s=this.in({idle:{snapshot:"dirty"}}),n=this.in({idle:{template:"dirty"}}),l=s||n,d=!this.in("idle")||this.disabled,c=this.readonly,m=!d&&!c,h=this.in("fail");return v(z||(z=O` <div class="${0}"> <label class="group flex flex-col sm-flex-row"> <div class="flex-1 p-xs break-all" style="max-width:20rem"> <span class="inline-block rounded text-s p-xs font-medium"> ${0} </span> </div> <div class="flex-1 flex"> <div class="relative flex-1"> <div class="opacity-0 text-s p-s font-medium break-all"> <span class="whitespace-pre-wrap">${0}&ZeroWidthSpace;</span> </div> <textarea class="${0}" .value="${0}" ?disabled="${0}" ?readonly="${0}" @input="${0}">
554
+ </textarea> </div> ${0} </div> </label> <div class="${0}"> <vaadin-button theme="primary success small" ?disabled="${0}" @click="${0}"> <foxy-i18n infer="" key="undo_button"></foxy-i18n> </vaadin-button> <vaadin-button theme="primary success small" ?disabled="${0}" @click="${0}"> <foxy-i18n infer="" key="save_button"></foxy-i18n> </vaadin-button> </div> </div> `),b({"transition-all rounded ring-1 leading-s text-secondary":!0,"ring-contrast-10":!h&&(!l||c),"ring-success":!h&&l&&!c,"ring-error":h,"opacity-75":d,"hover-ring-contrast-20":!h&&!l&&m,"hover-text-body":!h&&m}),null!==(r=null===(e=this.data)||void 0===e?void 0:e.code)&&void 0!==r?r:this.code,o,b({"absolute inset-0 p-s resize-none":!0,"sm-border-l sm-border-transparent":!0,"break-all text-body transition-colors text-s font-medium":!0,"rounded-b sm-rounded-bl-none sm-rounded-tr":i&&!l,"rounded-bl sm-rounded-bl-none":a&&!l,"sm-rounded-tr":i&&l,"sm-border-contrast-10":c,"bg-contrast-10":!c,"group-hover-bg-contrast-20":m,"focus-outline-none focus-ring-2 focus-ring-inset focus-ring-primary-50":!0}),o,d,c,(t=>{const e=t.currentTarget;this.gateway&&this.edit({gateway:this.gateway}),this.code&&this.edit({code:this.code}),this.edit({custom_value:e.value})}),a?v(S||(S=O` <button class="${0}" title="${0}" theme="contrast icon" ?disabled="${0}" @click="${0}"> <iron-icon class="icon-inline text-xl" icon="icons:restore"></iron-icon> </button> `),b({"flex-shrink-0 w-m flex items-center justify-center":!0,"transition-colors text-tertiary ring-inset":!0,"rounded-br sm-rounded-tr":!l,"sm-rounded-tr":l,"bg-contrast-10":!c,"cursor-default":!m,"cursor-pointer":m,"group-hover-bg-contrast-20 hover-text-body":m,"focus-outline-none focus-ring-2 focus-ring-primary-50":!0}),this.t("delete_button_title"),d||c,(()=>this.delete())):"",b({"transition-all bg-success rounded-b overflow-hidden":!0,"flex items-center justify-end gap-xs px-xs":!0,"h-bottom-bar":l&&!c,"h-0":!l||c}),!m,(()=>this.undo()),!m,(()=>this.submit()))}});let T,L,A,C,q,I,W=t=>t;const H=h(c(u(f)),"i18n-editor");class N extends H{constructor(){super(...arguments),this.languageOverrides=null,this.selectedLanguage=null,this.__selectedTabIndex=0}static get properties(){return d(d({},super.properties),{},{languageOverrides:{attribute:"language-overrides"},selectedLanguage:{attribute:"selected-language"},__selectedTabIndex:{attribute:!1}})}render(){var t,e,r;const o=this.__tabs,a=o[this.__selectedTabIndex],i=null!==(r=null===(t=this.data)||void 0===t?void 0:t.values[null!==(e=this.selectedLanguage)&&void 0!==e?e:""])&&void 0!==r?r:{},s={},n=!this.in({idle:"snapshot"});if(a)if(a.includes("_")){const t=a.substring(0,a.indexOf("_")),e=a.substring(a.indexOf("_")+1),r=i[t][e];for(const o in r)s[`${t}_${e}_${o}`]=r[o]}else for(const t in i)t.startsWith(a)&&(s[t]=i[t]);const l=this.__renderOverridesLoader(),d=l.overrides;return v(T||(T=W` ${0} <div aria-busy="${0}" aria-live="polite" class="relative"> <div class="${0}"> <vaadin-tabs selected="${0}" class="-mx-l" theme="minimal" @selected-changed="${0}"> ${0} </vaadin-tabs> ${0} </div> <div data-testid="spinner" class="${0}"> <foxy-spinner layout="${0}" class="m-auto" state="${0}" infer="spinner"> </foxy-spinner> </div> </div> `),l.template,this.in("busy"),b({"transition-opacity grid grid-cols-1 gap-s":!0,"opacity-0 pointer-events-none":n}),this.__selectedTabIndex,(t=>{var e;const r=t.currentTarget;this.__selectedTabIndex=null!==(e=r.selected)&&void 0!==e?e:0}),o.map((t=>{const e=t.substring(t.indexOf("_")+1).replace(/_/g," "),r=v(L||(L=W`<span class="capitalize">${0}</span>`),e);return v(A||(A=W`<vaadin-tab>${0}</vaadin-tab>`),r)})),y(Object.entries(s),(([t])=>t),(([t,e])=>{var r;let o,i,s;return t.startsWith("gateways_")?(o=t.substring(a.length+1),i=a.substring(9),s=d.find((t=>t.code===o&&t.gateway===i))):(o=t,i=void 0,s=d.find((t=>t.code===o))),v(C||(C=W` <foxy-internal-i18n-editor-entry default-value="${0}" gateway="${0}" parent="${0}" code="${0}" infer="" .data="${0}"> </foxy-internal-i18n-editor-entry> `),e,g(i),g(null!==(r=this.languageOverrides)&&void 0!==r?r:void 0),o,null!=s?s:null)})),b({"transition-opacity absolute inset-0 flex":!0,"opacity-0 pointer-events-none":!n}),this.in("busy")?"no-label":"horizontal",this.in("fail")?"error":this.in({idle:"template"})?"empty":"busy")}get __tabs(){var t;const e=this.selectedLanguage?null===(t=this.data)||void 0===t?void 0:t.values[this.selectedLanguage]:void 0,r=Object.entries(null!=e?e:{}).reduce(((t,[e,r])=>{if("string"==typeof r){const r=e.substring(0,e.indexOf("_"));t.add(r||e)}else Object.entries(r).forEach((([r,o])=>{0!==Object.keys(o).length&&t.add(`${e}_${r}`)}));return t}),new Set);return Array.from(r)}__renderOverridesLoader(){var t;const e=Array.from(this.renderRoot.querySelectorAll("foxy-nucleon")),r=e.reduce(((t,e)=>{var r,o;return[...t,...null!==(o=null===(r=e.data)||void 0===r?void 0:r._embedded["fx:language_overrides"])&&void 0!==o?o:[]]}),[]),o=e[0],a=new Array(Math.ceil(((null===(t=null==o?void 0:o.data)||void 0===t?void 0:t.total_items)||300)/300)).fill(0).map(((t,e)=>{var r;try{const t=new URL(null!==(r=this.languageOverrides)&&void 0!==r?r:"");return t.searchParams.set("offset",String(300*e)),t.searchParams.set("limit","300"),v(q||(q=W` <foxy-nucleon infer="" href="${0}" @update="${0}"> </foxy-nucleon> `),t.toString(),(()=>this.requestUpdate()))}catch(t){return}}));return{template:v(I||(I=W`<div class="hidden">${0}</div>`),a),overrides:r,loaders:e}}}customElements.define("foxy-i18n-editor",N);export{N as I18nEditor};
@@ -1 +1 @@
1
- export{I as I18n}from"./shared-70380f94.js";import"./shared-cb58dfcd.js";import"./shared-ba5c42c7.js";import"./shared-1ce5b073.js";import"./shared-343d1fd7.js";import"./shared-2aa23b5f.js";
1
+ export{I as I18n}from"./shared-1d03f911.js";import"./shared-cb58dfcd.js";import"./shared-ba5c42c7.js";import"./shared-e1400289.js";import"./shared-343d1fd7.js";import"./shared-2aa23b5f.js";
@@ -1 +1 @@
1
- import"./shared-7a4ca3f1.js";import"./shared-70380f94.js";import{a as e}from"./shared-1ce5b073.js";import{I as s}from"./shared-253e51f7.js";import{c as a}from"./shared-4e709717.js";import{h as t}from"./shared-ba5c42c7.js";import"./foxy-spinner.js";import"./shared-0995ae7c.js";import"./shared-a3a4c368.js";import"./shared-75e7361d.js";import"./shared-cb58dfcd.js";import"./shared-2aa23b5f.js";import"./shared-343d1fd7.js";import"./shared-f83207fb.js";import"./shared-5592ec6e.js";import"./shared-cd96ff03.js";import"./shared-5e4a03d1.js";import"./shared-7594e563.js";import"./shared-0aedd809.js";import"./shared-5ef40e86.js";let r,d,i=e=>e;const o=e(s,"integration-card");class n extends o{renderBody(){var e;const s=this.data,o=new Date(1e3*(null!==(e=null==s?void 0:s.expires)&&void 0!==e?e:0)),n=o>new Date;return t(r||(r=i` <div class="flex flex-wrap gap-xs leading-s"> <div class="min-w-full"> <div class="flex justify-between gap-s"> <span class="font-medium truncate min-w-0"> ${0}&ZeroWidthSpace; </span> <foxy-i18n class="${0}" infer="" key="status_${0}" .options="${0}"> </foxy-i18n> </div> <div class="text-secondary text-s"> ${0} </div> </div> <div class="text-secondary text-xs bg-contrast-5 rounded overflow-hidden flex"> <span class="font-medium px-xs bg-contrast-5" lang="en">ID</span> <span class="px-xs"><code>${0}</code>&ZeroWidthSpace;</span> </div> <div class="text-secondary text-xs bg-contrast-5 rounded overflow-hidden flex"> <span class="font-medium px-xs bg-contrast-5" lang="en">Email</span> <span class="px-xs"><code>${0}</code>&ZeroWidthSpace;</span> </div> </div> `),null==s?void 0:s.project_name,a({"whitespace-nowrap font-tnum text-s":!0,"text-tertiary":n,"text-error":!n}),n?"active":"expired",{date:o,month:"short",day:"2-digit"},(null==s?void 0:s.project_description)?s.project_description:t(d||(d=i`<foxy-i18n infer="" key="no_description"></foxy-i18n>`)),null==s?void 0:s.client_id,null==s?void 0:s.added_by_email)}}customElements.define("foxy-integration-card",n);export{n as IntegrationCard};
1
+ import"./shared-578cde14.js";import"./shared-1d03f911.js";import{a as e}from"./shared-e1400289.js";import{I as s}from"./shared-c009b9b6.js";import{c as t}from"./shared-4e709717.js";import{h as a}from"./shared-ba5c42c7.js";import"./foxy-spinner.js";import"./shared-1b46df2a.js";import"./shared-241b6cca.js";import"./shared-d8694661.js";import"./shared-c231e3bf.js";import"./shared-cb58dfcd.js";import"./shared-2aa23b5f.js";import"./shared-343d1fd7.js";import"./shared-f83207fb.js";import"./shared-5592ec6e.js";import"./shared-cd96ff03.js";import"./shared-5e4a03d1.js";import"./shared-7594e563.js";import"./shared-0aedd809.js";import"./shared-5ef40e86.js";let d,r,i=e=>e;const o=e(s,"integration-card");class n extends o{renderBody(){var e;const s=this.data,o=new Date(1e3*(null!==(e=null==s?void 0:s.expires)&&void 0!==e?e:0)),n=o>new Date;return a(d||(d=i` <div class="flex flex-wrap gap-xs leading-s"> <div class="min-w-full"> <div class="flex justify-between gap-s"> <span class="font-medium truncate min-w-0"> ${0}&ZeroWidthSpace; </span> <foxy-i18n class="${0}" infer="" key="status_${0}" .options="${0}"> </foxy-i18n> </div> <div class="text-secondary text-s"> ${0} </div> </div> <div class="text-secondary text-xs bg-contrast-5 rounded overflow-hidden flex"> <span class="font-medium px-xs bg-contrast-5" lang="en">ID</span> <span class="px-xs"><code>${0}</code>&ZeroWidthSpace;</span> </div> <div class="text-secondary text-xs bg-contrast-5 rounded overflow-hidden flex"> <span class="font-medium px-xs bg-contrast-5" lang="en">Email</span> <span class="px-xs"><code>${0}</code>&ZeroWidthSpace;</span> </div> </div> `),null==s?void 0:s.project_name,t({"whitespace-nowrap font-tnum text-s":!0,"text-tertiary":n,"text-error":!n}),n?"active":"expired",{date:o,month:"short",day:"2-digit"},(null==s?void 0:s.project_description)?s.project_description:a(r||(r=i`<foxy-i18n infer="" key="no_description"></foxy-i18n>`)),null==s?void 0:s.client_id,null==s?void 0:s.added_by_email)}}customElements.define("foxy-integration-card",n);export{n as IntegrationCard};
@@ -1 +1 @@
1
- import"./shared-68a5368a.js";import"./shared-77f39a8a.js";import{I as e}from"./shared-7995cbcf.js";import"./shared-076f086a.js";import"./shared-5212ef4f.js";import"./foxy-copy-to-clipboard.js";import"./shared-70380f94.js";import{_ as r,B as t}from"./shared-cb58dfcd.js";import{a as s}from"./shared-1ce5b073.js";import{c as a}from"./shared-4e709717.js";import{h as o}from"./shared-ba5c42c7.js";import"./shared-7b3aac7e.js";import"./shared-a3a4c368.js";import"./shared-500b7eb7.js";import"./shared-9a4d52dd.js";import"./shared-4ded48ee.js";import"./shared-92153a7f.js";import"./shared-76cbea00.js";import"./shared-d2304d50.js";import"./shared-677953e0.js";import"./shared-5afb584d.js";import"./shared-53e42a77.js";import"./shared-2aa23b5f.js";import"./shared-f83207fb.js";import"./shared-5592ec6e.js";import"./shared-343d1fd7.js";import"./shared-cd96ff03.js";import"./shared-5e4a03d1.js";import"./shared-7594e563.js";import"./shared-0aedd809.js";import"./shared-5ef40e86.js";import"./shared-1f6366c0.js";import"./shared-a4ca1c5d.js";import"./foxy-spinner.js";import"./shared-0995ae7c.js";import"./shared-75e7361d.js";import"./shared-bab2ea2c.js";import"./shared-d0aed1c1.js";import"./shared-127ec8a7.js";import"./shared-16ae74b2.js";let i,n,d,l,c,h,p,_,m,b,f,u,y=e=>e;const x=s(e,"integration-form");class j extends x{constructor(){super(...arguments),this.__postResponse=null}static get properties(){return r(r({},super.properties),{},{__postResponse:{attribute:!1}})}static get v8n(){return[({project_name:e})=>!!e||"project-name:v8n_required"]}get hiddenSelector(){return new t(`header:copy-id ${super.hiddenSelector}`.trimEnd())}renderBody(){return this.data?this.__renderSnapshotBody():this.__renderTemplateBody()}async _fetch(...e){var r;const t=this.constructor,s=await new t.API(this).fetch(...e),a="string"==typeof e[0]?null===(r=e[1])||void 0===r?void 0:r.method:e[0].method,o="string"==typeof e[0]?e[0]:e[0].url;if(!s.ok)throw s;const i=await s.json();return"POST"===(null==a?void 0:a.toUpperCase())&&o===this.parent&&(this.__postResponse=i),i}__renderSnapshotBody(){const e=this.hiddenSelector,r=this.__postResponse;return o(i||(i=y` ${0} ${0} ${0} <foxy-internal-delete-control infer="delete"></foxy-internal-delete-control> `),this.renderHeader(),e.matches("message",!0)||!r?"":this.__renderMessage(),e.matches("table")?"":this.__renderTable())}__renderTemplateBody(){return o(n||(n=y` ${0} <foxy-internal-text-control infer="project-name"></foxy-internal-text-control> <foxy-internal-text-area-control infer="project-description"> </foxy-internal-text-area-control> <foxy-internal-submit-control infer="create"></foxy-internal-submit-control> `),this.renderHeader())}__renderMessage(){return o(d||(d=y` ${0} <div class="bg-success-10 text-success p-m pb-s space-y-xs leading-s rounded-t-l rounded-b-l"> <foxy-i18n infer="message" class="block" key="text"></foxy-i18n> <vaadin-button data-testid="message-action" theme="tertiary contrast" class="p-0" ?disabled="${0}" @click="${0}"> <foxy-i18n infer="message" key="action"></foxy-i18n> </vaadin-button> </div> ${0} `),this.renderTemplateOrSlot("message:before"),this.disabledSelector.matches("message",!0),(()=>this.__postResponse=null),this.renderTemplateOrSlot("message:after"))}__renderTable(){var e;const r=this.data,t=new Date(1e3*(null!==(e=r.expires)&&void 0!==e?e:0)),s=this.__postResponse;return o(l||(l=y` ${0} <table class="font-lumo text-m leading-m w-full"> <tbody class="divide-y divide-contrast-10"> ${0} ${0} ${0} ${0} ${0} ${0} ${0} </tbody> </table> ${0} `),this.renderTemplateOrSlot("table:before"),this.__renderTableRow({label:this.__renderTableI18n("added_by"),value:this.__renderMailToLink(r.added_by_email,r.added_by_name)}),this.__renderTableRow({label:this.__renderTableI18n("contact"),value:this.__renderMailToLink(r.contact_email,r.contact_name)}),this.__renderTableRow({label:this.__renderTableI18n("company"),value:this.__renderLink(r.company_url,r.company_name)}),this.__renderTableRow({label:this.__renderTableI18n("expires"),value:this.__renderTableI18n("expires_date",{date:t})}),this.__renderTableRow({label:"Client ID",value:this.__renderCopiableText(r.client_id)}),s?o(c||(c=y` ${0} ${0} ${0} `),this.__renderTableRow({highlight:!0,label:"Client secret",value:this.__renderCopiableText(s.client_secret)}),this.__renderTableRow({highlight:!0,label:"Refresh token",value:this.__renderCopiableText(s.refresh_token)}),this.__renderTableRow({highlight:!0,label:"Access token",value:this.__renderCopiableText(s.access_token)})):"",this.__renderTableRow({label:"Scope",value:o(h||(h=y`<code>${0}</code>`),r.scope)}),this.renderTemplateOrSlot("table:after"))}__renderCopiableText(e){return o(p||(p=y` <div class="flex items-center gap-s"> <code class="truncate flex-1">${0}</code> <foxy-copy-to-clipboard infer="copy-to-clipboard" class="inline-block" text="${0}"> </foxy-copy-to-clipboard> </div> `),e,e)}__renderMailToLink(e,r){return e?this.__renderLink(`mailto:${e}`,r):o(_||(_=y`${0}`),r)}__renderLink(e,r){return e?o(b||(b=y` <a target="_blank" class="font-medium text-primary rounded hover-underline focus-outline-none focus-ring-2 focus-ring-primary-50" href="${0}"> ${0} </a> `),e,r):o(m||(m=y`${0}`),r)}__renderTableRow(e){const{label:r,value:t,highlight:s=!1}=e;return o(f||(f=y` <tr class="${0}"> <td class="max-w-0 truncate py-s text-secondary w-1-3 pr-m">${0}</td> <td class="max-w-0 truncate py-s text-body w-2-3">${0}</td> </tr> `),a({"font-medium text-success":s}),r,t)}__renderTableI18n(e,r){return o(u||(u=y`<foxy-i18n infer="table" key="${0}" .options="${0}"></foxy-i18n>`),e,r)}}customElements.define("foxy-integration-form",j);export{j as IntegrationForm};
1
+ import"./shared-f79f08cc.js";import"./shared-0f4dfb14.js";import{I as e}from"./shared-8f81f4ed.js";import"./shared-948919d2.js";import"./shared-5212ef4f.js";import"./foxy-copy-to-clipboard.js";import"./shared-1d03f911.js";import{_ as r,B as t}from"./shared-cb58dfcd.js";import{a as s}from"./shared-e1400289.js";import{c as a}from"./shared-4e709717.js";import{h as o}from"./shared-ba5c42c7.js";import"./shared-58b6710c.js";import"./shared-d8694661.js";import"./shared-7977d581.js";import"./shared-86337ba8.js";import"./shared-2fe8aabd.js";import"./shared-5d7c4673.js";import"./shared-9d4813e6.js";import"./shared-d743d0fd.js";import"./shared-ec9893c7.js";import"./shared-5afb584d.js";import"./shared-53e42a77.js";import"./shared-2aa23b5f.js";import"./shared-f83207fb.js";import"./shared-5592ec6e.js";import"./shared-343d1fd7.js";import"./shared-cd96ff03.js";import"./shared-5e4a03d1.js";import"./shared-7594e563.js";import"./shared-0aedd809.js";import"./shared-5ef40e86.js";import"./shared-8e010314.js";import"./shared-53253d60.js";import"./foxy-spinner.js";import"./shared-1b46df2a.js";import"./shared-241b6cca.js";import"./shared-c231e3bf.js";import"./shared-bab2ea2c.js";import"./shared-d0aed1c1.js";import"./shared-434cdfec.js";import"./shared-1aff90a9.js";let i,n,d,l,c,h,p,_,m,f,b,u,y=e=>e;const j=s(e,"integration-form");class x extends j{constructor(){super(...arguments),this.__postResponse=null}static get properties(){return r(r({},super.properties),{},{__postResponse:{attribute:!1}})}static get v8n(){return[({project_name:e})=>!!e||"project-name:v8n_required"]}get hiddenSelector(){return new t(`header:copy-id ${super.hiddenSelector}`.trimEnd())}renderBody(){return this.data?this.__renderSnapshotBody():this.__renderTemplateBody()}async _fetch(...e){var r;const t=this.constructor,s=await new t.API(this).fetch(...e),a="string"==typeof e[0]?null===(r=e[1])||void 0===r?void 0:r.method:e[0].method,o="string"==typeof e[0]?e[0]:e[0].url;if(!s.ok)throw s;const i=await s.json();return"POST"===(null==a?void 0:a.toUpperCase())&&o===this.parent&&(this.__postResponse=i),i}__renderSnapshotBody(){const e=this.hiddenSelector,r=this.__postResponse;return o(i||(i=y` ${0} ${0} ${0} <foxy-internal-delete-control infer="delete"></foxy-internal-delete-control> `),this.renderHeader(),e.matches("message",!0)||!r?"":this.__renderMessage(),e.matches("table")?"":this.__renderTable())}__renderTemplateBody(){return o(n||(n=y` ${0} <foxy-internal-text-control infer="project-name"></foxy-internal-text-control> <foxy-internal-text-area-control infer="project-description"> </foxy-internal-text-area-control> <foxy-internal-submit-control infer="create"></foxy-internal-submit-control> `),this.renderHeader())}__renderMessage(){return o(d||(d=y` ${0} <div class="bg-success-10 text-success p-m pb-s space-y-xs leading-s rounded-t-l rounded-b-l"> <foxy-i18n infer="message" class="block" key="text"></foxy-i18n> <vaadin-button data-testid="message-action" theme="tertiary contrast" class="p-0" ?disabled="${0}" @click="${0}"> <foxy-i18n infer="message" key="action"></foxy-i18n> </vaadin-button> </div> ${0} `),this.renderTemplateOrSlot("message:before"),this.disabledSelector.matches("message",!0),(()=>this.__postResponse=null),this.renderTemplateOrSlot("message:after"))}__renderTable(){var e;const r=this.data,t=new Date(1e3*(null!==(e=r.expires)&&void 0!==e?e:0)),s=this.__postResponse;return o(l||(l=y` ${0} <table class="font-lumo text-m leading-m w-full"> <tbody class="divide-y divide-contrast-10"> ${0} ${0} ${0} ${0} ${0} ${0} ${0} </tbody> </table> ${0} `),this.renderTemplateOrSlot("table:before"),this.__renderTableRow({label:this.__renderTableI18n("added_by"),value:this.__renderMailToLink(r.added_by_email,r.added_by_name)}),this.__renderTableRow({label:this.__renderTableI18n("contact"),value:this.__renderMailToLink(r.contact_email,r.contact_name)}),this.__renderTableRow({label:this.__renderTableI18n("company"),value:this.__renderLink(r.company_url,r.company_name)}),this.__renderTableRow({label:this.__renderTableI18n("expires"),value:this.__renderTableI18n("expires_date",{date:t})}),this.__renderTableRow({label:"Client ID",value:this.__renderCopiableText(r.client_id)}),s?o(c||(c=y` ${0} ${0} ${0} `),this.__renderTableRow({highlight:!0,label:"Client secret",value:this.__renderCopiableText(s.client_secret)}),this.__renderTableRow({highlight:!0,label:"Refresh token",value:this.__renderCopiableText(s.refresh_token)}),this.__renderTableRow({highlight:!0,label:"Access token",value:this.__renderCopiableText(s.access_token)})):"",this.__renderTableRow({label:"Scope",value:o(h||(h=y`<code>${0}</code>`),r.scope)}),this.renderTemplateOrSlot("table:after"))}__renderCopiableText(e){return o(p||(p=y` <div class="flex items-center gap-s"> <code class="truncate flex-1">${0}</code> <foxy-copy-to-clipboard infer="copy-to-clipboard" class="inline-block" text="${0}"> </foxy-copy-to-clipboard> </div> `),e,e)}__renderMailToLink(e,r){return e?this.__renderLink(`mailto:${e}`,r):o(_||(_=y`${0}`),r)}__renderLink(e,r){return e?o(f||(f=y` <a target="_blank" class="font-medium text-primary rounded hover-underline focus-outline-none focus-ring-2 focus-ring-primary-50" href="${0}"> ${0} </a> `),e,r):o(m||(m=y`${0}`),r)}__renderTableRow(e){const{label:r,value:t,highlight:s=!1}=e;return o(b||(b=y` <tr class="${0}"> <td class="max-w-0 truncate py-s text-secondary w-1-3 pr-m">${0}</td> <td class="max-w-0 truncate py-s text-body w-2-3">${0}</td> </tr> `),a({"font-medium text-success":s}),r,t)}__renderTableI18n(e,r){return o(u||(u=y`<foxy-i18n infer="table" key="${0}" .options="${0}"></foxy-i18n>`),e,r)}}customElements.define("foxy-integration-form",x);export{x as IntegrationForm};
@@ -1 +1 @@
1
- import"./shared-7a4ca3f1.js";import"./foxy-nucleon-element.js";import"./shared-70380f94.js";import{_ as e}from"./shared-cb58dfcd.js";import{a as t}from"./shared-1ce5b073.js";import{C as i}from"./shared-5afb584d.js";import{p as r}from"./shared-8b891950.js";import{I as o}from"./shared-253e51f7.js";import{i as s}from"./shared-53e42a77.js";import{d as a}from"./shared-eb963ba3.js";import{h as d}from"./shared-ba5c42c7.js";import"./foxy-spinner.js";import"./shared-0995ae7c.js";import"./shared-a3a4c368.js";import"./shared-75e7361d.js";import"./shared-2aa23b5f.js";import"./shared-343d1fd7.js";import"./shared-f83207fb.js";import"./shared-5592ec6e.js";import"./shared-cd96ff03.js";import"./shared-5e4a03d1.js";import"./shared-7594e563.js";import"./shared-0aedd809.js";import"./shared-5ef40e86.js";import"./shared-4e709717.js";let l,n,c,u,_,h,v,p=e=>e;const f=i(t(o,"item-card"));class m extends f{constructor(){super(...arguments),this.localeCodes=null,this.settings=null,this.__transactionTemplateLoaderId="transactionTemplateLoader",this.__defaultTemplateSetLoaderId="defaultTemplateSetLoader",this.__localeCodesHelperLoaderId="localeCodesLoader",this.__transactionLoaderId="transactionLoader",this.__templateSetLoaderId="templateSetLoader",this.__storeLoaderId="storeLoader",this.__cartLoaderId="cartLoader"}static get properties(){return e(e({},super.properties),{},{localeCodes:{type:String,attribute:"locale-codes"},settings:{type:Object}})}renderBody(){var e,t,i,r,o,f,y,x,L,g,$;const C=null===(e=this.settings)||void 0===e?void 0:e.cart_display_config,H=null!==(i=null===(t=this.data)||void 0===t?void 0:t.quantity)&&void 0!==i?i:0,w=this.__filteredOptions,b=null!==(o=null===(r=this.data)||void 0===r?void 0:r.price)&&void 0!==o?o:0,S=null!==(y=null===(f=this.data)||void 0===f?void 0:f.code)&&void 0!==y?y:"",j=C?C.show_product_code?S:"":S,E=this.__currencyDisplay,I=this.__currencyCode;return d(l||(l=p` <foxy-nucleon class="hidden" infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <foxy-nucleon class="hidden" infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <foxy-nucleon class="hidden" infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <foxy-nucleon class="hidden" infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <foxy-nucleon class="hidden" infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <foxy-nucleon class="hidden" infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <foxy-nucleon class="hidden" infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <div class="flex items-start leading-xs" style="gap:calc(.625em + (var(--lumo-border-radius)/ 4) - 1px)"> <img class="relative h-s w-s object-cover rounded-s bg-contrast-20 flex-shrink-0 shadow-xs" src="${0}" alt="" @error="${0}"> <div class="flex-1 min-w-0"> <div class="h-s flex items-center"> <div class="min-w-0 flex-1 leading-s"> <div class="flex items-center justify-between"> <div class="truncate text-m font-medium"> ${0} </div> <span class="text-s text-tertiary whitespace-nowrap"> ${0} &times; <foxy-i18n .options="${0}" key="price" infer=""> </foxy-i18n> </span> </div> <div class="truncate text-secondary text-s"> ${0} ${0} &ZeroWidthSpace; </div> </div> </div> ${0} </div> </div> `),s(this.__transactionTemplateHref),this.__transactionTemplateLoaderId,(()=>this.requestUpdate()),s(this.__defaultTemplateSetHref),this.__defaultTemplateSetLoaderId,(()=>this.requestUpdate()),s(this.__localeCodesHelperHref),this.__localeCodesHelperLoaderId,(()=>this.requestUpdate()),s(this.__transactionHref),this.__transactionLoaderId,(()=>this.requestUpdate()),s(this.__templateSetHref),this.__templateSetLoaderId,(()=>this.requestUpdate()),s(this.__storeHref),this.__storeLoaderId,(()=>this.requestUpdate()),s(this.__cartHref),this.__cartLoaderId,(()=>this.requestUpdate()),s(null===(x=this.data)||void 0===x?void 0:x.image),(e=>{e.currentTarget.src=m.__placeholder}),a(null===(L=this.data)||void 0===L?void 0:L.name)||d(n||(n=p`<foxy-i18n infer="" key="no_code"></foxy-i18n>`)),H,{amount:`${b} ${I}`,currencyDisplay:E},j,null!==(g=null==C?void 0:C.show_sub_frequency)&&void 0!==g&&!g||!(null===($=this.data)||void 0===$?void 0:$.subscription_frequency)||this.hiddenSelector.matches("autorenew-icon",!0)?"":d(c||(c=p` ${0} <foxy-i18n infer="" key="${0}" .options="${0}"> </foxy-i18n> `),j?d(u||(u=p`<span> &bull; </span>`)):"",this.__subinfoKey,this.__subinfoOptions),w&&w.length>0?d(_||(_=p` <div class="mt-m"> ${0} </div> `),w.map((e=>d(h||(h=p` <div data-testclass="option" class="flex items-center gap-s text-s leading-s"> <div class="truncate text-secondary"> ${0}: <span class="font-medium text-body">${0}</span> </div> ${0} </div> `),e.name,e.value,e.price_mod?d(v||(v=p` <div class="border-t border-dashed border-contrast-10 flex-1"></div> <div class="whitespace-nowrap text-tertiary"> <foxy-i18n options="${0}" key="price" infer=""> </foxy-i18n> </div> `),JSON.stringify({amount:`${e.price_mod} ${I}`,signDisplay:"exceptZero",currencyDisplay:E})):"")))):"")}get isBodyReady(){const e=!!this.__currencyDisplay&&!!this.__currencyCode;return super.isBodyReady&&e}get __transactionTemplateHref(){var e,t,i;try{const r=null===(e=this.data)||void 0===e?void 0:e._links,o=new URL(null!==(i=null===(t=null==r?void 0:r["fx:subscription"])||void 0===t?void 0:t.href)&&void 0!==i?i:"");return o.searchParams.set("zoom","transaction_template"),o.toString()}catch(e){}}get __defaultTemplateSetHref(){var e,t,i,r;if(""===(null===(t=null!==(e=this.__cart)&&void 0!==e?e:this.__transactionTemplate)||void 0===t?void 0:t.template_set_uri))try{const e=new URL(null!==(r=null===(i=this.__store)||void 0===i?void 0:i._links["fx:template_sets"].href)&&void 0!==r?r:"");return e.searchParams.set("code","DEFAULT"),e.toString()}catch(e){}}get __localeCodesHelperHref(){var e;if(this.__defaultTemplateSetHref||this.__templateSetHref)return null!==(e=this.localeCodes)&&void 0!==e?e:void 0}get __transactionHref(){var e,t;return null===(t=null===(e=this.data)||void 0===e?void 0:e._links["fx:transaction"])||void 0===t?void 0:t.href}get __templateSetHref(){var e;const t=null!==(e=this.__cart)&&void 0!==e?e:this.__transactionTemplate;if(!(null==t?void 0:t.currency_code))return(null==t?void 0:t.template_set_uri)||void 0}get __storeHref(){var e,t;return null===(t=null===(e=this.data)||void 0===e?void 0:e._links["fx:store"])||void 0===t?void 0:t.href}get __cartHref(){var e,t;const i=null===(e=this.data)||void 0===e?void 0:e._links;return null===(t=null==i?void 0:i["fx:cart"])||void 0===t?void 0:t.href}get __transactionTemplate(){var e,t;const i=`#${this.__transactionTemplateLoaderId}`,r=this.renderRoot.querySelector(i);return null!==(t=null===(e=null==r?void 0:r.data)||void 0===e?void 0:e._embedded["fx:transaction_template"])&&void 0!==t?t:null}get __defaultTemplateSet(){var e,t;const i=`#${this.__defaultTemplateSetLoaderId}`,r=this.renderRoot.querySelector(i);return null!==(t=null===(e=null==r?void 0:r.data)||void 0===e?void 0:e._embedded["fx:template_sets"][0])&&void 0!==t?t:null}get __localeCodesHelper(){var e,t;const i=`#${this.__localeCodesHelperLoaderId}`;return null!==(t=null===(e=this.renderRoot.querySelector(i))||void 0===e?void 0:e.data)&&void 0!==t?t:null}get __transaction(){var e,t;const i=`#${this.__transactionLoaderId}`;return null!==(t=null===(e=this.renderRoot.querySelector(i))||void 0===e?void 0:e.data)&&void 0!==t?t:null}get __templateSet(){var e,t;const i=`#${this.__templateSetLoaderId}`;return null!==(t=null===(e=this.renderRoot.querySelector(i))||void 0===e?void 0:e.data)&&void 0!==t?t:null}get __store(){var e,t;const i=`#${this.__storeLoaderId}`;return null!==(t=null===(e=this.renderRoot.querySelector(i))||void 0===e?void 0:e.data)&&void 0!==t?t:null}get __cart(){var e,t;const i=`#${this.__cartLoaderId}`;return null!==(t=null===(e=this.renderRoot.querySelector(i))||void 0===e?void 0:e.data)&&void 0!==t?t:null}get __currencyDisplay(){var e;const t=null===(e=this.__store)||void 0===e?void 0:e.use_international_currency_symbol;return!0===t?"code":!1===t||this.data&&!this.data._links["fx:store"]?"symbol":void 0}get __currencyCode(){var e,t,i,r;const o=this.__transaction;if(o)return o.currency_code;{const o=null!==(e=this.__cart)&&void 0!==e?e:this.__transactionTemplate;if(null==o?void 0:o.currency_code)return o.currency_code;{const e=this.__localeCodesHelper,o=null===(i=null!==(t=this.__templateSet)&&void 0!==t?t:this.__defaultTemplateSet)||void 0===i?void 0:i.locale_code,s=o?null==e?void 0:e.values[o]:void 0;if(s)return null===(r=/Currency: ([A-Z]{3})/g.exec(s))||void 0===r?void 0:r[1]}}}get __subinfoOptions(){var t,i,o;const s=this.__currencyDisplay;if(void 0===s)return;const a=this.__currencyCode;if(void 0===a)return;const d=null===(t=this.__transactionTemplate)||void 0===t?void 0:t.total_order;if(void 0===d)return;const l=null===(i=this.data)||void 0===i?void 0:i.subscription_frequency;if(void 0===l)return;const n=null===(o=this.data)||void 0===o?void 0:o.subscription_start_date;return void 0!==n?e(e({},r(l)),{},{amount:`${d} ${a}`,currencyDisplay:s,startDate:n}):void 0}get __subinfoKey(){var e;const t=null===(e=this.data)||void 0===e?void 0:e.subscription_frequency;if(t)return"subinfo_"+(".5m"===t?"twice_a_month":"recurring")}get __filteredOptions(){var e,t,i,r;const o=null===(e=this.settings)||void 0===e?void 0:e.cart_display_config;if(!1===(null==o?void 0:o.show_product_options))return[];const s=null===(i=null===(t=this.data)||void 0===t?void 0:t._embedded)||void 0===i?void 0:i["fx:item_options"],a=null!==(r=null==o?void 0:o.hidden_product_options)&&void 0!==r?r:[];return null==s?void 0:s.filter((e=>!a.includes(e.name)))}}m.__placeholder='data:image/svg+xml,%3Csvg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg"%3E%3Crect width="40" height="40" fill="%23E8E8E8"/%3E%3Cpath d="M31.5143 0H24.5476L0 24.5476V31.5143L11.7046 19.8097L11.9841 17.0782C12.0983 15.9624 13.0131 15.1154 14.1038 15.1154H15.7373V12.1923C15.7373 10.9815 16.6915 10 17.8687 10H21.5143L31.5143 0Z" fill="white"/%3E%3Cpath d="M11.5434 21.3852L0 32.9285V39.8953L11.5822 28.3131C11.172 27.8663 10.9438 27.2444 11.012 26.5782L11.5434 21.3852Z" fill="white"/%3E%3Cpath d="M12.4305 28.879L1.30951 40H8.27631L19.2763 29H13.1316C12.8853 29 12.6495 28.9573 12.4305 28.879Z" fill="white"/%3E%3Cpath d="M28.3113 19.965L28.0159 17.0782C27.9116 16.0591 27.1395 15.2642 26.1754 15.1341L40 1.3095V8.27627L28.3113 19.965Z" fill="white"/%3E%3Cpath d="M20.6905 29L9.69049 40H16.6572L27.9755 28.6817C27.6541 28.8832 27.2756 29 26.8684 29H20.6905Z" fill="white"/%3E%3Cpath d="M28.6572 28C28.9128 27.5952 29.0415 27.1003 28.988 26.5782L28.4426 21.2479L40 9.69053V16.6572L28.6572 28Z" fill="white"/%3E%3Cpath d="M25.0381 40H18.0715L40 18.0715V25.0381L25.0381 40Z" fill="white"/%3E%3Cpath d="M26.4524 40H33.4191L40 33.4191V26.4524L26.4524 40Z" fill="white"/%3E%3Cpath d="M40 40H34.8333L40 34.8333V40Z" fill="white"/%3E%3Cpath d="M16.1666 0H23.1334L0 23.1334V16.1666L16.1666 0Z" fill="white"/%3E%3Cpath d="M14.7524 0H7.78571L0 7.78573V14.7524L14.7524 0Z" fill="white"/%3E%3Cpath d="M0 0H6.37152L0 6.37151V0Z" fill="white"/%3E%3Cpath d="M21.467 11.4615H17.8687C17.4763 11.4615 17.1582 11.7887 17.1582 12.1923V15.1154H22.8418V12.1923C22.8418 11.7887 22.5237 11.4615 22.1313 11.4615H21.467Z" fill="white"/%3E%3Cpath d="M24.7798 15.1154H24.2627V12.1923C24.2627 11.227 23.6562 10.4075 22.8138 10.1148L32.9286 0H39.89L24.7798 15.1154Z" fill="white"/%3E%3C/svg%3E',customElements.define("foxy-item-card",m);export{m as ItemCard};
1
+ import"./shared-578cde14.js";import"./foxy-nucleon-element.js";import"./shared-1d03f911.js";import{_ as e}from"./shared-cb58dfcd.js";import{a as t}from"./shared-e1400289.js";import{C as i}from"./shared-5afb584d.js";import{p as r}from"./shared-40028e80.js";import{I as o}from"./shared-c009b9b6.js";import{i as s}from"./shared-53e42a77.js";import{d}from"./shared-eb963ba3.js";import{h as a}from"./shared-ba5c42c7.js";import"./foxy-spinner.js";import"./shared-1b46df2a.js";import"./shared-241b6cca.js";import"./shared-d8694661.js";import"./shared-c231e3bf.js";import"./shared-2aa23b5f.js";import"./shared-343d1fd7.js";import"./shared-f83207fb.js";import"./shared-5592ec6e.js";import"./shared-cd96ff03.js";import"./shared-5e4a03d1.js";import"./shared-7594e563.js";import"./shared-0aedd809.js";import"./shared-5ef40e86.js";import"./shared-4e709717.js";let l,n,c,u,_,h,v,p=e=>e;const f=i(t(o,"item-card"));class m extends f{constructor(){super(...arguments),this.localeCodes=null,this.settings=null,this.__transactionTemplateLoaderId="transactionTemplateLoader",this.__defaultTemplateSetLoaderId="defaultTemplateSetLoader",this.__localeCodesHelperLoaderId="localeCodesLoader",this.__transactionLoaderId="transactionLoader",this.__templateSetLoaderId="templateSetLoader",this.__storeLoaderId="storeLoader",this.__cartLoaderId="cartLoader"}static get properties(){return e(e({},super.properties),{},{localeCodes:{type:String,attribute:"locale-codes"},settings:{type:Object}})}renderBody(){var e,t,i,r,o,f,y,x,L,g,$;const C=null===(e=this.settings)||void 0===e?void 0:e.cart_display_config,H=null!==(i=null===(t=this.data)||void 0===t?void 0:t.quantity)&&void 0!==i?i:0,b=this.__filteredOptions,w=null!==(o=null===(r=this.data)||void 0===r?void 0:r.price)&&void 0!==o?o:0,S=null!==(y=null===(f=this.data)||void 0===f?void 0:f.code)&&void 0!==y?y:"",j=C?C.show_product_code?S:"":S,E=this.__currencyDisplay,I=this.__currencyCode;return a(l||(l=p` <foxy-nucleon class="hidden" infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <foxy-nucleon class="hidden" infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <foxy-nucleon class="hidden" infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <foxy-nucleon class="hidden" infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <foxy-nucleon class="hidden" infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <foxy-nucleon class="hidden" infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <foxy-nucleon class="hidden" infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <div class="flex items-start leading-xs" style="gap:calc(.625em + (var(--lumo-border-radius)/ 4) - 1px)"> <img class="relative h-s w-s object-cover rounded-s bg-contrast-20 flex-shrink-0 shadow-xs" src="${0}" alt="" @error="${0}"> <div class="flex-1 min-w-0"> <div class="h-s flex items-center"> <div class="min-w-0 flex-1 leading-s"> <div class="flex items-center justify-between"> <div class="truncate text-m font-medium"> ${0} </div> <span class="text-s text-tertiary whitespace-nowrap"> ${0} &times; <foxy-i18n .options="${0}" key="price" infer=""> </foxy-i18n> </span> </div> <div class="truncate text-secondary text-s"> ${0} ${0} &ZeroWidthSpace; </div> </div> </div> ${0} </div> </div> `),s(this.__transactionTemplateHref),this.__transactionTemplateLoaderId,(()=>this.requestUpdate()),s(this.__defaultTemplateSetHref),this.__defaultTemplateSetLoaderId,(()=>this.requestUpdate()),s(this.__localeCodesHelperHref),this.__localeCodesHelperLoaderId,(()=>this.requestUpdate()),s(this.__transactionHref),this.__transactionLoaderId,(()=>this.requestUpdate()),s(this.__templateSetHref),this.__templateSetLoaderId,(()=>this.requestUpdate()),s(this.__storeHref),this.__storeLoaderId,(()=>this.requestUpdate()),s(this.__cartHref),this.__cartLoaderId,(()=>this.requestUpdate()),s(null===(x=this.data)||void 0===x?void 0:x.image),(e=>{e.currentTarget.src=m.__placeholder}),d(null===(L=this.data)||void 0===L?void 0:L.name)||a(n||(n=p`<foxy-i18n infer="" key="no_code"></foxy-i18n>`)),H,{amount:`${w} ${I}`,currencyDisplay:E},j,null!==(g=null==C?void 0:C.show_sub_frequency)&&void 0!==g&&!g||!(null===($=this.data)||void 0===$?void 0:$.subscription_frequency)||this.hiddenSelector.matches("autorenew-icon",!0)?"":a(c||(c=p` ${0} <foxy-i18n infer="" key="${0}" .options="${0}"> </foxy-i18n> `),j?a(u||(u=p`<span> &bull; </span>`)):"",this.__subinfoKey,this.__subinfoOptions),b&&b.length>0?a(_||(_=p` <div class="mt-m"> ${0} </div> `),b.map((e=>a(h||(h=p` <div data-testclass="option" class="flex items-center gap-s text-s leading-s"> <div class="truncate text-secondary"> ${0}: <span class="font-medium text-body">${0}</span> </div> ${0} </div> `),e.name,e.value,e.price_mod?a(v||(v=p` <div class="border-t border-dashed border-contrast-10 flex-1"></div> <div class="whitespace-nowrap text-tertiary"> <foxy-i18n options="${0}" key="price" infer=""> </foxy-i18n> </div> `),JSON.stringify({amount:`${e.price_mod} ${I}`,signDisplay:"exceptZero",currencyDisplay:E})):"")))):"")}get isBodyReady(){const e=!!this.__currencyDisplay&&!!this.__currencyCode;return super.isBodyReady&&e}get __transactionTemplateHref(){var e,t,i;try{const r=null===(e=this.data)||void 0===e?void 0:e._links,o=new URL(null!==(i=null===(t=null==r?void 0:r["fx:subscription"])||void 0===t?void 0:t.href)&&void 0!==i?i:"");return o.searchParams.set("zoom","transaction_template"),o.toString()}catch(e){}}get __defaultTemplateSetHref(){var e,t,i,r;if(""===(null===(t=null!==(e=this.__cart)&&void 0!==e?e:this.__transactionTemplate)||void 0===t?void 0:t.template_set_uri))try{const e=new URL(null!==(r=null===(i=this.__store)||void 0===i?void 0:i._links["fx:template_sets"].href)&&void 0!==r?r:"");return e.searchParams.set("code","DEFAULT"),e.toString()}catch(e){}}get __localeCodesHelperHref(){var e;if(this.__defaultTemplateSetHref||this.__templateSetHref)return null!==(e=this.localeCodes)&&void 0!==e?e:void 0}get __transactionHref(){var e,t;return null===(t=null===(e=this.data)||void 0===e?void 0:e._links["fx:transaction"])||void 0===t?void 0:t.href}get __templateSetHref(){var e;const t=null!==(e=this.__cart)&&void 0!==e?e:this.__transactionTemplate;if(!(null==t?void 0:t.currency_code))return(null==t?void 0:t.template_set_uri)||void 0}get __storeHref(){var e,t;return null===(t=null===(e=this.data)||void 0===e?void 0:e._links["fx:store"])||void 0===t?void 0:t.href}get __cartHref(){var e,t;const i=null===(e=this.data)||void 0===e?void 0:e._links;return null===(t=null==i?void 0:i["fx:cart"])||void 0===t?void 0:t.href}get __transactionTemplate(){var e,t;const i=`#${this.__transactionTemplateLoaderId}`,r=this.renderRoot.querySelector(i);return null!==(t=null===(e=null==r?void 0:r.data)||void 0===e?void 0:e._embedded["fx:transaction_template"])&&void 0!==t?t:null}get __defaultTemplateSet(){var e,t;const i=`#${this.__defaultTemplateSetLoaderId}`,r=this.renderRoot.querySelector(i);return null!==(t=null===(e=null==r?void 0:r.data)||void 0===e?void 0:e._embedded["fx:template_sets"][0])&&void 0!==t?t:null}get __localeCodesHelper(){var e,t;const i=`#${this.__localeCodesHelperLoaderId}`;return null!==(t=null===(e=this.renderRoot.querySelector(i))||void 0===e?void 0:e.data)&&void 0!==t?t:null}get __transaction(){var e,t;const i=`#${this.__transactionLoaderId}`;return null!==(t=null===(e=this.renderRoot.querySelector(i))||void 0===e?void 0:e.data)&&void 0!==t?t:null}get __templateSet(){var e,t;const i=`#${this.__templateSetLoaderId}`;return null!==(t=null===(e=this.renderRoot.querySelector(i))||void 0===e?void 0:e.data)&&void 0!==t?t:null}get __store(){var e,t;const i=`#${this.__storeLoaderId}`;return null!==(t=null===(e=this.renderRoot.querySelector(i))||void 0===e?void 0:e.data)&&void 0!==t?t:null}get __cart(){var e,t;const i=`#${this.__cartLoaderId}`;return null!==(t=null===(e=this.renderRoot.querySelector(i))||void 0===e?void 0:e.data)&&void 0!==t?t:null}get __currencyDisplay(){var e;const t=null===(e=this.__store)||void 0===e?void 0:e.use_international_currency_symbol;return!0===t?"code":!1===t||this.data&&!this.data._links["fx:store"]?"symbol":void 0}get __currencyCode(){var e,t,i,r;const o=this.__transaction;if(o)return o.currency_code;{const o=null!==(e=this.__cart)&&void 0!==e?e:this.__transactionTemplate;if(null==o?void 0:o.currency_code)return o.currency_code;{const e=this.__localeCodesHelper,o=null===(i=null!==(t=this.__templateSet)&&void 0!==t?t:this.__defaultTemplateSet)||void 0===i?void 0:i.locale_code,s=o?null==e?void 0:e.values[o]:void 0;if(s)return null===(r=/Currency: ([A-Z]{3})/g.exec(s))||void 0===r?void 0:r[1]}}}get __subinfoOptions(){var t,i,o;const s=this.__currencyDisplay;if(void 0===s)return;const d=this.__currencyCode;if(void 0===d)return;const a=null===(t=this.__transactionTemplate)||void 0===t?void 0:t.total_order;if(void 0===a)return;const l=null===(i=this.data)||void 0===i?void 0:i.subscription_frequency;if(void 0===l)return;const n=null===(o=this.data)||void 0===o?void 0:o.subscription_start_date;return void 0!==n?e(e({},r(l)),{},{amount:`${a} ${d}`,currencyDisplay:s,startDate:n}):void 0}get __subinfoKey(){var e;const t=null===(e=this.data)||void 0===e?void 0:e.subscription_frequency;if(t)return"subinfo_"+(".5m"===t?"twice_a_month":"recurring")}get __filteredOptions(){var e,t,i,r;const o=null===(e=this.settings)||void 0===e?void 0:e.cart_display_config;if(!1===(null==o?void 0:o.show_product_options))return[];const s=null===(i=null===(t=this.data)||void 0===t?void 0:t._embedded)||void 0===i?void 0:i["fx:item_options"],d=null!==(r=null==o?void 0:o.hidden_product_options)&&void 0!==r?r:[];return null==s?void 0:s.filter((e=>!d.includes(e.name)))}}m.__placeholder='data:image/svg+xml,%3Csvg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg"%3E%3Crect width="40" height="40" fill="%23E8E8E8"/%3E%3Cpath d="M31.5143 0H24.5476L0 24.5476V31.5143L11.7046 19.8097L11.9841 17.0782C12.0983 15.9624 13.0131 15.1154 14.1038 15.1154H15.7373V12.1923C15.7373 10.9815 16.6915 10 17.8687 10H21.5143L31.5143 0Z" fill="white"/%3E%3Cpath d="M11.5434 21.3852L0 32.9285V39.8953L11.5822 28.3131C11.172 27.8663 10.9438 27.2444 11.012 26.5782L11.5434 21.3852Z" fill="white"/%3E%3Cpath d="M12.4305 28.879L1.30951 40H8.27631L19.2763 29H13.1316C12.8853 29 12.6495 28.9573 12.4305 28.879Z" fill="white"/%3E%3Cpath d="M28.3113 19.965L28.0159 17.0782C27.9116 16.0591 27.1395 15.2642 26.1754 15.1341L40 1.3095V8.27627L28.3113 19.965Z" fill="white"/%3E%3Cpath d="M20.6905 29L9.69049 40H16.6572L27.9755 28.6817C27.6541 28.8832 27.2756 29 26.8684 29H20.6905Z" fill="white"/%3E%3Cpath d="M28.6572 28C28.9128 27.5952 29.0415 27.1003 28.988 26.5782L28.4426 21.2479L40 9.69053V16.6572L28.6572 28Z" fill="white"/%3E%3Cpath d="M25.0381 40H18.0715L40 18.0715V25.0381L25.0381 40Z" fill="white"/%3E%3Cpath d="M26.4524 40H33.4191L40 33.4191V26.4524L26.4524 40Z" fill="white"/%3E%3Cpath d="M40 40H34.8333L40 34.8333V40Z" fill="white"/%3E%3Cpath d="M16.1666 0H23.1334L0 23.1334V16.1666L16.1666 0Z" fill="white"/%3E%3Cpath d="M14.7524 0H7.78571L0 7.78573V14.7524L14.7524 0Z" fill="white"/%3E%3Cpath d="M0 0H6.37152L0 6.37151V0Z" fill="white"/%3E%3Cpath d="M21.467 11.4615H17.8687C17.4763 11.4615 17.1582 11.7887 17.1582 12.1923V15.1154H22.8418V12.1923C22.8418 11.7887 22.5237 11.4615 22.1313 11.4615H21.467Z" fill="white"/%3E%3Cpath d="M24.7798 15.1154H24.2627V12.1923C24.2627 11.227 23.6562 10.4075 22.8138 10.1148L32.9286 0H39.89L24.7798 15.1154Z" fill="white"/%3E%3C/svg%3E',customElements.define("foxy-item-card",m);export{m as ItemCard};
@@ -1 +1 @@
1
- import"./shared-5212ef4f.js";import"./foxy-spinner.js";import{a as r}from"./shared-1ce5b073.js";import{T as e}from"./shared-49337d35.js";import{h as s}from"./shared-ba5c42c7.js";import"./shared-0995ae7c.js";import"./shared-a3a4c368.js";import"./shared-75e7361d.js";import"./shared-70380f94.js";import"./shared-cb58dfcd.js";import"./shared-343d1fd7.js";import"./shared-2aa23b5f.js";import"./shared-5afb584d.js";import"./shared-53e42a77.js";import"./shared-253e51f7.js";import"./shared-f83207fb.js";import"./shared-5592ec6e.js";import"./shared-cd96ff03.js";import"./shared-5e4a03d1.js";import"./shared-7594e563.js";import"./shared-0aedd809.js";import"./shared-5ef40e86.js";import"./shared-4e709717.js";let a,d,t=r=>r;const o=r(e,"item-category-card");class m extends o{renderBody(){return super.renderBody({title:r=>s(a||(a=t`${0}`),r.name),subtitle:r=>s(d||(d=t`${0}`),r.code)})}}customElements.define("foxy-item-category-card",m);export{m as ItemCategoryCard};
1
+ import"./shared-5212ef4f.js";import"./foxy-spinner.js";import{a as r}from"./shared-e1400289.js";import{T as s}from"./shared-393a7ab2.js";import{h as e}from"./shared-ba5c42c7.js";import"./shared-1b46df2a.js";import"./shared-241b6cca.js";import"./shared-d8694661.js";import"./shared-c231e3bf.js";import"./shared-1d03f911.js";import"./shared-cb58dfcd.js";import"./shared-343d1fd7.js";import"./shared-2aa23b5f.js";import"./shared-5afb584d.js";import"./shared-53e42a77.js";import"./shared-c009b9b6.js";import"./shared-f83207fb.js";import"./shared-5592ec6e.js";import"./shared-cd96ff03.js";import"./shared-5e4a03d1.js";import"./shared-7594e563.js";import"./shared-0aedd809.js";import"./shared-5ef40e86.js";import"./shared-4e709717.js";let a,d,t=r=>r;const o=r(s,"item-category-card");class m extends o{renderBody(){return super.renderBody({title:r=>e(a||(a=t`${0}`),r.name),subtitle:r=>e(d||(d=t`${0}`),r.code)})}}customElements.define("foxy-item-category-card",m);export{m as ItemCategoryCard};
@@ -1 +1 @@
1
- import"./shared-df369311.js";import"./shared-21fba20d.js";import"./shared-56d91134.js";import"./shared-0e1ad508.js";import"./shared-eb086cef.js";import"./shared-076f086a.js";import{I as e}from"./shared-7995cbcf.js";import"./foxy-email-template-card.js";import"./foxy-discount-builder.js";import"./foxy-tax-card.js";import"./shared-70380f94.js";import{_ as t,B as r}from"./shared-cb58dfcd.js";import{a as n}from"./shared-1ce5b073.js";import{i}from"./shared-53e42a77.js";import{h as o,s as a}from"./shared-ba5c42c7.js";import"./shared-42c91940.js";import"./shared-7b3aac7e.js";import"./shared-a3a4c368.js";import"./shared-500b7eb7.js";import"./shared-68a5368a.js";import"./foxy-collection-page.js";import"./foxy-spinner.js";import"./shared-0995ae7c.js";import"./shared-75e7361d.js";import"./shared-2aa23b5f.js";import"./shared-343d1fd7.js";import"./shared-5afb584d.js";import"./shared-f83207fb.js";import"./shared-5592ec6e.js";import"./shared-cd96ff03.js";import"./shared-5e4a03d1.js";import"./shared-7594e563.js";import"./shared-0aedd809.js";import"./shared-5ef40e86.js";import"./shared-5fd5805c.js";import"./shared-53e476fd.js";import"./foxy-nucleon-element.js";import"./foxy-pagination.js";import"./shared-677953e0.js";import"./shared-5212ef4f.js";import"./shared-6b3b8c63.js";import"./shared-76cbea00.js";import"./shared-d2304d50.js";import"./shared-4ded48ee.js";import"./shared-92153a7f.js";import"./shared-4e709717.js";import"./shared-7f5f6657.js";import"./shared-20fb2969.js";import"./shared-986d0f7f.js";import"./shared-292dcee0.js";import"./foxy-swipe-actions.js";import"./foxy-form-dialog.js";import"./shared-1f6366c0.js";import"./shared-a4ca1c5d.js";import"./foxy-copy-to-clipboard.js";import"./shared-127ec8a7.js";import"./shared-16ae74b2.js";import"./shared-bab2ea2c.js";import"./shared-5c057c26.js";import"./shared-0662adb7.js";import"./shared-651c44fa.js";import"./shared-c365c1ae.js";import"./shared-f28e46bf.js";import"./shared-d0aed1c1.js";import"./shared-49337d35.js";import"./shared-253e51f7.js";import"./shared-63c32024.js";let l,s,d,m,p,u,f,_,c,y,h,g=e=>e;class x extends(n(e,"item-category-form")){constructor(){super(...arguments),this.emailTemplates=null,this.taxes=null,this.__discountNameSetValue=e=>{this.edit({discount_name:e}),e||this.edit({discount_type:"",discount_details:""})}}static get properties(){return t(t({},super.properties),{},{emailTemplates:{attribute:"email-templates"},taxes:{}})}static get v8n(){return[({code:e})=>!!e||"code:v8n_required",({code:e})=>e&&e.length<=50||"code:v8n_too_long",({name:e})=>!!e||"name:v8n_required",({name:e})=>e&&e.length<=50||"name:v8n_too_long",({item_delivery_type:e})=>!!e||"item-delivery-type:v8n_required",({item_delivery_type:e,max_downloads_per_customer:t})=>"downloaded"!==e||"number"==typeof t||"max-downloads-per-customer:v8n_required",({max_downloads_per_customer:e})=>"number"!=typeof e||e>=0||"max-downloads-per-customer:v8n_negative",({item_delivery_type:e,max_downloads_time_period:t})=>"downloaded"!==e||"number"==typeof t||"max-downloads-time-period:v8n_required",({max_downloads_time_period:e})=>"number"!=typeof e||e>=0||"max-downloads-time-period:v8n_negative",({customs_value:e})=>"number"!=typeof e||e>=0||"customs-value:v8n_negative",({item_delivery_type:e,default_weight:t})=>"shipped"!==e||"number"==typeof t||"default-weight:v8n_required",({default_weight:e})=>"number"!=typeof e||e>=0||"default-weight:v8n_negative",({item_delivery_type:e,default_weight_unit:t})=>"shipped"!==e||"string"==typeof t||"default-weight-unit:v8n_required",({item_delivery_type:e,default_length_unit:t})=>"shipped"!==e||"string"==typeof t||"default-length-unit:v8n_required",({item_delivery_type:e,shipping_flat_rate:t})=>"flat_rate"!==e||"number"==typeof t||"shipping-flat-rate:v8n_required",({shipping_flat_rate:e})=>"number"!=typeof e||e>=0||"shipping-flat-rate:v8n_negative",({item_delivery_type:e,shipping_flat_rate_type:t})=>"flat_rate"!==e||"string"==typeof t||"shipping-flat-rate-type:v8n_required",({handling_fee_type:e})=>!!e||"handling-fee-type:v8n_required",({handling_fee_type:e,handling_fee_minimum:t})=>"flat_percent_with_minimum"!==e||"number"==typeof t||"handling-fee-minimum:v8n_required",({handling_fee_minimum:e})=>"number"!=typeof e||e>=0||"handling-fee-minimum:v8n_negative",({handling_fee_type:e,handling_fee_percentage:t})=>"flat_percent_with_minimum"!==e&&"flat_percent"!==e||"number"==typeof t||"handling-fee-percentage:v8n_required",({handling_fee_percentage:e})=>"number"!=typeof e||e>=0||"handling-fee-percentage:v8n_negative"]}get readonlySelector(){var e;const t=[super.readonlySelector.toString()];return"DEFAULT"===(null===(e=this.data)||void 0===e?void 0:e.code)&&t.unshift("code","name"),new r(t.join(" ").trim())}get hiddenSelector(){var e;const t=[super.hiddenSelector.toString()];return this.data||t.unshift("taxes"),"DEFAULT"===(null===(e=this.data)||void 0===e?void 0:e.code)&&t.unshift("delete"),new r(t.join(" ").trim())}renderBody(){var e,t,r,n,m;const p=this.form.item_delivery_type,u=null!==(e=this.form.handling_fee_type)&&void 0!==e?e:"none";return o(l||(l=g` ${0} <foxy-internal-summary-control infer="general"> <foxy-internal-text-control infer="name" layout="summary-item"></foxy-internal-text-control> <foxy-internal-text-control infer="code" layout="summary-item"></foxy-internal-text-control> </foxy-internal-summary-control> <foxy-internal-async-resource-link-list-control foreign-key-for-uri="tax_uri" foreign-key-for-id="tax_id" own-key-for-uri="item_category_uri" options-href="${0}" links-href="${0}" embed-key="fx:tax_item_categories" own-uri="${0}" infer="taxes" limit="5" item="foxy-tax-card"> </foxy-internal-async-resource-link-list-control> <foxy-internal-summary-control infer="delivery"> <foxy-internal-select-control layout="summary-item" infer="item-delivery-type" .options="${0}"> </foxy-internal-select-control> ${0} </foxy-internal-summary-control> <foxy-internal-summary-control infer="handling-and-discount"> <foxy-internal-select-control layout="summary-item" infer="handling-fee-type" .options="${0}"> </foxy-internal-select-control> ${0} <foxy-internal-text-control layout="summary-item" infer="discount-name" .setValue="${0}"> </foxy-internal-text-control> ${0} </foxy-internal-summary-control> <foxy-internal-summary-control infer="emails"> <foxy-internal-resource-picker-control layout="summary-item" first="${0}" infer="gift-recipient-email-template-uri" item="foxy-email-template-card"> </foxy-internal-resource-picker-control> <div class="flex items-start" style="gap:calc(.625em + (var(--lumo-border-radius)/ 4) - 1px)"> ${0} <p> <foxy-i18n infer="" key="wip_message"></foxy-i18n> <br> <a target="_blank" class="mt-xs inline-block rounded font-medium text-primary transition-colors cursor-pointer hover-opacity-80 focus-outline-none focus-ring-2 focus-ring-primary-50" href="https://admin.foxycart.com"> admin.foxycart.com </a> </p> </div> </foxy-internal-summary-control> ${0} `),this.renderHeader(),i(null!==(t=this.taxes)&&void 0!==t?t:void 0),i(null===(r=this.data)||void 0===r?void 0:r._links["fx:tax_item_categories"].href),i(null===(n=this.data)||void 0===n?void 0:n._links.self.href),x.__itemDeliveryTypeOptions,"downloaded"===p?this.__renderDownloadDeliveryControls():"flat_rate"===p?[this.__renderFlatRateControls(),this.__renderCustomsValue()]:"shipped"===p?[this.__renderShippingControls(),this.__renderCustomsValue()]:"",x.__handlingFeeTypeOptions,"none"===u?"":o(s||(s=g` ${0} ${0} ${0} `),this.__renderHandlingFee(),u.includes("percent")?this.__renderHandlingFeePercentage():"","flat_percent_with_minimum"===u?this.__renderHandlingFeeMinimum():""),this.__discountNameSetValue,this.form.discount_name?this.__renderDiscountBuilder():"",i(null!==(m=this.emailTemplates)&&void 0!==m?m:void 0),a(d||(d=g`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true" class="flex-shrink-0 text-primary" style="width: 1.25em"><path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z" clip-rule="evenodd"></path></svg>`)),super.renderBody())}__renderHandlingFee(){return o(m||(m=g` <foxy-internal-number-control layout="summary-item" infer="handling-fee" min="0"> </foxy-internal-number-control> `))}__renderHandlingFeePercentage(){return o(p||(p=g` <foxy-internal-number-control layout="summary-item" suffix="%" infer="handling-fee-percentage" min="0"> </foxy-internal-number-control> `))}__renderHandlingFeeMinimum(){return o(u||(u=g` <foxy-internal-number-control layout="summary-item" infer="handling-fee-minimum" min="0"> </foxy-internal-number-control> `))}__renderDownloadDeliveryControls(){return o(f||(f=g` <foxy-internal-number-control layout="summary-item" infer="max-downloads-per-customer" step="1" min="0"> </foxy-internal-number-control> <foxy-internal-number-control layout="summary-item" infer="max-downloads-time-period" step="1" min="0"> </foxy-internal-number-control> `))}__renderFlatRateControls(){return o(_||(_=g` <foxy-internal-number-control layout="summary-item" infer="shipping-flat-rate" min="0"> </foxy-internal-number-control> <foxy-internal-select-control layout="summary-item" infer="shipping-flat-rate-type" .options="${0}"> </foxy-internal-select-control> `),x.__shippingFlatRateTypeOptions)}__renderShippingControls(){return o(c||(c=g` <foxy-internal-number-control layout="summary-item" infer="default-weight" min="0"> </foxy-internal-number-control> <foxy-internal-select-control layout="summary-item" infer="default-weight-unit" .options="${0}"> </foxy-internal-select-control> <foxy-internal-select-control layout="summary-item" infer="default-length-unit" .options="${0}"> </foxy-internal-select-control> `),x.__defaultWeightUnitOptions,x.__defaultLengthUnitOptions)}__renderCustomsValue(){return o(y||(y=g` <foxy-internal-number-control layout="summary-item" infer="customs-value" min="0"> </foxy-internal-number-control> `))}__renderDiscountBuilder(){var e,t;const r={name:null!==(e=this.form.discount_name)&&void 0!==e?e:"",type:this.form.discount_type||"quantity_amount",details:null!==(t=this.form.discount_details)&&void 0!==t?t:""};return o(h||(h=g` <foxy-discount-builder infer="discount-builder" .parsedValue="${0}" @change="${0}"> </foxy-discount-builder> `),r,(e=>{const t=e.currentTarget;this.edit({discount_name:t.parsedValue.name,discount_type:t.parsedValue.type,discount_details:t.parsedValue.details})}))}}x.__shippingFlatRateTypeOptions=[{label:"option_per_order",value:"per_order"},{label:"option_per_item",value:"per_item"}],x.__defaultWeightUnitOptions=[{label:"option_lbs",value:"LBS"},{label:"option_kgs",value:"KGS"}],x.__defaultLengthUnitOptions=[{label:"option_in",value:"IN"},{label:"option_cm",value:"CM"}],x.__itemDeliveryTypeOptions=[{label:"option_notshipped",value:"notshipped"},{label:"option_downloaded",value:"downloaded"},{label:"option_flat_rate",value:"flat_rate"},{label:"option_shipped",value:"shipped"},{label:"option_pickup",value:"pickup"}],x.__handlingFeeTypeOptions=[{label:"option_none",value:"none"},{label:"option_flat_per_order",value:"flat_per_order"},{label:"option_flat_per_item",value:"flat_per_item"},{label:"option_flat_percent",value:"flat_percent"},{label:"option_flat_percent_with_minimum",value:"flat_percent_with_minimum"}],customElements.define("foxy-item-category-form",x);export{x as ItemCategoryForm};
1
+ import"./shared-46f8e3d9.js";import"./shared-35c9fa1d.js";import"./shared-2939f350.js";import"./shared-4cae017c.js";import"./shared-a60ca6fe.js";import"./shared-948919d2.js";import{I as e}from"./shared-8f81f4ed.js";import"./foxy-email-template-card.js";import"./foxy-discount-builder.js";import"./foxy-tax-card.js";import"./shared-1d03f911.js";import{_ as t,B as r}from"./shared-cb58dfcd.js";import{a as n}from"./shared-e1400289.js";import{i}from"./shared-53e42a77.js";import{h as o,s as a}from"./shared-ba5c42c7.js";import"./shared-4d919766.js";import"./shared-58b6710c.js";import"./shared-d8694661.js";import"./shared-7977d581.js";import"./shared-f79f08cc.js";import"./foxy-collection-page.js";import"./foxy-spinner.js";import"./shared-1b46df2a.js";import"./shared-241b6cca.js";import"./shared-c231e3bf.js";import"./shared-2aa23b5f.js";import"./shared-343d1fd7.js";import"./shared-5afb584d.js";import"./shared-f83207fb.js";import"./shared-5592ec6e.js";import"./shared-cd96ff03.js";import"./shared-5e4a03d1.js";import"./shared-7594e563.js";import"./shared-0aedd809.js";import"./shared-5ef40e86.js";import"./shared-5fd5805c.js";import"./shared-53e476fd.js";import"./foxy-nucleon-element.js";import"./foxy-pagination.js";import"./shared-ec9893c7.js";import"./shared-5212ef4f.js";import"./shared-b05ef317.js";import"./shared-9d4813e6.js";import"./shared-d743d0fd.js";import"./shared-2fe8aabd.js";import"./shared-5d7c4673.js";import"./shared-4e709717.js";import"./shared-b1c9199f.js";import"./shared-e615d2d9.js";import"./shared-2b126cea.js";import"./shared-3aca4932.js";import"./foxy-swipe-actions.js";import"./foxy-form-dialog.js";import"./shared-8e010314.js";import"./shared-53253d60.js";import"./foxy-copy-to-clipboard.js";import"./shared-434cdfec.js";import"./shared-1aff90a9.js";import"./shared-bab2ea2c.js";import"./shared-d0aed1c1.js";import"./shared-393a7ab2.js";import"./shared-c009b9b6.js";import"./shared-63c32024.js";let l,s,d,m,p,u,f,_,c,y,h,g=e=>e;class x extends(n(e,"item-category-form")){constructor(){super(...arguments),this.emailTemplates=null,this.taxes=null,this.__discountNameSetValue=e=>{this.edit({discount_name:e}),e||this.edit({discount_type:"",discount_details:""})}}static get properties(){return t(t({},super.properties),{},{emailTemplates:{attribute:"email-templates"},taxes:{}})}static get v8n(){return[({code:e})=>!!e||"code:v8n_required",({code:e})=>e&&e.length<=50||"code:v8n_too_long",({name:e})=>!!e||"name:v8n_required",({name:e})=>e&&e.length<=50||"name:v8n_too_long",({item_delivery_type:e})=>!!e||"item-delivery-type:v8n_required",({item_delivery_type:e,max_downloads_per_customer:t})=>"downloaded"!==e||"number"==typeof t||"max-downloads-per-customer:v8n_required",({max_downloads_per_customer:e})=>"number"!=typeof e||e>=0||"max-downloads-per-customer:v8n_negative",({item_delivery_type:e,max_downloads_time_period:t})=>"downloaded"!==e||"number"==typeof t||"max-downloads-time-period:v8n_required",({max_downloads_time_period:e})=>"number"!=typeof e||e>=0||"max-downloads-time-period:v8n_negative",({customs_value:e})=>"number"!=typeof e||e>=0||"customs-value:v8n_negative",({item_delivery_type:e,default_weight:t})=>"shipped"!==e||"number"==typeof t||"default-weight:v8n_required",({default_weight:e})=>"number"!=typeof e||e>=0||"default-weight:v8n_negative",({item_delivery_type:e,default_weight_unit:t})=>"shipped"!==e||"string"==typeof t||"default-weight-unit:v8n_required",({item_delivery_type:e,default_length_unit:t})=>"shipped"!==e||"string"==typeof t||"default-length-unit:v8n_required",({item_delivery_type:e,shipping_flat_rate:t})=>"flat_rate"!==e||"number"==typeof t||"shipping-flat-rate:v8n_required",({shipping_flat_rate:e})=>"number"!=typeof e||e>=0||"shipping-flat-rate:v8n_negative",({item_delivery_type:e,shipping_flat_rate_type:t})=>"flat_rate"!==e||"string"==typeof t||"shipping-flat-rate-type:v8n_required",({handling_fee_type:e})=>!!e||"handling-fee-type:v8n_required",({handling_fee_type:e,handling_fee_minimum:t})=>"flat_percent_with_minimum"!==e||"number"==typeof t||"handling-fee-minimum:v8n_required",({handling_fee_minimum:e})=>"number"!=typeof e||e>=0||"handling-fee-minimum:v8n_negative",({handling_fee_type:e,handling_fee_percentage:t})=>"flat_percent_with_minimum"!==e&&"flat_percent"!==e||"number"==typeof t||"handling-fee-percentage:v8n_required",({handling_fee_percentage:e})=>"number"!=typeof e||e>=0||"handling-fee-percentage:v8n_negative"]}get readonlySelector(){var e;const t=[super.readonlySelector.toString()];return"DEFAULT"===(null===(e=this.data)||void 0===e?void 0:e.code)&&t.unshift("code","name"),new r(t.join(" ").trim())}get hiddenSelector(){var e;const t=[super.hiddenSelector.toString()];return this.data||t.unshift("taxes"),"DEFAULT"===(null===(e=this.data)||void 0===e?void 0:e.code)&&t.unshift("delete"),new r(t.join(" ").trim())}renderBody(){var e,t,r,n,m;const p=this.form.item_delivery_type,u=null!==(e=this.form.handling_fee_type)&&void 0!==e?e:"none";return o(l||(l=g` ${0} <foxy-internal-summary-control infer="general"> <foxy-internal-text-control infer="name" layout="summary-item"></foxy-internal-text-control> <foxy-internal-text-control infer="code" layout="summary-item"></foxy-internal-text-control> </foxy-internal-summary-control> <foxy-internal-async-resource-link-list-control foreign-key-for-uri="tax_uri" foreign-key-for-id="tax_id" own-key-for-uri="item_category_uri" options-href="${0}" links-href="${0}" embed-key="fx:tax_item_categories" own-uri="${0}" infer="taxes" limit="5" item="foxy-tax-card"> </foxy-internal-async-resource-link-list-control> <foxy-internal-summary-control infer="delivery"> <foxy-internal-select-control layout="summary-item" infer="item-delivery-type" .options="${0}"> </foxy-internal-select-control> ${0} </foxy-internal-summary-control> <foxy-internal-summary-control infer="handling-and-discount"> <foxy-internal-select-control layout="summary-item" infer="handling-fee-type" .options="${0}"> </foxy-internal-select-control> ${0} <foxy-internal-text-control layout="summary-item" infer="discount-name" .setValue="${0}"> </foxy-internal-text-control> ${0} </foxy-internal-summary-control> <foxy-internal-summary-control infer="emails"> <foxy-internal-resource-picker-control layout="summary-item" first="${0}" infer="gift-recipient-email-template-uri" item="foxy-email-template-card"> </foxy-internal-resource-picker-control> <div class="flex items-start" style="gap:calc(.625em + (var(--lumo-border-radius)/ 4) - 1px)"> ${0} <p> <foxy-i18n infer="" key="wip_message"></foxy-i18n> <br> <a target="_blank" class="mt-xs inline-block rounded font-medium text-primary transition-colors cursor-pointer hover-opacity-80 focus-outline-none focus-ring-2 focus-ring-primary-50" href="https://admin.foxycart.com"> admin.foxycart.com </a> </p> </div> </foxy-internal-summary-control> ${0} `),this.renderHeader(),i(null!==(t=this.taxes)&&void 0!==t?t:void 0),i(null===(r=this.data)||void 0===r?void 0:r._links["fx:tax_item_categories"].href),i(null===(n=this.data)||void 0===n?void 0:n._links.self.href),x.__itemDeliveryTypeOptions,"downloaded"===p?this.__renderDownloadDeliveryControls():"flat_rate"===p?[this.__renderFlatRateControls(),this.__renderCustomsValue()]:"shipped"===p?[this.__renderShippingControls(),this.__renderCustomsValue()]:"",x.__handlingFeeTypeOptions,"none"===u?"":o(s||(s=g` ${0} ${0} ${0} `),this.__renderHandlingFee(),u.includes("percent")?this.__renderHandlingFeePercentage():"","flat_percent_with_minimum"===u?this.__renderHandlingFeeMinimum():""),this.__discountNameSetValue,this.form.discount_name?this.__renderDiscountBuilder():"",i(null!==(m=this.emailTemplates)&&void 0!==m?m:void 0),a(d||(d=g`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true" class="flex-shrink-0 text-primary" style="width: 1.25em"><path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z" clip-rule="evenodd"></path></svg>`)),super.renderBody())}__renderHandlingFee(){return o(m||(m=g` <foxy-internal-number-control layout="summary-item" infer="handling-fee" min="0"> </foxy-internal-number-control> `))}__renderHandlingFeePercentage(){return o(p||(p=g` <foxy-internal-number-control layout="summary-item" suffix="%" infer="handling-fee-percentage" min="0"> </foxy-internal-number-control> `))}__renderHandlingFeeMinimum(){return o(u||(u=g` <foxy-internal-number-control layout="summary-item" infer="handling-fee-minimum" min="0"> </foxy-internal-number-control> `))}__renderDownloadDeliveryControls(){return o(f||(f=g` <foxy-internal-number-control layout="summary-item" infer="max-downloads-per-customer" step="1" min="0"> </foxy-internal-number-control> <foxy-internal-number-control layout="summary-item" infer="max-downloads-time-period" step="1" min="0"> </foxy-internal-number-control> `))}__renderFlatRateControls(){return o(_||(_=g` <foxy-internal-number-control layout="summary-item" infer="shipping-flat-rate" min="0"> </foxy-internal-number-control> <foxy-internal-select-control layout="summary-item" infer="shipping-flat-rate-type" .options="${0}"> </foxy-internal-select-control> `),x.__shippingFlatRateTypeOptions)}__renderShippingControls(){return o(c||(c=g` <foxy-internal-number-control layout="summary-item" infer="default-weight" min="0"> </foxy-internal-number-control> <foxy-internal-select-control layout="summary-item" infer="default-weight-unit" .options="${0}"> </foxy-internal-select-control> <foxy-internal-select-control layout="summary-item" infer="default-length-unit" .options="${0}"> </foxy-internal-select-control> `),x.__defaultWeightUnitOptions,x.__defaultLengthUnitOptions)}__renderCustomsValue(){return o(y||(y=g` <foxy-internal-number-control layout="summary-item" infer="customs-value" min="0"> </foxy-internal-number-control> `))}__renderDiscountBuilder(){var e,t;const r={name:null!==(e=this.form.discount_name)&&void 0!==e?e:"",type:this.form.discount_type||"quantity_amount",details:null!==(t=this.form.discount_details)&&void 0!==t?t:""};return o(h||(h=g` <foxy-discount-builder infer="discount-builder" .parsedValue="${0}" @change="${0}"> </foxy-discount-builder> `),r,(e=>{const t=e.currentTarget;this.edit({discount_name:t.parsedValue.name,discount_type:t.parsedValue.type,discount_details:t.parsedValue.details})}))}}x.__shippingFlatRateTypeOptions=[{label:"option_per_order",value:"per_order"},{label:"option_per_item",value:"per_item"}],x.__defaultWeightUnitOptions=[{label:"option_lbs",value:"LBS"},{label:"option_kgs",value:"KGS"}],x.__defaultLengthUnitOptions=[{label:"option_in",value:"IN"},{label:"option_cm",value:"CM"}],x.__itemDeliveryTypeOptions=[{label:"option_notshipped",value:"notshipped"},{label:"option_downloaded",value:"downloaded"},{label:"option_flat_rate",value:"flat_rate"},{label:"option_shipped",value:"shipped"},{label:"option_pickup",value:"pickup"}],x.__handlingFeeTypeOptions=[{label:"option_none",value:"none"},{label:"option_flat_per_order",value:"flat_per_order"},{label:"option_flat_per_item",value:"flat_per_item"},{label:"option_flat_percent",value:"flat_percent"},{label:"option_flat_percent_with_minimum",value:"flat_percent_with_minimum"}],customElements.define("foxy-item-category-form",x);export{x as ItemCategoryForm};
@@ -1 +1 @@
1
- import"./shared-21fba20d.js";import"./shared-7f5f6657.js";import"./shared-3ca95e21.js";import"./shared-56d91134.js";import"./shared-0e1ad508.js";import"./shared-076f086a.js";import"./shared-a1f654fc.js";import{I as t}from"./shared-7995cbcf.js";import"./foxy-discount-detail-card.js";import"./foxy-coupon-detail-card.js";import"./foxy-item-category-card.js";import"./foxy-discount-builder.js";import"./foxy-item-option-card.js";import"./foxy-item-option-form.js";import"./foxy-nucleon-element.js";import"./foxy-attribute-card.js";import"./foxy-attribute-form.js";import{_ as e,B as r}from"./shared-cb58dfcd.js";import{a as o}from"./shared-1ce5b073.js";import{i}from"./shared-53e42a77.js";import{c as n}from"./shared-4e709717.js";import{h as s}from"./shared-ba5c42c7.js";import"./shared-68a5368a.js";import"./shared-7b3aac7e.js";import"./shared-a3a4c368.js";import"./shared-500b7eb7.js";import"./shared-677953e0.js";import"./shared-5212ef4f.js";import"./shared-70380f94.js";import"./shared-343d1fd7.js";import"./shared-2aa23b5f.js";import"./shared-5afb584d.js";import"./shared-f83207fb.js";import"./shared-5592ec6e.js";import"./shared-cd96ff03.js";import"./shared-5e4a03d1.js";import"./shared-7594e563.js";import"./shared-0aedd809.js";import"./shared-5ef40e86.js";import"./foxy-copy-to-clipboard.js";import"./shared-127ec8a7.js";import"./shared-0995ae7c.js";import"./shared-16ae74b2.js";import"./shared-75e7361d.js";import"./foxy-form-dialog.js";import"./shared-1f6366c0.js";import"./shared-a4ca1c5d.js";import"./shared-53e476fd.js";import"./shared-bab2ea2c.js";import"./shared-42c91940.js";import"./shared-20fb2969.js";import"./shared-986d0f7f.js";import"./shared-292dcee0.js";import"./foxy-collection-page.js";import"./foxy-spinner.js";import"./shared-5fd5805c.js";import"./foxy-swipe-actions.js";import"./foxy-pagination.js";import"./shared-6b3b8c63.js";import"./shared-76cbea00.js";import"./shared-d2304d50.js";import"./shared-4ded48ee.js";import"./shared-92153a7f.js";import"./shared-7a2aaafa.js";import"./shared-f9f64dee.js";import"./shared-5c057c26.js";import"./shared-0662adb7.js";import"./shared-651c44fa.js";import"./shared-c365c1ae.js";import"./shared-f28e46bf.js";import"./shared-d0aed1c1.js";import"./shared-e4768909.js";import"./shared-25167d28.js";import"./shared-79d0699c.js";import"./shared-43e2c3f6.js";import"./shared-49337d35.js";import"./shared-253e51f7.js";import"./shared-63c32024.js";import"./shared-fca3a317.js";import"./shared-2a5d1cdf.js";let a,l=t=>t;class m extends(o(t,"item-form")){constructor(){super(...arguments),this.customerAddresses=null,this.itemCategories=null,this.localeCodes=null,this.coupons=null,this.store=null,this.__itemsLink=""}static get properties(){return e(e({},super.properties),{},{customerAddresses:{attribute:"customer-addresses"},itemCategories:{attribute:"item-categories"},localeCodes:{attribute:"locale-codes"},coupons:{},store:{}})}static get v8n(){return[({name:t})=>!!t||"name:v8n_required",({name:t})=>!!t&&t.length<=255||"name:v8n_too_long",({price:t})=>"number"==typeof t&&!isNaN(t)||"price:v8n_required",({price:t})=>"number"==typeof t&&t>=0||"price:v8n_negative",({quantity:t})=>"number"==typeof t&&t>=1||"quantity:v8n_less_than_one"]}get headerSubtitleOptions(){var t;return{context:(null===(t=this.data)||void 0===t?void 0:t.is_future_line_item)?"future_line_item":"regular"}}get readonlySelector(){const t=[super.readonlySelector.toString()];return this.href&&t.unshift("subscriptions"),new r(t.join(" ").trim())}get hiddenSelector(){var t,e;const o=[super.hiddenSelector.toString()];return(null===(e=null===(t=this.__storeLoader)||void 0===t?void 0:t.data)||void 0===e?void 0:e.features_multiship)||o.unshift("general:shipto"),this.data&&!this.data.subscription_frequency&&o.unshift("subscriptions"),this.form.discount_name||o.unshift("discount:discount-builder"),this.href||o.unshift("discount-details","coupon-details","item-options","attributes"),new r(o.join(" ").trim())}renderBody(){var t,e,r,o,m,d,f;return s(a||(a=l` ${0} <foxy-internal-summary-control infer="general"> <foxy-internal-text-control layout="summary-item" infer="name"></foxy-internal-text-control> <foxy-internal-number-control layout="summary-item" infer="price" min="0"> </foxy-internal-number-control> <foxy-internal-number-control layout="summary-item" infer="quantity" step="1" min="1"> </foxy-internal-number-control> <foxy-internal-resource-picker-control layout="summary-item" first="${0}" infer="item-category-uri" item="foxy-item-category-card"> </foxy-internal-resource-picker-control> <foxy-internal-text-control layout="summary-item" infer="code"></foxy-internal-text-control> <foxy-internal-text-control layout="summary-item" infer="parent-code"> </foxy-internal-text-control> <foxy-internal-text-control layout="summary-item" infer="shipto"> </foxy-internal-text-control> </foxy-internal-summary-control> <foxy-internal-summary-control infer="subscriptions"> <foxy-internal-frequency-control layout="summary-item" infer="subscription-frequency"> </foxy-internal-frequency-control> <foxy-internal-date-control layout="summary-item" infer="subscription-start-date"> </foxy-internal-date-control> <foxy-internal-date-control layout="summary-item" infer="subscription-end-date"> </foxy-internal-date-control> </foxy-internal-summary-control> <foxy-internal-async-list-control infer="item-options" first="${0}" form="foxy-item-option-form" item="foxy-item-option-card" alert .related="${0}" .itemProps="${0}"> </foxy-internal-async-list-control> <foxy-internal-summary-control infer="dimensions"> <foxy-internal-number-control layout="summary-item" infer="weight" min="0"> </foxy-internal-number-control> <foxy-internal-number-control layout="summary-item" infer="length" min="0"> </foxy-internal-number-control> <foxy-internal-number-control layout="summary-item" infer="width" min="0"> </foxy-internal-number-control> <foxy-internal-number-control layout="summary-item" infer="height" min="0"> </foxy-internal-number-control> </foxy-internal-summary-control> <foxy-internal-summary-control infer="meta"> <foxy-internal-text-control layout="summary-item" infer="url"></foxy-internal-text-control> <foxy-internal-text-control layout="summary-item" infer="image"> </foxy-internal-text-control> <foxy-internal-number-control layout="summary-item" infer="quantity-max" step="1" min="1"> </foxy-internal-number-control> <foxy-internal-number-control layout="summary-item" infer="quantity-min" step="1" min="1"> </foxy-internal-number-control> <foxy-internal-date-control layout="summary-item" infer="expires" format="unix"> </foxy-internal-date-control> </foxy-internal-summary-control> <foxy-internal-summary-control infer="discount"> <foxy-internal-text-control layout="summary-item" infer="discount-name"> </foxy-internal-text-control> <foxy-discount-builder infer="discount-builder" class="${0}" .parsedValue="${0}" @change="${0}"> </foxy-discount-builder> </foxy-internal-summary-control> <foxy-internal-async-list-control infer="discount-details" first="${0}" item="foxy-discount-detail-card"> </foxy-internal-async-list-control> <foxy-internal-async-list-control infer="coupon-details" first="${0}" item="foxy-coupon-detail-card"> </foxy-internal-async-list-control> <foxy-internal-async-list-control infer="attributes" first="${0}" item="foxy-attribute-card" form="foxy-attribute-form" alert> </foxy-internal-async-list-control> ${0} <foxy-nucleon class="hidden" infer="" href="${0}" id="storeLoader" @update="${0}"> </foxy-nucleon> `),this.renderHeader(),i(null!==(t=null==this?void 0:this.itemCategories)&&void 0!==t?t:void 0),i(null===(e=this.data)||void 0===e?void 0:e._links["fx:item_options"].href),this.__itemOptionRelatedUrls,{"locale-codes":null!==(r=this.localeCodes)&&void 0!==r?r:""},n({hidden:this.hiddenSelector.matches("discount-builder",!0)}),this.__discountBuilderParsedValue,this.__handleDiscountBuilderChange,i(null===(o=this.data)||void 0===o?void 0:o._links["fx:discount_details"].href),i(null===(m=this.data)||void 0===m?void 0:m._links["fx:coupon_details"].href),i(null===(d=this.data)||void 0===d?void 0:d._links["fx:attributes"].href),super.renderBody(),i(null!==(f=this.store)&&void 0!==f?f:void 0),(()=>this.requestUpdate()))}async _sendGet(){const t=await super._sendGet();if(t._links["fx:subscription"]){const e=t._links["fx:subscription"].href,r=(await super._fetch(e))._links["fx:transaction_template"].href,o=await super._fetch(r);return this.__itemsLink=o._links["fx:items"].href,t}if(t._links["fx:transaction"]){const e=await super._fetch(t._links["fx:transaction"].href);return this.__itemsLink=e._links["fx:items"].href,t}if(t._links["fx:cart"]){const e=await super._fetch(t._links["fx:cart"].href);return this.__itemsLink=e._links["fx:items"].href,t}return t}get __discountBuilderParsedValue(){return{details:this.form.discount_details,type:this.form.discount_type,name:this.form.discount_name}}get __itemOptionRelatedUrls(){var t,e;const r=null!==(e=null===(t=this.data)||void 0===t?void 0:t._links)&&void 0!==e?e:{},o=[];return r["fx:subscription"]&&o.push(r["fx:subscription"].href),r["fx:transaction"]&&o.push(r["fx:transaction"].href),r["fx:shipment"]&&o.push(r["fx:shipment"].href),r["fx:cart"]&&o.push(r["fx:cart"].href),this.__itemsLink&&o.push(this.__itemsLink),o}get __storeLoader(){return this.renderRoot.querySelector("#storeLoader")}__handleDiscountBuilderChange(t){const e=t.currentTarget.parsedValue;this.edit({discount_details:e.details,discount_type:e.type,discount_name:e.name})}}customElements.define("foxy-item-form",m);export{m as ItemForm};
1
+ import"./shared-35c9fa1d.js";import"./shared-3aca4932.js";import"./shared-8c42634c.js";import"./shared-2939f350.js";import"./shared-4cae017c.js";import"./shared-948919d2.js";import"./shared-98f382f3.js";import{I as t}from"./shared-8f81f4ed.js";import"./foxy-discount-detail-card.js";import"./foxy-coupon-detail-card.js";import"./foxy-item-category-card.js";import"./foxy-discount-builder.js";import"./foxy-item-option-card.js";import"./foxy-item-option-form.js";import"./foxy-nucleon-element.js";import"./foxy-attribute-card.js";import"./foxy-attribute-form.js";import{_ as e,B as r}from"./shared-cb58dfcd.js";import{a as o}from"./shared-e1400289.js";import{i}from"./shared-53e42a77.js";import{c as n}from"./shared-4e709717.js";import{h as s}from"./shared-ba5c42c7.js";import"./shared-f79f08cc.js";import"./shared-58b6710c.js";import"./shared-d8694661.js";import"./shared-7977d581.js";import"./shared-ec9893c7.js";import"./shared-5212ef4f.js";import"./shared-1d03f911.js";import"./shared-343d1fd7.js";import"./shared-2aa23b5f.js";import"./shared-5afb584d.js";import"./shared-f83207fb.js";import"./shared-5592ec6e.js";import"./shared-cd96ff03.js";import"./shared-5e4a03d1.js";import"./shared-7594e563.js";import"./shared-0aedd809.js";import"./shared-5ef40e86.js";import"./foxy-copy-to-clipboard.js";import"./shared-434cdfec.js";import"./shared-1b46df2a.js";import"./shared-241b6cca.js";import"./shared-1aff90a9.js";import"./shared-c231e3bf.js";import"./foxy-form-dialog.js";import"./shared-8e010314.js";import"./shared-53253d60.js";import"./shared-53e476fd.js";import"./shared-bab2ea2c.js";import"./shared-4d919766.js";import"./shared-b1c9199f.js";import"./shared-e615d2d9.js";import"./shared-9d4813e6.js";import"./shared-2b126cea.js";import"./shared-d743d0fd.js";import"./shared-2fe8aabd.js";import"./shared-5d7c4673.js";import"./foxy-collection-page.js";import"./foxy-spinner.js";import"./shared-5fd5805c.js";import"./foxy-swipe-actions.js";import"./foxy-pagination.js";import"./shared-a60ca6fe.js";import"./shared-b05ef317.js";import"./shared-330e57d9.js";import"./shared-d3d4badd.js";import"./shared-d0aed1c1.js";import"./shared-3cdec25d.js";import"./shared-0cc8df04.js";import"./shared-79d0699c.js";import"./shared-43e2c3f6.js";import"./shared-393a7ab2.js";import"./shared-c009b9b6.js";import"./shared-63c32024.js";import"./shared-0c242246.js";import"./shared-753fdd34.js";let a,l=t=>t;class m extends(o(t,"item-form")){constructor(){super(...arguments),this.customerAddresses=null,this.itemCategories=null,this.localeCodes=null,this.coupons=null,this.store=null,this.__itemsLink=""}static get properties(){return e(e({},super.properties),{},{customerAddresses:{attribute:"customer-addresses"},itemCategories:{attribute:"item-categories"},localeCodes:{attribute:"locale-codes"},coupons:{},store:{}})}static get v8n(){return[({name:t})=>!!t||"name:v8n_required",({name:t})=>!!t&&t.length<=255||"name:v8n_too_long",({price:t})=>"number"==typeof t&&!isNaN(t)||"price:v8n_required",({price:t})=>"number"==typeof t&&t>=0||"price:v8n_negative",({quantity:t})=>"number"==typeof t&&t>=1||"quantity:v8n_less_than_one"]}get headerSubtitleOptions(){var t;return{context:(null===(t=this.data)||void 0===t?void 0:t.is_future_line_item)?"future_line_item":"regular"}}get readonlySelector(){const t=[super.readonlySelector.toString()];return this.href&&t.unshift("subscriptions"),new r(t.join(" ").trim())}get hiddenSelector(){var t,e;const o=[super.hiddenSelector.toString()];return(null===(e=null===(t=this.__storeLoader)||void 0===t?void 0:t.data)||void 0===e?void 0:e.features_multiship)||o.unshift("general:shipto"),this.data&&!this.data.subscription_frequency&&o.unshift("subscriptions"),this.form.discount_name||o.unshift("discount:discount-builder"),this.href||o.unshift("discount-details","coupon-details","item-options","attributes"),new r(o.join(" ").trim())}renderBody(){var t,e,r,o,m,d,f;return s(a||(a=l` ${0} <foxy-internal-summary-control infer="general"> <foxy-internal-text-control layout="summary-item" infer="name"></foxy-internal-text-control> <foxy-internal-number-control layout="summary-item" infer="price" min="0"> </foxy-internal-number-control> <foxy-internal-number-control layout="summary-item" infer="quantity" step="1" min="1"> </foxy-internal-number-control> <foxy-internal-resource-picker-control layout="summary-item" first="${0}" infer="item-category-uri" item="foxy-item-category-card"> </foxy-internal-resource-picker-control> <foxy-internal-text-control layout="summary-item" infer="code"></foxy-internal-text-control> <foxy-internal-text-control layout="summary-item" infer="parent-code"> </foxy-internal-text-control> <foxy-internal-text-control layout="summary-item" infer="shipto"> </foxy-internal-text-control> </foxy-internal-summary-control> <foxy-internal-summary-control infer="subscriptions"> <foxy-internal-frequency-control layout="summary-item" infer="subscription-frequency"> </foxy-internal-frequency-control> <foxy-internal-date-control layout="summary-item" infer="subscription-start-date"> </foxy-internal-date-control> <foxy-internal-date-control layout="summary-item" infer="subscription-end-date"> </foxy-internal-date-control> </foxy-internal-summary-control> <foxy-internal-async-list-control infer="item-options" first="${0}" form="foxy-item-option-form" item="foxy-item-option-card" alert .related="${0}" .itemProps="${0}"> </foxy-internal-async-list-control> <foxy-internal-summary-control infer="dimensions"> <foxy-internal-number-control layout="summary-item" infer="weight" min="0"> </foxy-internal-number-control> <foxy-internal-number-control layout="summary-item" infer="length" min="0"> </foxy-internal-number-control> <foxy-internal-number-control layout="summary-item" infer="width" min="0"> </foxy-internal-number-control> <foxy-internal-number-control layout="summary-item" infer="height" min="0"> </foxy-internal-number-control> </foxy-internal-summary-control> <foxy-internal-summary-control infer="meta"> <foxy-internal-text-control layout="summary-item" infer="url"></foxy-internal-text-control> <foxy-internal-text-control layout="summary-item" infer="image"> </foxy-internal-text-control> <foxy-internal-number-control layout="summary-item" infer="quantity-max" step="1" min="1"> </foxy-internal-number-control> <foxy-internal-number-control layout="summary-item" infer="quantity-min" step="1" min="1"> </foxy-internal-number-control> <foxy-internal-date-control layout="summary-item" infer="expires" format="unix"> </foxy-internal-date-control> </foxy-internal-summary-control> <foxy-internal-summary-control infer="discount"> <foxy-internal-text-control layout="summary-item" infer="discount-name"> </foxy-internal-text-control> <foxy-discount-builder infer="discount-builder" class="${0}" .parsedValue="${0}" @change="${0}"> </foxy-discount-builder> </foxy-internal-summary-control> <foxy-internal-async-list-control infer="discount-details" first="${0}" item="foxy-discount-detail-card"> </foxy-internal-async-list-control> <foxy-internal-async-list-control infer="coupon-details" first="${0}" item="foxy-coupon-detail-card"> </foxy-internal-async-list-control> <foxy-internal-async-list-control infer="attributes" first="${0}" item="foxy-attribute-card" form="foxy-attribute-form" alert> </foxy-internal-async-list-control> ${0} <foxy-nucleon class="hidden" infer="" href="${0}" id="storeLoader" @update="${0}"> </foxy-nucleon> `),this.renderHeader(),i(null!==(t=null==this?void 0:this.itemCategories)&&void 0!==t?t:void 0),i(null===(e=this.data)||void 0===e?void 0:e._links["fx:item_options"].href),this.__itemOptionRelatedUrls,{"locale-codes":null!==(r=this.localeCodes)&&void 0!==r?r:""},n({hidden:this.hiddenSelector.matches("discount-builder",!0)}),this.__discountBuilderParsedValue,this.__handleDiscountBuilderChange,i(null===(o=this.data)||void 0===o?void 0:o._links["fx:discount_details"].href),i(null===(m=this.data)||void 0===m?void 0:m._links["fx:coupon_details"].href),i(null===(d=this.data)||void 0===d?void 0:d._links["fx:attributes"].href),super.renderBody(),i(null!==(f=this.store)&&void 0!==f?f:void 0),(()=>this.requestUpdate()))}async _sendGet(){const t=await super._sendGet();if(t._links["fx:subscription"]){const e=t._links["fx:subscription"].href,r=(await super._fetch(e))._links["fx:transaction_template"].href,o=await super._fetch(r);return this.__itemsLink=o._links["fx:items"].href,t}if(t._links["fx:transaction"]){const e=await super._fetch(t._links["fx:transaction"].href);return this.__itemsLink=e._links["fx:items"].href,t}if(t._links["fx:cart"]){const e=await super._fetch(t._links["fx:cart"].href);return this.__itemsLink=e._links["fx:items"].href,t}return t}get __discountBuilderParsedValue(){return{details:this.form.discount_details,type:this.form.discount_type,name:this.form.discount_name}}get __itemOptionRelatedUrls(){var t,e;const r=null!==(e=null===(t=this.data)||void 0===t?void 0:t._links)&&void 0!==e?e:{},o=[];return r["fx:subscription"]&&o.push(r["fx:subscription"].href),r["fx:transaction"]&&o.push(r["fx:transaction"].href),r["fx:shipment"]&&o.push(r["fx:shipment"].href),r["fx:cart"]&&o.push(r["fx:cart"].href),this.__itemsLink&&o.push(this.__itemsLink),o}get __storeLoader(){return this.renderRoot.querySelector("#storeLoader")}__handleDiscountBuilderChange(t){const e=t.currentTarget.parsedValue;this.edit({discount_details:e.details,discount_type:e.type,discount_name:e.name})}}customElements.define("foxy-item-form",m);export{m as ItemForm};
@@ -1 +1 @@
1
- import"./shared-5212ef4f.js";import"./foxy-nucleon-element.js";import"./foxy-spinner.js";import{_ as e}from"./shared-cb58dfcd.js";import{a as t}from"./shared-1ce5b073.js";import{T as r}from"./shared-49337d35.js";import{i as o}from"./shared-53e42a77.js";import{h as a}from"./shared-ba5c42c7.js";import"./shared-f83207fb.js";import"./shared-5592ec6e.js";import"./shared-343d1fd7.js";import"./shared-cd96ff03.js";import"./shared-2aa23b5f.js";import"./shared-5e4a03d1.js";import"./shared-7594e563.js";import"./shared-0aedd809.js";import"./shared-5ef40e86.js";import"./shared-0995ae7c.js";import"./shared-a3a4c368.js";import"./shared-75e7361d.js";import"./shared-70380f94.js";import"./shared-5afb584d.js";import"./shared-253e51f7.js";import"./shared-4e709717.js";let d,i,s,l,n=e=>e;const c=t(r,"item-option-card");class u extends c{constructor(){super(...arguments),this.localeCodes=null,this.__transactionTemplateLoaderId="transactionTemplateLoader",this.__defaultTemplateSetLoaderId="defaultTemplateSetLoader",this.__localeCodesHelperLoaderId="localeCodesLoader",this.__transactionLoaderId="transactionLoader",this.__templateSetLoaderId="templateSetLoader",this.__storeLoaderId="storeLoader",this.__cartLoaderId="cartLoader"}static get properties(){return e(e({},super.properties),{},{localeCodes:{attribute:"locale-codes"}})}renderBody(){const e=this.__currencyDisplay,t=this.__currencyCode;return a(d||(d=n` <foxy-nucleon class="hidden" infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <foxy-nucleon class="hidden" infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <foxy-nucleon class="hidden" infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <foxy-nucleon class="hidden" infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <foxy-nucleon class="hidden" infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <foxy-nucleon class="hidden" infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <foxy-nucleon class="hidden" infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> ${0} `),o(this.__transactionTemplateHref),this.__transactionTemplateLoaderId,(()=>this.requestUpdate()),o(this.__defaultTemplateSetHref),this.__defaultTemplateSetLoaderId,(()=>this.requestUpdate()),o(this.__localeCodesHelperHref),this.__localeCodesHelperLoaderId,(()=>this.requestUpdate()),o(this.__transactionHref),this.__transactionLoaderId,(()=>this.requestUpdate()),o(this.__templateSetHref),this.__templateSetLoaderId,(()=>this.requestUpdate()),o(this.__storeHref),this.__storeLoaderId,(()=>this.requestUpdate()),o(this.__cartHref),this.__cartLoaderId,(()=>this.requestUpdate()),super.renderBody({title:r=>{if(!t||!e)return a(i||(i=n`&ZeroWidthSpace;`));let o;try{o=Math.abs(r.price_mod).toLocaleString(this.lang||"en",{maximumFractionDigits:2,minimumFractionDigits:2,currencyDisplay:e,currency:t,style:"currency"})}catch(e){o="--"}return a(s||(s=n`${0} &bull; ${0} &bull; ${0}`),r.name,o,r.weight_mod)},subtitle:e=>a(l||(l=n`${0}`),e.value)}))}get isBodyReady(){return super.isBodyReady&&!!this.__currencyCode&&!!this.__currencyDisplay}get __transactionTemplateHref(){var e,t,r;try{const o=null===(e=this.data)||void 0===e?void 0:e._links,a=new URL(null!==(r=null===(t=null==o?void 0:o["fx:subscription"])||void 0===t?void 0:t.href)&&void 0!==r?r:"");return a.searchParams.set("zoom","transaction_template"),a.toString()}catch(e){}}get __defaultTemplateSetHref(){var e,t,r,o;if(""===(null===(t=null!==(e=this.__cart)&&void 0!==e?e:this.__transactionTemplate)||void 0===t?void 0:t.template_set_uri))try{const e=new URL(null!==(o=null===(r=this.__store)||void 0===r?void 0:r._links["fx:template_sets"].href)&&void 0!==o?o:"");return e.searchParams.set("code","DEFAULT"),e.toString()}catch(e){}}get __localeCodesHelperHref(){var e;if(this.__defaultTemplateSetHref||this.__templateSetHref)return null!==(e=this.localeCodes)&&void 0!==e?e:void 0}get __transactionHref(){var e,t;return null===(t=null===(e=this.data)||void 0===e?void 0:e._links["fx:transaction"])||void 0===t?void 0:t.href}get __templateSetHref(){var e;const t=null!==(e=this.__cart)&&void 0!==e?e:this.__transactionTemplate;if(!(null==t?void 0:t.currency_code))return(null==t?void 0:t.template_set_uri)||void 0}get __storeHref(){var e,t;return null===(t=null===(e=this.data)||void 0===e?void 0:e._links["fx:store"])||void 0===t?void 0:t.href}get __cartHref(){var e,t;const r=null===(e=this.data)||void 0===e?void 0:e._links;return null===(t=null==r?void 0:r["fx:cart"])||void 0===t?void 0:t.href}get __transactionTemplate(){var e,t;const r=`#${this.__transactionTemplateLoaderId}`,o=this.renderRoot.querySelector(r);return null!==(t=null===(e=null==o?void 0:o.data)||void 0===e?void 0:e._embedded["fx:transaction_template"])&&void 0!==t?t:null}get __defaultTemplateSet(){var e,t;const r=`#${this.__defaultTemplateSetLoaderId}`,o=this.renderRoot.querySelector(r);return null!==(t=null===(e=null==o?void 0:o.data)||void 0===e?void 0:e._embedded["fx:template_sets"][0])&&void 0!==t?t:null}get __localeCodesHelper(){var e,t;const r=`#${this.__localeCodesHelperLoaderId}`;return null!==(t=null===(e=this.renderRoot.querySelector(r))||void 0===e?void 0:e.data)&&void 0!==t?t:null}get __transaction(){var e,t;const r=`#${this.__transactionLoaderId}`;return null!==(t=null===(e=this.renderRoot.querySelector(r))||void 0===e?void 0:e.data)&&void 0!==t?t:null}get __templateSet(){var e,t;const r=`#${this.__templateSetLoaderId}`;return null!==(t=null===(e=this.renderRoot.querySelector(r))||void 0===e?void 0:e.data)&&void 0!==t?t:null}get __store(){var e,t;const r=`#${this.__storeLoaderId}`;return null!==(t=null===(e=this.renderRoot.querySelector(r))||void 0===e?void 0:e.data)&&void 0!==t?t:null}get __cart(){var e,t;const r=`#${this.__cartLoaderId}`;return null!==(t=null===(e=this.renderRoot.querySelector(r))||void 0===e?void 0:e.data)&&void 0!==t?t:null}get __currencyCode(){var e,t,r,o,a;const d=this.__transaction;if(d)return d.currency_code;{const d=null!==(e=this.__cart)&&void 0!==e?e:this.__transactionTemplate;if(null==d?void 0:d.currency_code)return d.currency_code;{const e=this.__localeCodesHelper,d=null===(r=null!==(t=this.__templateSet)&&void 0!==t?t:this.__defaultTemplateSet)||void 0===r?void 0:r.locale_code,i=d?null==e?void 0:e.values[d]:void 0;if(i)return null!==(a=null===(o=/Currency: ([A-Z]{3})/g.exec(i))||void 0===o?void 0:o[1])&&void 0!==a?a:null}}}get __currencyDisplay(){var e;return(null===(e=this.__store)||void 0===e?void 0:e.use_international_currency_symbol)?"code":"symbol"}}customElements.define("foxy-item-option-card",u);export{u as ItemOptionCard};
1
+ import"./shared-5212ef4f.js";import"./foxy-nucleon-element.js";import"./foxy-spinner.js";import{_ as e}from"./shared-cb58dfcd.js";import{a as t}from"./shared-e1400289.js";import{T as r}from"./shared-393a7ab2.js";import{i as o}from"./shared-53e42a77.js";import{h as a}from"./shared-ba5c42c7.js";import"./shared-f83207fb.js";import"./shared-5592ec6e.js";import"./shared-343d1fd7.js";import"./shared-cd96ff03.js";import"./shared-2aa23b5f.js";import"./shared-5e4a03d1.js";import"./shared-7594e563.js";import"./shared-0aedd809.js";import"./shared-5ef40e86.js";import"./shared-1b46df2a.js";import"./shared-241b6cca.js";import"./shared-d8694661.js";import"./shared-c231e3bf.js";import"./shared-1d03f911.js";import"./shared-5afb584d.js";import"./shared-c009b9b6.js";import"./shared-4e709717.js";let d,i,s,l,n=e=>e;const c=t(r,"item-option-card");class u extends c{constructor(){super(...arguments),this.localeCodes=null,this.__transactionTemplateLoaderId="transactionTemplateLoader",this.__defaultTemplateSetLoaderId="defaultTemplateSetLoader",this.__localeCodesHelperLoaderId="localeCodesLoader",this.__transactionLoaderId="transactionLoader",this.__templateSetLoaderId="templateSetLoader",this.__storeLoaderId="storeLoader",this.__cartLoaderId="cartLoader"}static get properties(){return e(e({},super.properties),{},{localeCodes:{attribute:"locale-codes"}})}renderBody(){const e=this.__currencyDisplay,t=this.__currencyCode;return a(d||(d=n` <foxy-nucleon class="hidden" infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <foxy-nucleon class="hidden" infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <foxy-nucleon class="hidden" infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <foxy-nucleon class="hidden" infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <foxy-nucleon class="hidden" infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <foxy-nucleon class="hidden" infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <foxy-nucleon class="hidden" infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> ${0} `),o(this.__transactionTemplateHref),this.__transactionTemplateLoaderId,(()=>this.requestUpdate()),o(this.__defaultTemplateSetHref),this.__defaultTemplateSetLoaderId,(()=>this.requestUpdate()),o(this.__localeCodesHelperHref),this.__localeCodesHelperLoaderId,(()=>this.requestUpdate()),o(this.__transactionHref),this.__transactionLoaderId,(()=>this.requestUpdate()),o(this.__templateSetHref),this.__templateSetLoaderId,(()=>this.requestUpdate()),o(this.__storeHref),this.__storeLoaderId,(()=>this.requestUpdate()),o(this.__cartHref),this.__cartLoaderId,(()=>this.requestUpdate()),super.renderBody({title:r=>{if(!t||!e)return a(i||(i=n`&ZeroWidthSpace;`));let o;try{o=Math.abs(r.price_mod).toLocaleString(this.lang||"en",{maximumFractionDigits:2,minimumFractionDigits:2,currencyDisplay:e,currency:t,style:"currency"})}catch(e){o="--"}return a(s||(s=n`${0} &bull; ${0} &bull; ${0}`),r.name,o,r.weight_mod)},subtitle:e=>a(l||(l=n`${0}`),e.value)}))}get isBodyReady(){return super.isBodyReady&&!!this.__currencyCode&&!!this.__currencyDisplay}get __transactionTemplateHref(){var e,t,r;try{const o=null===(e=this.data)||void 0===e?void 0:e._links,a=new URL(null!==(r=null===(t=null==o?void 0:o["fx:subscription"])||void 0===t?void 0:t.href)&&void 0!==r?r:"");return a.searchParams.set("zoom","transaction_template"),a.toString()}catch(e){}}get __defaultTemplateSetHref(){var e,t,r,o;if(""===(null===(t=null!==(e=this.__cart)&&void 0!==e?e:this.__transactionTemplate)||void 0===t?void 0:t.template_set_uri))try{const e=new URL(null!==(o=null===(r=this.__store)||void 0===r?void 0:r._links["fx:template_sets"].href)&&void 0!==o?o:"");return e.searchParams.set("code","DEFAULT"),e.toString()}catch(e){}}get __localeCodesHelperHref(){var e;if(this.__defaultTemplateSetHref||this.__templateSetHref)return null!==(e=this.localeCodes)&&void 0!==e?e:void 0}get __transactionHref(){var e,t;return null===(t=null===(e=this.data)||void 0===e?void 0:e._links["fx:transaction"])||void 0===t?void 0:t.href}get __templateSetHref(){var e;const t=null!==(e=this.__cart)&&void 0!==e?e:this.__transactionTemplate;if(!(null==t?void 0:t.currency_code))return(null==t?void 0:t.template_set_uri)||void 0}get __storeHref(){var e,t;return null===(t=null===(e=this.data)||void 0===e?void 0:e._links["fx:store"])||void 0===t?void 0:t.href}get __cartHref(){var e,t;const r=null===(e=this.data)||void 0===e?void 0:e._links;return null===(t=null==r?void 0:r["fx:cart"])||void 0===t?void 0:t.href}get __transactionTemplate(){var e,t;const r=`#${this.__transactionTemplateLoaderId}`,o=this.renderRoot.querySelector(r);return null!==(t=null===(e=null==o?void 0:o.data)||void 0===e?void 0:e._embedded["fx:transaction_template"])&&void 0!==t?t:null}get __defaultTemplateSet(){var e,t;const r=`#${this.__defaultTemplateSetLoaderId}`,o=this.renderRoot.querySelector(r);return null!==(t=null===(e=null==o?void 0:o.data)||void 0===e?void 0:e._embedded["fx:template_sets"][0])&&void 0!==t?t:null}get __localeCodesHelper(){var e,t;const r=`#${this.__localeCodesHelperLoaderId}`;return null!==(t=null===(e=this.renderRoot.querySelector(r))||void 0===e?void 0:e.data)&&void 0!==t?t:null}get __transaction(){var e,t;const r=`#${this.__transactionLoaderId}`;return null!==(t=null===(e=this.renderRoot.querySelector(r))||void 0===e?void 0:e.data)&&void 0!==t?t:null}get __templateSet(){var e,t;const r=`#${this.__templateSetLoaderId}`;return null!==(t=null===(e=this.renderRoot.querySelector(r))||void 0===e?void 0:e.data)&&void 0!==t?t:null}get __store(){var e,t;const r=`#${this.__storeLoaderId}`;return null!==(t=null===(e=this.renderRoot.querySelector(r))||void 0===e?void 0:e.data)&&void 0!==t?t:null}get __cart(){var e,t;const r=`#${this.__cartLoaderId}`;return null!==(t=null===(e=this.renderRoot.querySelector(r))||void 0===e?void 0:e.data)&&void 0!==t?t:null}get __currencyCode(){var e,t,r,o,a;const d=this.__transaction;if(d)return d.currency_code;{const d=null!==(e=this.__cart)&&void 0!==e?e:this.__transactionTemplate;if(null==d?void 0:d.currency_code)return d.currency_code;{const e=this.__localeCodesHelper,d=null===(r=null!==(t=this.__templateSet)&&void 0!==t?t:this.__defaultTemplateSet)||void 0===r?void 0:r.locale_code,i=d?null==e?void 0:e.values[d]:void 0;if(i)return null!==(a=null===(o=/Currency: ([A-Z]{3})/g.exec(i))||void 0===o?void 0:o[1])&&void 0!==a?a:null}}}get __currencyDisplay(){var e;return(null===(e=this.__store)||void 0===e?void 0:e.use_international_currency_symbol)?"code":"symbol"}}customElements.define("foxy-item-option-card",u);export{u as ItemOptionCard};
@@ -1 +1 @@
1
- import"./shared-56d91134.js";import"./shared-0e1ad508.js";import"./shared-076f086a.js";import{I as r}from"./shared-7995cbcf.js";import{a as e}from"./shared-1ce5b073.js";import{h as o}from"./shared-ba5c42c7.js";import"./shared-677953e0.js";import"./shared-5212ef4f.js";import"./shared-70380f94.js";import"./shared-cb58dfcd.js";import"./shared-343d1fd7.js";import"./shared-2aa23b5f.js";import"./shared-5afb584d.js";import"./shared-53e42a77.js";import"./shared-f83207fb.js";import"./shared-5592ec6e.js";import"./shared-cd96ff03.js";import"./shared-5e4a03d1.js";import"./shared-7594e563.js";import"./shared-0aedd809.js";import"./shared-5ef40e86.js";import"./shared-6b3b8c63.js";import"./shared-76cbea00.js";import"./shared-a3a4c368.js";import"./shared-7b3aac7e.js";import"./shared-d2304d50.js";import"./shared-4ded48ee.js";import"./shared-92153a7f.js";import"./shared-68a5368a.js";import"./shared-500b7eb7.js";import"./shared-4e709717.js";import"./shared-d0aed1c1.js";import"./shared-1f6366c0.js";import"./shared-a4ca1c5d.js";import"./foxy-copy-to-clipboard.js";import"./shared-127ec8a7.js";import"./shared-0995ae7c.js";import"./shared-16ae74b2.js";import"./shared-75e7361d.js";import"./foxy-spinner.js";import"./shared-bab2ea2c.js";let a,t=r=>r;class s extends(e(r,"item-option-form")){static get v8n(){return[({name:r})=>!!r||"name:v8n_required",({name:r})=>!!r&&r.length<=100||"name:v8n_too_long",({value:r})=>!!r||"value:v8n_required",({value:r})=>!!r&&r.length<=1024||"value:v8n_too_long"]}renderBody(){return o(a||(a=t` ${0} <foxy-internal-summary-control infer="general"> <foxy-internal-text-control layout="summary-item" infer="name"></foxy-internal-text-control> <foxy-internal-text-control layout="summary-item" infer="value"> </foxy-internal-text-control> </foxy-internal-summary-control> <foxy-internal-summary-control infer="mods"> <foxy-internal-number-control layout="summary-item" infer="price-mod"> </foxy-internal-number-control> <foxy-internal-number-control layout="summary-item" infer="weight-mod"> </foxy-internal-number-control> </foxy-internal-summary-control> ${0} `),this.renderHeader(),super.renderBody())}}customElements.define("foxy-item-option-form",s);export{s as ItemOptionForm};
1
+ import"./shared-2939f350.js";import"./shared-4cae017c.js";import"./shared-948919d2.js";import{I as r}from"./shared-8f81f4ed.js";import{a as e}from"./shared-e1400289.js";import{h as o}from"./shared-ba5c42c7.js";import"./shared-ec9893c7.js";import"./shared-5212ef4f.js";import"./shared-1d03f911.js";import"./shared-cb58dfcd.js";import"./shared-343d1fd7.js";import"./shared-2aa23b5f.js";import"./shared-5afb584d.js";import"./shared-53e42a77.js";import"./shared-f83207fb.js";import"./shared-5592ec6e.js";import"./shared-cd96ff03.js";import"./shared-5e4a03d1.js";import"./shared-7594e563.js";import"./shared-0aedd809.js";import"./shared-5ef40e86.js";import"./shared-b05ef317.js";import"./shared-9d4813e6.js";import"./shared-d8694661.js";import"./shared-58b6710c.js";import"./shared-d743d0fd.js";import"./shared-2fe8aabd.js";import"./shared-5d7c4673.js";import"./shared-f79f08cc.js";import"./shared-7977d581.js";import"./shared-4e709717.js";import"./shared-d0aed1c1.js";import"./shared-8e010314.js";import"./shared-53253d60.js";import"./foxy-copy-to-clipboard.js";import"./shared-434cdfec.js";import"./shared-1b46df2a.js";import"./shared-241b6cca.js";import"./shared-1aff90a9.js";import"./shared-c231e3bf.js";import"./foxy-spinner.js";import"./shared-bab2ea2c.js";let s,t=r=>r;class a extends(e(r,"item-option-form")){static get v8n(){return[({name:r})=>!!r||"name:v8n_required",({name:r})=>!!r&&r.length<=100||"name:v8n_too_long",({value:r})=>!!r||"value:v8n_required",({value:r})=>!!r&&r.length<=1024||"value:v8n_too_long"]}renderBody(){return o(s||(s=t` ${0} <foxy-internal-summary-control infer="general"> <foxy-internal-text-control layout="summary-item" infer="name"></foxy-internal-text-control> <foxy-internal-text-control layout="summary-item" infer="value"> </foxy-internal-text-control> </foxy-internal-summary-control> <foxy-internal-summary-control infer="mods"> <foxy-internal-number-control layout="summary-item" infer="price-mod"> </foxy-internal-number-control> <foxy-internal-number-control layout="summary-item" infer="weight-mod"> </foxy-internal-number-control> </foxy-internal-summary-control> ${0} `),this.renderHeader(),super.renderBody())}}customElements.define("foxy-item-option-form",a);export{a as ItemOptionForm};