@foxy.io/elements 1.58.0 → 1.59.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (683) hide show
  1. package/dist/cdn/foxy-access-recovery-form.js +1 -1
  2. package/dist/cdn/foxy-address-card.js +2 -2
  3. package/dist/cdn/foxy-address-form.js +1 -1
  4. package/dist/cdn/foxy-admin-subscription-card.js +1 -1
  5. package/dist/cdn/foxy-admin-subscription-form.js +1 -1
  6. package/dist/cdn/foxy-admin-transaction-card.js +1 -1
  7. package/dist/cdn/foxy-api-browser.js +1 -1
  8. package/dist/cdn/foxy-applied-coupon-code-card.js +1 -1
  9. package/dist/cdn/foxy-applied-coupon-code-form.js +1 -1
  10. package/dist/cdn/foxy-applied-tax-card.js +1 -1
  11. package/dist/cdn/foxy-attribute-card.js +1 -1
  12. package/dist/cdn/foxy-attribute-form.js +1 -1
  13. package/dist/cdn/foxy-billing-address-card.js +1 -1
  14. package/dist/cdn/foxy-cancellation-form.js +1 -1
  15. package/dist/cdn/foxy-cart-card.js +1 -1
  16. package/dist/cdn/foxy-cart-form.js +2 -2
  17. package/dist/cdn/foxy-client-card.js +1 -1
  18. package/dist/cdn/foxy-client-form.js +1 -1
  19. package/dist/cdn/foxy-collection-page.js +1 -1
  20. package/dist/cdn/foxy-collection-pages.js +1 -1
  21. package/dist/cdn/foxy-copy-to-clipboard.js +1 -1
  22. package/dist/cdn/foxy-coupon-card.js +1 -1
  23. package/dist/cdn/foxy-coupon-code-card.js +1 -1
  24. package/dist/cdn/foxy-coupon-code-form.js +1 -1
  25. package/dist/cdn/foxy-coupon-codes-form.js +1 -1
  26. package/dist/cdn/foxy-coupon-detail-card.js +1 -1
  27. package/dist/cdn/foxy-coupon-form.js +1 -1
  28. package/dist/cdn/foxy-custom-field-card.js +1 -1
  29. package/dist/cdn/foxy-custom-field-form.js +1 -1
  30. package/dist/cdn/foxy-customer-api.js +1 -1
  31. package/dist/cdn/foxy-customer-card.js +1 -1
  32. package/dist/cdn/foxy-customer-form.js +1 -1
  33. package/dist/cdn/foxy-customer-portal-settings-form.js +1 -1
  34. package/dist/cdn/foxy-customer-portal-settings.js +1 -1
  35. package/dist/cdn/foxy-customer-portal.js +11 -11
  36. package/dist/cdn/foxy-customer.js +7 -7
  37. package/dist/cdn/foxy-customers-table.js +1 -1
  38. package/dist/cdn/foxy-discount-builder.js +1 -1
  39. package/dist/cdn/foxy-discount-card.js +1 -1
  40. package/dist/cdn/foxy-discount-detail-card.js +1 -1
  41. package/dist/cdn/foxy-donation.js +1 -1
  42. package/dist/cdn/foxy-downloadable-card.js +1 -1
  43. package/dist/cdn/foxy-downloadable-form.js +2 -2
  44. package/dist/cdn/foxy-email-template-card.js +1 -1
  45. package/dist/cdn/foxy-email-template-form.js +1 -1
  46. package/dist/cdn/foxy-error-entry-card.js +1 -1
  47. package/dist/cdn/foxy-experimental-add-to-cart-builder.js +1 -1
  48. package/dist/cdn/foxy-filter-attribute-card.js +1 -1
  49. package/dist/cdn/foxy-filter-attribute-form.js +1 -1
  50. package/dist/cdn/foxy-form-dialog.js +1 -1
  51. package/dist/cdn/foxy-generate-codes-form.js +1 -1
  52. package/dist/cdn/foxy-gift-card-card.js +1 -1
  53. package/dist/cdn/foxy-gift-card-code-card.js +1 -1
  54. package/dist/cdn/foxy-gift-card-code-form.js +1 -1
  55. package/dist/cdn/foxy-gift-card-code-log-card.js +1 -1
  56. package/dist/cdn/foxy-gift-card-codes-form.js +1 -1
  57. package/dist/cdn/foxy-gift-card-form.js +1 -1
  58. package/dist/cdn/foxy-i18n-editor.js +3 -3
  59. package/dist/cdn/foxy-i18n.js +1 -1
  60. package/dist/cdn/foxy-integration-card.js +1 -1
  61. package/dist/cdn/foxy-integration-form.js +1 -1
  62. package/dist/cdn/foxy-item-card.js +1 -1
  63. package/dist/cdn/foxy-item-category-card.js +1 -1
  64. package/dist/cdn/foxy-item-category-form.js +1 -1
  65. package/dist/cdn/foxy-item-form.js +1 -1
  66. package/dist/cdn/foxy-item-option-card.js +1 -1
  67. package/dist/cdn/foxy-item-option-form.js +1 -1
  68. package/dist/cdn/foxy-items-form.js +1 -1
  69. package/dist/cdn/foxy-native-integration-card.js +1 -1
  70. package/dist/cdn/foxy-native-integration-form.js +1 -1
  71. package/dist/cdn/foxy-nucleon-element.js +1 -1
  72. package/dist/cdn/foxy-pagination.js +1 -1
  73. package/dist/cdn/foxy-passkey-card.js +1 -1
  74. package/dist/cdn/foxy-passkey-form.js +1 -1
  75. package/dist/cdn/foxy-payment-card-embed.js +1 -1
  76. package/dist/cdn/foxy-payment-card.js +1 -1
  77. package/dist/cdn/foxy-payment-method-card.js +1 -1
  78. package/dist/cdn/foxy-payments-api-fraud-protection-card.js +1 -1
  79. package/dist/cdn/foxy-payments-api-fraud-protection-form.js +1 -1
  80. package/dist/cdn/foxy-payments-api-payment-method-card.js +1 -1
  81. package/dist/cdn/foxy-payments-api-payment-method-form.js +1 -1
  82. package/dist/cdn/foxy-payments-api-payment-preset-card.js +1 -1
  83. package/dist/cdn/foxy-payments-api-payment-preset-form.js +1 -1
  84. package/dist/cdn/foxy-payments-api.js +1 -1
  85. package/dist/cdn/foxy-query-builder.js +1 -1
  86. package/dist/cdn/foxy-report-form.js +1 -1
  87. package/dist/cdn/foxy-reports-table.js +1 -1
  88. package/dist/cdn/foxy-shipment-card.js +1 -1
  89. package/dist/cdn/foxy-shipping-container-card.js +1 -1
  90. package/dist/cdn/foxy-shipping-drop-type-card.js +1 -1
  91. package/dist/cdn/foxy-shipping-method-card.js +1 -1
  92. package/dist/cdn/foxy-shipping-service-card.js +1 -1
  93. package/dist/cdn/foxy-sign-in-form.js +1 -1
  94. package/dist/cdn/foxy-spinner.js +2 -2
  95. package/dist/cdn/foxy-store-card.js +1 -1
  96. package/dist/cdn/foxy-store-form.js +1 -1
  97. package/dist/cdn/foxy-store-shipping-method-form.js +1 -1
  98. package/dist/cdn/foxy-store-transaction-folder-card.js +1 -1
  99. package/dist/cdn/foxy-store-transaction-folder-form.js +1 -1
  100. package/dist/cdn/foxy-subscription-card.js +1 -1
  101. package/dist/cdn/foxy-subscription-form.js +1 -1
  102. package/dist/cdn/foxy-subscription-settings-form.js +1 -1
  103. package/dist/cdn/foxy-subscriptions-table.js +1 -1
  104. package/dist/cdn/foxy-table.js +1 -1
  105. package/dist/cdn/foxy-tax-card.js +1 -1
  106. package/dist/cdn/foxy-tax-form.js +1 -1
  107. package/dist/cdn/foxy-template-config-form.js +1 -1
  108. package/dist/cdn/foxy-template-form.js +1 -1
  109. package/dist/cdn/foxy-template-set-card.js +1 -1
  110. package/dist/cdn/foxy-template-set-form.js +1 -1
  111. package/dist/cdn/foxy-transaction-card.js +1 -1
  112. package/dist/cdn/foxy-transaction.js +1 -1
  113. package/dist/cdn/foxy-transactions-table.js +7 -7
  114. package/dist/cdn/foxy-update-payment-method-form.js +1 -1
  115. package/dist/cdn/foxy-user-card.js +1 -1
  116. package/dist/cdn/foxy-user-form.js +1 -1
  117. package/dist/cdn/foxy-user-invitation-card.js +1 -1
  118. package/dist/cdn/foxy-user-invitation-form.js +1 -1
  119. package/dist/cdn/foxy-users-table.js +1 -1
  120. package/dist/cdn/foxy-webhook-card.js +1 -1
  121. package/dist/cdn/foxy-webhook-form.js +1 -1
  122. package/dist/cdn/foxy-webhook-log-card.js +1 -1
  123. package/dist/cdn/foxy-webhook-status-card.js +1 -1
  124. package/dist/cdn/{shared-1d5baaf5.js → shared-0811ea40.js} +1 -1
  125. package/dist/cdn/{shared-80950330.js → shared-142df717.js} +1 -1
  126. package/dist/cdn/{shared-73b1e51b.js → shared-14713ead.js} +1 -1
  127. package/dist/cdn/{shared-efe0bfd2.js → shared-19b475f7.js} +1 -1
  128. package/dist/cdn/{shared-f9e4a1cc.js → shared-19c47f53.js} +1 -1
  129. package/dist/cdn/{shared-9154f04d.js → shared-1a814f90.js} +1 -1
  130. package/dist/cdn/shared-1b414966.js +1 -0
  131. package/dist/cdn/{shared-9c1f1c3b.js → shared-1e9df11c.js} +1 -1
  132. package/dist/cdn/shared-20841d9c.js +1 -0
  133. package/dist/cdn/shared-2652e98e.js +1 -0
  134. package/dist/cdn/{shared-9a3bf65c.js → shared-28cc8aa1.js} +1 -1
  135. package/dist/cdn/{shared-3b5a845e.js → shared-28fa98d7.js} +1 -1
  136. package/dist/cdn/{shared-7892fd3f.js → shared-2fbfbe12.js} +1 -1
  137. package/dist/cdn/shared-336e73ce.js +1 -0
  138. package/dist/cdn/{shared-b4b6bd8b.js → shared-33d770fe.js} +1 -1
  139. package/dist/cdn/{shared-a0309d5f.js → shared-34262bb8.js} +1 -1
  140. package/dist/cdn/shared-36f1e29f.js +1 -0
  141. package/dist/cdn/{shared-e2e5d7d0.js → shared-38e0a818.js} +1 -1
  142. package/dist/cdn/{shared-803be1e4.js → shared-3991076b.js} +1 -1
  143. package/dist/cdn/{shared-5d7439e3.js → shared-3baa9cc9.js} +1 -1
  144. package/dist/cdn/{shared-305a1f88.js → shared-3bb289b3.js} +1 -1
  145. package/dist/cdn/{shared-d81149d8.js → shared-3eca56ee.js} +1 -1
  146. package/dist/cdn/{shared-377cce47.js → shared-3fd75ee6.js} +1 -1
  147. package/dist/cdn/shared-453bc087.js +1 -0
  148. package/dist/cdn/{shared-486d4db3.js → shared-45649d84.js} +1 -1
  149. package/dist/cdn/{shared-b948488a.js → shared-48910b3f.js} +1 -1
  150. package/dist/cdn/{shared-8ff47d1a.js → shared-4cc16cdf.js} +1 -1
  151. package/dist/cdn/shared-50ef1d5a.js +1 -0
  152. package/dist/cdn/{shared-a0baefff.js → shared-53a5212e.js} +1 -1
  153. package/dist/cdn/shared-559b648a.js +1 -0
  154. package/dist/cdn/{shared-8df8e77c.js → shared-56741bad.js} +1 -1
  155. package/dist/cdn/{shared-2cab5d23.js → shared-59dfee2c.js} +1 -1
  156. package/dist/cdn/{shared-887ac0b0.js → shared-5b8c7250.js} +1 -1
  157. package/dist/cdn/{shared-ce05e482.js → shared-5dbd66e3.js} +1 -1
  158. package/dist/cdn/{shared-b5e048f5.js → shared-6262e0d6.js} +1 -1
  159. package/dist/cdn/{shared-3eac4b7c.js → shared-62ee726e.js} +1 -1
  160. package/dist/cdn/{shared-3a91efdc.js → shared-760a2243.js} +1 -1
  161. package/dist/cdn/{shared-f6416c66.js → shared-7b6a899b.js} +1 -1
  162. package/dist/cdn/{shared-6c167083.js → shared-8ec1b077.js} +1 -1
  163. package/dist/cdn/{shared-65094878.js → shared-91483320.js} +1 -1
  164. package/dist/cdn/{shared-6a0e1b94.js → shared-98457d79.js} +3 -3
  165. package/dist/cdn/{shared-37a12ea3.js → shared-9f8b593b.js} +5 -5
  166. package/dist/cdn/{shared-faa174b6.js → shared-a08f594b.js} +1 -1
  167. package/dist/cdn/shared-a1bec4a0.js +1 -0
  168. package/dist/cdn/shared-a44fcc6a.js +1 -0
  169. package/dist/cdn/{shared-515003f6.js → shared-a8ae24f0.js} +1 -1
  170. package/dist/cdn/shared-ab1f5f1f.js +1 -0
  171. package/dist/cdn/{shared-9687ab7b.js → shared-affe06c0.js} +1 -1
  172. package/dist/cdn/{shared-afdf7b0c.js → shared-b48cd5d3.js} +1 -1
  173. package/dist/cdn/shared-b84996e5.js +1 -0
  174. package/dist/cdn/{shared-772990cd.js → shared-bc74cd11.js} +4 -4
  175. package/dist/cdn/{shared-2a678cc8.js → shared-be20875c.js} +1 -1
  176. package/dist/cdn/{shared-a95d3946.js → shared-c066b7fd.js} +1 -1
  177. package/dist/cdn/{shared-6cdfb858.js → shared-c3d6bcc0.js} +1 -1
  178. package/dist/cdn/{shared-f8e360e6.js → shared-c56c3e1e.js} +1 -1
  179. package/dist/cdn/{shared-db623837.js → shared-c59277a4.js} +1 -1
  180. package/dist/cdn/{shared-058530fc.js → shared-cb5305b9.js} +1 -1
  181. package/dist/cdn/{shared-19073761.js → shared-cf1965cb.js} +1 -1
  182. package/dist/cdn/{shared-0f92b865.js → shared-cfc6735e.js} +1 -1
  183. package/dist/cdn/{shared-b8f09caa.js → shared-d743ec15.js} +1 -1
  184. package/dist/cdn/{shared-a20ef119.js → shared-d8b880bb.js} +1 -1
  185. package/dist/cdn/shared-da3393a5.js +1 -0
  186. package/dist/cdn/{shared-adfa4b7a.js → shared-db17c9ee.js} +1 -1
  187. package/dist/cdn/{shared-99c53365.js → shared-dc6e5879.js} +1 -1
  188. package/dist/cdn/{shared-60497743.js → shared-e2a5457f.js} +1 -1
  189. package/dist/cdn/{shared-a5d6db21.js → shared-e9f51baa.js} +1 -1
  190. package/dist/cdn/{shared-0fd68dc0.js → shared-f410644a.js} +1 -1
  191. package/dist/cdn/{shared-8d8975d5.js → shared-f77994ad.js} +1 -1
  192. package/dist/cdn/{shared-0cf593c8.js → shared-fdf6df5c.js} +1 -1
  193. package/dist/cdn/translations/access-recovery-form/en.json +2 -1
  194. package/dist/cdn/translations/address-card/en.json +2 -1
  195. package/dist/cdn/translations/address-form/en.json +2 -1
  196. package/dist/cdn/translations/admin-subscription-card/en.json +3 -1
  197. package/dist/cdn/translations/admin-subscription-form/en.json +60 -25
  198. package/dist/cdn/translations/admin-transaction-card/en.json +2 -1
  199. package/dist/cdn/translations/applied-coupon-code-card/en.json +2 -1
  200. package/dist/cdn/translations/applied-coupon-code-form/en.json +2 -1
  201. package/dist/cdn/translations/applied-tax-card/en.json +2 -1
  202. package/dist/cdn/translations/attribute-card/en.json +2 -1
  203. package/dist/cdn/translations/attribute-form/en.json +2 -1
  204. package/dist/cdn/translations/billing-address-card/en.json +2 -1
  205. package/dist/cdn/translations/cancellation-form/en.json +2 -1
  206. package/dist/cdn/translations/cart-card/en.json +2 -1
  207. package/dist/cdn/translations/cart-form/en.json +48 -23
  208. package/dist/cdn/translations/client-card/en.json +2 -1
  209. package/dist/cdn/translations/client-form/en.json +2 -1
  210. package/dist/cdn/translations/coupon-card/en.json +2 -1
  211. package/dist/cdn/translations/coupon-code-card/en.json +2 -1
  212. package/dist/cdn/translations/coupon-code-form/en.json +4 -2
  213. package/dist/cdn/translations/coupon-codes-form/en.json +2 -1
  214. package/dist/cdn/translations/coupon-form/en.json +23 -10
  215. package/dist/cdn/translations/custom-field-card/en.json +2 -1
  216. package/dist/cdn/translations/custom-field-form/en.json +2 -1
  217. package/dist/cdn/translations/customer/en.json +35 -17
  218. package/dist/cdn/translations/customer-card/en.json +2 -1
  219. package/dist/cdn/translations/customer-form/en.json +2 -1
  220. package/dist/cdn/translations/customer-portal/en.json +29 -14
  221. package/dist/cdn/translations/customer-portal-settings-form/en.json +10 -5
  222. package/dist/cdn/translations/customers-table/en.json +1 -0
  223. package/dist/cdn/translations/discount-card/en.json +2 -1
  224. package/dist/cdn/translations/downloadable-card/en.json +2 -1
  225. package/dist/cdn/translations/downloadable-form/en.json +4 -2
  226. package/dist/cdn/translations/email-template-card/en.json +2 -1
  227. package/dist/cdn/translations/email-template-form/en.json +6 -3
  228. package/dist/cdn/translations/error-entry-card/en.json +2 -1
  229. package/dist/cdn/translations/experimental-add-to-cart-builder/en.json +18 -8
  230. package/dist/cdn/translations/filter-attribute-card/en.json +2 -1
  231. package/dist/cdn/translations/filter-attribute-form/en.json +2 -1
  232. package/dist/cdn/translations/generate-codes-form/en.json +2 -1
  233. package/dist/cdn/translations/gift-card-card/en.json +2 -1
  234. package/dist/cdn/translations/gift-card-code-card/en.json +2 -1
  235. package/dist/cdn/translations/gift-card-code-form/en.json +10 -5
  236. package/dist/cdn/translations/gift-card-code-log-card/en.json +2 -1
  237. package/dist/cdn/translations/gift-card-codes-form/en.json +2 -1
  238. package/dist/cdn/translations/gift-card-form/en.json +29 -13
  239. package/dist/cdn/translations/i18n-editor/en.json +2 -1
  240. package/dist/cdn/translations/integration-card/en.json +2 -1
  241. package/dist/cdn/translations/integration-form/en.json +2 -1
  242. package/dist/cdn/translations/item-card/en.json +2 -1
  243. package/dist/cdn/translations/item-category-card/en.json +2 -1
  244. package/dist/cdn/translations/item-category-form/en.json +11 -4
  245. package/dist/cdn/translations/item-form/en.json +19 -9
  246. package/dist/cdn/translations/item-option-form/en.json +2 -1
  247. package/dist/cdn/translations/native-integration-card/en.json +2 -1
  248. package/dist/cdn/translations/native-integration-form/en.json +6 -3
  249. package/dist/cdn/translations/passkey-card/en.json +2 -1
  250. package/dist/cdn/translations/passkey-form/en.json +2 -1
  251. package/dist/cdn/translations/payment-card/en.json +2 -1
  252. package/dist/cdn/translations/payment-method-card/en.json +7 -3
  253. package/dist/cdn/translations/payments-api-fraud-protection-card/en.json +2 -1
  254. package/dist/cdn/translations/payments-api-fraud-protection-form/en.json +4 -2
  255. package/dist/cdn/translations/payments-api-payment-method-card/en.json +2 -1
  256. package/dist/cdn/translations/payments-api-payment-method-form/en.json +3 -1
  257. package/dist/cdn/translations/payments-api-payment-preset-card/en.json +2 -1
  258. package/dist/cdn/translations/payments-api-payment-preset-form/en.json +10 -5
  259. package/dist/cdn/translations/report-form/en.json +2 -1
  260. package/dist/cdn/translations/reports-table/en.json +4 -2
  261. package/dist/cdn/translations/shipment-card/en.json +2 -1
  262. package/dist/cdn/translations/shipping-container-card/en.json +2 -1
  263. package/dist/cdn/translations/shipping-drop-type-card/en.json +2 -1
  264. package/dist/cdn/translations/shipping-method-card/en.json +2 -1
  265. package/dist/cdn/translations/shipping-service-card/en.json +2 -1
  266. package/dist/cdn/translations/sign-in-form/en.json +2 -1
  267. package/dist/cdn/translations/spinner/en.json +2 -0
  268. package/dist/cdn/translations/store-card/en.json +2 -1
  269. package/dist/cdn/translations/store-form/en.json +2 -1
  270. package/dist/cdn/translations/store-shipping-method-form/en.json +21 -9
  271. package/dist/cdn/translations/store-transaction-folder-card/en.json +2 -1
  272. package/dist/cdn/translations/store-transaction-folder-form/en.json +2 -1
  273. package/dist/cdn/translations/subscription-card/en.json +2 -1
  274. package/dist/cdn/translations/subscription-form/en.json +12 -6
  275. package/dist/cdn/translations/subscription-settings-form/en.json +2 -1
  276. package/dist/cdn/translations/subscriptions-table/en.json +2 -1
  277. package/dist/cdn/translations/tax-card/en.json +2 -1
  278. package/dist/cdn/translations/tax-form/en.json +10 -3
  279. package/dist/cdn/translations/template-config-form/en.json +2 -1
  280. package/dist/cdn/translations/template-form/en.json +4 -2
  281. package/dist/cdn/translations/template-set-card/en.json +2 -1
  282. package/dist/cdn/translations/template-set-form/en.json +8 -4
  283. package/dist/cdn/translations/transaction/en.json +51 -21
  284. package/dist/cdn/translations/transaction-card/en.json +2 -1
  285. package/dist/cdn/translations/transactions-table/en.json +2 -1
  286. package/dist/cdn/translations/update-payment-method-form/en.json +5 -2
  287. package/dist/cdn/translations/user-card/en.json +2 -1
  288. package/dist/cdn/translations/user-form/en.json +2 -1
  289. package/dist/cdn/translations/user-invitation-card/en.json +42 -12
  290. package/dist/cdn/translations/user-invitation-form/en.json +65 -9
  291. package/dist/cdn/translations/users-table/en.json +4 -2
  292. package/dist/cdn/translations/webhook-card/en.json +1 -0
  293. package/dist/cdn/translations/webhook-form/en.json +4 -1
  294. package/dist/cdn/translations/webhook-log-card/en.json +1 -0
  295. package/dist/cdn/translations/webhook-status-card/en.json +1 -0
  296. package/dist/elements/internal/InternalAsyncListControl/InternalAsyncListControl.d.ts +1 -0
  297. package/dist/elements/internal/InternalAsyncListControl/InternalAsyncListControl.js +17 -10
  298. package/dist/elements/internal/InternalAsyncListControl/InternalAsyncListControl.js.map +1 -1
  299. package/dist/elements/internal/InternalAsyncResourceLinkListControl/InternalAsyncResourceLinkListControl.d.ts +3 -0
  300. package/dist/elements/internal/InternalAsyncResourceLinkListControl/InternalAsyncResourceLinkListControl.js +68 -26
  301. package/dist/elements/internal/InternalAsyncResourceLinkListControl/InternalAsyncResourceLinkListControl.js.map +1 -1
  302. package/dist/elements/internal/InternalCard/InternalCard.js +17 -7
  303. package/dist/elements/internal/InternalCard/InternalCard.js.map +1 -1
  304. package/dist/elements/internal/InternalForm/InternalForm.js +4 -2
  305. package/dist/elements/internal/InternalForm/InternalForm.js.map +1 -1
  306. package/dist/elements/internal/InternalPasswordControl/InternalPasswordControl.js +2 -0
  307. package/dist/elements/internal/InternalPasswordControl/InternalPasswordControl.js.map +1 -1
  308. package/dist/elements/internal/InternalPostActionControl/InternalPostActionControlDialog.js +17 -4
  309. package/dist/elements/internal/InternalPostActionControl/InternalPostActionControlDialog.js.map +1 -1
  310. package/dist/elements/internal/InternalSelectControl/InternalSelectControl.js +24 -0
  311. package/dist/elements/internal/InternalSelectControl/InternalSelectControl.js.map +1 -1
  312. package/dist/elements/public/AddressCard/AddressCard.d.ts +2 -0
  313. package/dist/elements/public/AddressCard/AddressCard.js +4 -0
  314. package/dist/elements/public/AddressCard/AddressCard.js.map +1 -1
  315. package/dist/elements/public/AddressForm/AddressForm.d.ts +2 -0
  316. package/dist/elements/public/AddressForm/AddressForm.js +10 -0
  317. package/dist/elements/public/AddressForm/AddressForm.js.map +1 -1
  318. package/dist/elements/public/AdminSubscriptionCard/AdminSubscriptionCard.d.ts +2 -0
  319. package/dist/elements/public/AdminSubscriptionCard/AdminSubscriptionCard.js +39 -12
  320. package/dist/elements/public/AdminSubscriptionCard/AdminSubscriptionCard.js.map +1 -1
  321. package/dist/elements/public/AdminSubscriptionForm/AdminSubscriptionForm.d.ts +2 -0
  322. package/dist/elements/public/AdminSubscriptionForm/AdminSubscriptionForm.js +15 -4
  323. package/dist/elements/public/AdminSubscriptionForm/AdminSubscriptionForm.js.map +1 -1
  324. package/dist/elements/public/AdminTransactionCard/AdminTransactionCard.d.ts +3 -0
  325. package/dist/elements/public/AdminTransactionCard/AdminTransactionCard.js +11 -2
  326. package/dist/elements/public/AdminTransactionCard/AdminTransactionCard.js.map +1 -1
  327. package/dist/elements/public/AppliedCouponCodeCard/AppliedCouponCodeCard.d.ts +3 -0
  328. package/dist/elements/public/AppliedCouponCodeCard/AppliedCouponCodeCard.js +11 -2
  329. package/dist/elements/public/AppliedCouponCodeCard/AppliedCouponCodeCard.js.map +1 -1
  330. package/dist/elements/public/AppliedCouponCodeForm/AppliedCouponCodeForm.d.ts +2 -0
  331. package/dist/elements/public/AppliedCouponCodeForm/AppliedCouponCodeForm.js +11 -0
  332. package/dist/elements/public/AppliedCouponCodeForm/AppliedCouponCodeForm.js.map +1 -1
  333. package/dist/elements/public/AppliedTaxCard/AppliedTaxCard.d.ts +2 -0
  334. package/dist/elements/public/AppliedTaxCard/AppliedTaxCard.js +10 -4
  335. package/dist/elements/public/AppliedTaxCard/AppliedTaxCard.js.map +1 -1
  336. package/dist/elements/public/AttributeCard/AttributeCard.js +1 -0
  337. package/dist/elements/public/AttributeCard/AttributeCard.js.map +1 -1
  338. package/dist/elements/public/CancellationForm/CancellationForm.d.ts +3 -0
  339. package/dist/elements/public/CancellationForm/CancellationForm.js +10 -1
  340. package/dist/elements/public/CancellationForm/CancellationForm.js.map +1 -1
  341. package/dist/elements/public/CartCard/CartCard.d.ts +4 -0
  342. package/dist/elements/public/CartCard/CartCard.js +28 -6
  343. package/dist/elements/public/CartCard/CartCard.js.map +1 -1
  344. package/dist/elements/public/CartForm/CartForm.d.ts +2 -0
  345. package/dist/elements/public/CartForm/CartForm.js +21 -0
  346. package/dist/elements/public/CartForm/CartForm.js.map +1 -1
  347. package/dist/elements/public/CartForm/internal/InternalCartFormCreateSessionAction/InternalCartFormCreateSessionAction.js +5 -2
  348. package/dist/elements/public/CartForm/internal/InternalCartFormCreateSessionAction/InternalCartFormCreateSessionAction.js.map +1 -1
  349. package/dist/elements/public/CollectionPage/CollectionPage.js +7 -1
  350. package/dist/elements/public/CollectionPage/CollectionPage.js.map +1 -1
  351. package/dist/elements/public/CollectionPages/CollectionPages.js +5 -2
  352. package/dist/elements/public/CollectionPages/CollectionPages.js.map +1 -1
  353. package/dist/elements/public/CouponCard/CouponCard.d.ts +2 -0
  354. package/dist/elements/public/CouponCard/CouponCard.js +4 -0
  355. package/dist/elements/public/CouponCard/CouponCard.js.map +1 -1
  356. package/dist/elements/public/CouponCodeCard/CouponCodeCard.d.ts +3 -1
  357. package/dist/elements/public/CouponCodeCard/CouponCodeCard.js +5 -1
  358. package/dist/elements/public/CouponCodeCard/CouponCodeCard.js.map +1 -1
  359. package/dist/elements/public/CouponCodeForm/CouponCodeForm.d.ts +3 -0
  360. package/dist/elements/public/CouponCodeForm/CouponCodeForm.js +7 -0
  361. package/dist/elements/public/CouponCodeForm/CouponCodeForm.js.map +1 -1
  362. package/dist/elements/public/CouponCodesForm/CouponCodesForm.d.ts +2 -0
  363. package/dist/elements/public/CouponCodesForm/CouponCodesForm.js +3 -0
  364. package/dist/elements/public/CouponCodesForm/CouponCodesForm.js.map +1 -1
  365. package/dist/elements/public/CouponDetailCard/CouponDetailCard.d.ts +2 -0
  366. package/dist/elements/public/CouponDetailCard/CouponDetailCard.js +10 -4
  367. package/dist/elements/public/CouponDetailCard/CouponDetailCard.js.map +1 -1
  368. package/dist/elements/public/CouponForm/CouponForm.d.ts +3 -0
  369. package/dist/elements/public/CouponForm/CouponForm.js +11 -0
  370. package/dist/elements/public/CouponForm/CouponForm.js.map +1 -1
  371. package/dist/elements/public/CustomFieldCard/CustomFieldCard.d.ts +2 -0
  372. package/dist/elements/public/CustomFieldCard/CustomFieldCard.js +4 -0
  373. package/dist/elements/public/CustomFieldCard/CustomFieldCard.js.map +1 -1
  374. package/dist/elements/public/CustomFieldForm/CustomFieldForm.d.ts +2 -0
  375. package/dist/elements/public/CustomFieldForm/CustomFieldForm.js +4 -0
  376. package/dist/elements/public/CustomFieldForm/CustomFieldForm.js.map +1 -1
  377. package/dist/elements/public/Customer/Customer.d.ts +2 -0
  378. package/dist/elements/public/Customer/Customer.js +25 -2
  379. package/dist/elements/public/Customer/Customer.js.map +1 -1
  380. package/dist/elements/public/CustomerCard/CustomerCard.d.ts +2 -0
  381. package/dist/elements/public/CustomerCard/CustomerCard.js +4 -0
  382. package/dist/elements/public/CustomerCard/CustomerCard.js.map +1 -1
  383. package/dist/elements/public/CustomerForm/CustomerForm.d.ts +2 -0
  384. package/dist/elements/public/CustomerForm/CustomerForm.js +3 -0
  385. package/dist/elements/public/CustomerForm/CustomerForm.js.map +1 -1
  386. package/dist/elements/public/CustomerPortalSettingsForm/CustomerPortalSettingsForm.d.ts +2 -0
  387. package/dist/elements/public/CustomerPortalSettingsForm/CustomerPortalSettingsForm.js +3 -0
  388. package/dist/elements/public/CustomerPortalSettingsForm/CustomerPortalSettingsForm.js.map +1 -1
  389. package/dist/elements/public/CustomersTable/CustomersTable.d.ts +2 -0
  390. package/dist/elements/public/CustomersTable/CustomersTable.js +3 -0
  391. package/dist/elements/public/CustomersTable/CustomersTable.js.map +1 -1
  392. package/dist/elements/public/DiscountCard/DiscountCard.d.ts +2 -0
  393. package/dist/elements/public/DiscountCard/DiscountCard.js +10 -4
  394. package/dist/elements/public/DiscountCard/DiscountCard.js.map +1 -1
  395. package/dist/elements/public/DiscountDetailCard/DiscountDetailCard.d.ts +2 -0
  396. package/dist/elements/public/DiscountDetailCard/DiscountDetailCard.js +10 -4
  397. package/dist/elements/public/DiscountDetailCard/DiscountDetailCard.js.map +1 -1
  398. package/dist/elements/public/DownloadableCard/DownloadableCard.d.ts +2 -0
  399. package/dist/elements/public/DownloadableCard/DownloadableCard.js +3 -0
  400. package/dist/elements/public/DownloadableCard/DownloadableCard.js.map +1 -1
  401. package/dist/elements/public/DownloadableForm/DownloadableForm.d.ts +3 -0
  402. package/dist/elements/public/DownloadableForm/DownloadableForm.js +9 -0
  403. package/dist/elements/public/DownloadableForm/DownloadableForm.js.map +1 -1
  404. package/dist/elements/public/EmailTemplateCard/EmailTemplateCard.d.ts +2 -0
  405. package/dist/elements/public/EmailTemplateCard/EmailTemplateCard.js +3 -0
  406. package/dist/elements/public/EmailTemplateCard/EmailTemplateCard.js.map +1 -1
  407. package/dist/elements/public/EmailTemplateForm/EmailTemplateForm.d.ts +3 -0
  408. package/dist/elements/public/EmailTemplateForm/EmailTemplateForm.js +9 -0
  409. package/dist/elements/public/EmailTemplateForm/EmailTemplateForm.js.map +1 -1
  410. package/dist/elements/public/EmailTemplateForm/internal/InternalEmailTemplateFormAsyncAction/InternalEmailTemplateFormAsyncAction.js +7 -2
  411. package/dist/elements/public/EmailTemplateForm/internal/InternalEmailTemplateFormAsyncAction/InternalEmailTemplateFormAsyncAction.js.map +1 -1
  412. package/dist/elements/public/ErrorEntryCard/ErrorEntryCard.d.ts +5 -2
  413. package/dist/elements/public/ErrorEntryCard/ErrorEntryCard.js +13 -4
  414. package/dist/elements/public/ErrorEntryCard/ErrorEntryCard.js.map +1 -1
  415. package/dist/elements/public/ErrorEntryCard/ResourceViewer.js +1 -0
  416. package/dist/elements/public/ErrorEntryCard/ResourceViewer.js.map +1 -1
  417. package/dist/elements/public/ExperimentalAddToCartBuilder/ExperimentalAddToCartBuilder.d.ts +3 -0
  418. package/dist/elements/public/ExperimentalAddToCartBuilder/ExperimentalAddToCartBuilder.js +34 -0
  419. package/dist/elements/public/ExperimentalAddToCartBuilder/ExperimentalAddToCartBuilder.js.map +1 -1
  420. package/dist/elements/public/FilterAttributeCard/FilterAttributeCard.d.ts +3 -1
  421. package/dist/elements/public/FilterAttributeCard/FilterAttributeCard.js +5 -1
  422. package/dist/elements/public/FilterAttributeCard/FilterAttributeCard.js.map +1 -1
  423. package/dist/elements/public/FormDialog/FormDialog.js +1 -0
  424. package/dist/elements/public/FormDialog/FormDialog.js.map +1 -1
  425. package/dist/elements/public/GenerateCodesForm/GenerateCodesForm.d.ts +2 -0
  426. package/dist/elements/public/GenerateCodesForm/GenerateCodesForm.js +9 -0
  427. package/dist/elements/public/GenerateCodesForm/GenerateCodesForm.js.map +1 -1
  428. package/dist/elements/public/GiftCardCard/GiftCardCard.d.ts +2 -0
  429. package/dist/elements/public/GiftCardCard/GiftCardCard.js +4 -0
  430. package/dist/elements/public/GiftCardCard/GiftCardCard.js.map +1 -1
  431. package/dist/elements/public/GiftCardCodeCard/GiftCardCodeCard.d.ts +4 -1
  432. package/dist/elements/public/GiftCardCodeCard/GiftCardCodeCard.js +13 -3
  433. package/dist/elements/public/GiftCardCodeCard/GiftCardCodeCard.js.map +1 -1
  434. package/dist/elements/public/GiftCardCodeForm/GiftCardCodeForm.d.ts +3 -0
  435. package/dist/elements/public/GiftCardCodeForm/GiftCardCodeForm.js +10 -0
  436. package/dist/elements/public/GiftCardCodeForm/GiftCardCodeForm.js.map +1 -1
  437. package/dist/elements/public/GiftCardCodeLogCard/GiftCardCodeLogCard.d.ts +2 -1
  438. package/dist/elements/public/GiftCardCodeLogCard/GiftCardCodeLogCard.js +10 -3
  439. package/dist/elements/public/GiftCardCodeLogCard/GiftCardCodeLogCard.js.map +1 -1
  440. package/dist/elements/public/GiftCardCodesForm/GiftCardCodesForm.d.ts +2 -0
  441. package/dist/elements/public/GiftCardCodesForm/GiftCardCodesForm.js +3 -0
  442. package/dist/elements/public/GiftCardCodesForm/GiftCardCodesForm.js.map +1 -1
  443. package/dist/elements/public/GiftCardForm/GiftCardForm.d.ts +3 -0
  444. package/dist/elements/public/GiftCardForm/GiftCardForm.js +10 -0
  445. package/dist/elements/public/GiftCardForm/GiftCardForm.js.map +1 -1
  446. package/dist/elements/public/I18nEditor/I18nEditor.js +1 -0
  447. package/dist/elements/public/I18nEditor/I18nEditor.js.map +1 -1
  448. package/dist/elements/public/I18nEditor/internal/InternalI18nEditorEntry/InternalI18nEditorEntry.js +1 -1
  449. package/dist/elements/public/I18nEditor/internal/InternalI18nEditorEntry/InternalI18nEditorEntry.js.map +1 -1
  450. package/dist/elements/public/IntegrationCard/IntegrationCard.d.ts +3 -1
  451. package/dist/elements/public/IntegrationCard/IntegrationCard.js +5 -1
  452. package/dist/elements/public/IntegrationCard/IntegrationCard.js.map +1 -1
  453. package/dist/elements/public/IntegrationForm/IntegrationForm.d.ts +2 -0
  454. package/dist/elements/public/IntegrationForm/IntegrationForm.js +9 -6
  455. package/dist/elements/public/IntegrationForm/IntegrationForm.js.map +1 -1
  456. package/dist/elements/public/ItemCard/ItemCard.d.ts +4 -0
  457. package/dist/elements/public/ItemCard/ItemCard.js +26 -7
  458. package/dist/elements/public/ItemCard/ItemCard.js.map +1 -1
  459. package/dist/elements/public/ItemCategoryCard/ItemCategoryCard.d.ts +2 -0
  460. package/dist/elements/public/ItemCategoryCard/ItemCategoryCard.js +3 -0
  461. package/dist/elements/public/ItemCategoryCard/ItemCategoryCard.js.map +1 -1
  462. package/dist/elements/public/ItemCategoryForm/ItemCategoryForm.d.ts +2 -0
  463. package/dist/elements/public/ItemCategoryForm/ItemCategoryForm.js +14 -0
  464. package/dist/elements/public/ItemCategoryForm/ItemCategoryForm.js.map +1 -1
  465. package/dist/elements/public/ItemForm/ItemForm.d.ts +3 -0
  466. package/dist/elements/public/ItemForm/ItemForm.js +26 -9
  467. package/dist/elements/public/ItemForm/ItemForm.js.map +1 -1
  468. package/dist/elements/public/ItemOptionCard/ItemOptionCard.d.ts +2 -0
  469. package/dist/elements/public/ItemOptionCard/ItemOptionCard.js +21 -7
  470. package/dist/elements/public/ItemOptionCard/ItemOptionCard.js.map +1 -1
  471. package/dist/elements/public/ItemOptionForm/ItemOptionForm.d.ts +2 -0
  472. package/dist/elements/public/ItemOptionForm/ItemOptionForm.js +4 -0
  473. package/dist/elements/public/ItemOptionForm/ItemOptionForm.js.map +1 -1
  474. package/dist/elements/public/NativeIntegrationCard/NativeIntegrationCard.d.ts +3 -1
  475. package/dist/elements/public/NativeIntegrationCard/NativeIntegrationCard.js +7 -1
  476. package/dist/elements/public/NativeIntegrationCard/NativeIntegrationCard.js.map +1 -1
  477. package/dist/elements/public/NativeIntegrationForm/NativeIntegrationForm.d.ts +3 -0
  478. package/dist/elements/public/NativeIntegrationForm/NativeIntegrationForm.js +19 -0
  479. package/dist/elements/public/NativeIntegrationForm/NativeIntegrationForm.js.map +1 -1
  480. package/dist/elements/public/NucleonElement/NucleonElement.d.ts +9 -0
  481. package/dist/elements/public/NucleonElement/NucleonElement.js +27 -1
  482. package/dist/elements/public/NucleonElement/NucleonElement.js.map +1 -1
  483. package/dist/elements/public/PasskeyCard/PasskeyCard.d.ts +2 -0
  484. package/dist/elements/public/PasskeyCard/PasskeyCard.js +3 -0
  485. package/dist/elements/public/PasskeyCard/PasskeyCard.js.map +1 -1
  486. package/dist/elements/public/PasskeyForm/PasskeyForm.d.ts +2 -0
  487. package/dist/elements/public/PasskeyForm/PasskeyForm.js +3 -0
  488. package/dist/elements/public/PasskeyForm/PasskeyForm.js.map +1 -1
  489. package/dist/elements/public/PaymentCard/PaymentCard.d.ts +2 -1
  490. package/dist/elements/public/PaymentCard/PaymentCard.js +11 -2
  491. package/dist/elements/public/PaymentCard/PaymentCard.js.map +1 -1
  492. package/dist/elements/public/PaymentMethodCard/PaymentMethodCard.d.ts +3 -0
  493. package/dist/elements/public/PaymentMethodCard/PaymentMethodCard.js +14 -2
  494. package/dist/elements/public/PaymentMethodCard/PaymentMethodCard.js.map +1 -1
  495. package/dist/elements/public/PaymentsApi/api/handlers/available_fraud_protections.js +2 -2
  496. package/dist/elements/public/PaymentsApi/api/handlers/available_fraud_protections.js.map +1 -1
  497. package/dist/elements/public/PaymentsApi/api/handlers/available_payment_methods.js +2 -2
  498. package/dist/elements/public/PaymentsApi/api/handlers/available_payment_methods.js.map +1 -1
  499. package/dist/elements/public/PaymentsApi/api/handlers/fraud_protection.js +2 -2
  500. package/dist/elements/public/PaymentsApi/api/handlers/fraud_protection.js.map +1 -1
  501. package/dist/elements/public/PaymentsApi/api/handlers/fraud_protections.js +2 -2
  502. package/dist/elements/public/PaymentsApi/api/handlers/fraud_protections.js.map +1 -1
  503. package/dist/elements/public/PaymentsApi/api/handlers/payment_method.js +2 -2
  504. package/dist/elements/public/PaymentsApi/api/handlers/payment_method.js.map +1 -1
  505. package/dist/elements/public/PaymentsApi/api/handlers/payment_methods.js +2 -2
  506. package/dist/elements/public/PaymentsApi/api/handlers/payment_methods.js.map +1 -1
  507. package/dist/elements/public/PaymentsApi/api/handlers/payment_preset.js +2 -2
  508. package/dist/elements/public/PaymentsApi/api/handlers/payment_preset.js.map +1 -1
  509. package/dist/elements/public/PaymentsApi/api/handlers/payment_presets.js +2 -2
  510. package/dist/elements/public/PaymentsApi/api/handlers/payment_presets.js.map +1 -1
  511. package/dist/elements/public/PaymentsApi/api/utils.d.ts +5 -0
  512. package/dist/elements/public/PaymentsApi/api/utils.js +8 -1
  513. package/dist/elements/public/PaymentsApi/api/utils.js.map +1 -1
  514. package/dist/elements/public/PaymentsApiFraudProtectionCard/PaymentsApiFraudProtectionCard.d.ts +2 -0
  515. package/dist/elements/public/PaymentsApiFraudProtectionCard/PaymentsApiFraudProtectionCard.js +3 -0
  516. package/dist/elements/public/PaymentsApiFraudProtectionCard/PaymentsApiFraudProtectionCard.js.map +1 -1
  517. package/dist/elements/public/PaymentsApiFraudProtectionForm/PaymentsApiFraudProtectionForm.d.ts +2 -0
  518. package/dist/elements/public/PaymentsApiFraudProtectionForm/PaymentsApiFraudProtectionForm.js +8 -1
  519. package/dist/elements/public/PaymentsApiFraudProtectionForm/PaymentsApiFraudProtectionForm.js.map +1 -1
  520. package/dist/elements/public/PaymentsApiPaymentMethodCard/PaymentsApiPaymentMethodCard.d.ts +3 -1
  521. package/dist/elements/public/PaymentsApiPaymentMethodCard/PaymentsApiPaymentMethodCard.js +5 -1
  522. package/dist/elements/public/PaymentsApiPaymentMethodCard/PaymentsApiPaymentMethodCard.js.map +1 -1
  523. package/dist/elements/public/PaymentsApiPaymentMethodForm/PaymentsApiPaymentMethodForm.d.ts +2 -0
  524. package/dist/elements/public/PaymentsApiPaymentMethodForm/PaymentsApiPaymentMethodForm.js +14 -3
  525. package/dist/elements/public/PaymentsApiPaymentMethodForm/PaymentsApiPaymentMethodForm.js.map +1 -1
  526. package/dist/elements/public/PaymentsApiPaymentPresetCard/PaymentsApiPaymentPresetCard.d.ts +2 -0
  527. package/dist/elements/public/PaymentsApiPaymentPresetCard/PaymentsApiPaymentPresetCard.js +3 -0
  528. package/dist/elements/public/PaymentsApiPaymentPresetCard/PaymentsApiPaymentPresetCard.js.map +1 -1
  529. package/dist/elements/public/PaymentsApiPaymentPresetForm/PaymentsApiPaymentPresetForm.d.ts +3 -0
  530. package/dist/elements/public/PaymentsApiPaymentPresetForm/PaymentsApiPaymentPresetForm.js +22 -15
  531. package/dist/elements/public/PaymentsApiPaymentPresetForm/PaymentsApiPaymentPresetForm.js.map +1 -1
  532. package/dist/elements/public/ReportForm/ReportForm.d.ts +2 -0
  533. package/dist/elements/public/ReportForm/ReportForm.js +3 -0
  534. package/dist/elements/public/ReportForm/ReportForm.js.map +1 -1
  535. package/dist/elements/public/ReportsTable/ReportsTable.d.ts +2 -0
  536. package/dist/elements/public/ReportsTable/ReportsTable.js +3 -0
  537. package/dist/elements/public/ReportsTable/ReportsTable.js.map +1 -1
  538. package/dist/elements/public/ShipmentCard/ShipmentCard.d.ts +2 -1
  539. package/dist/elements/public/ShipmentCard/ShipmentCard.js +11 -2
  540. package/dist/elements/public/ShipmentCard/ShipmentCard.js.map +1 -1
  541. package/dist/elements/public/ShippingMethodCard/ShippingMethodCard.d.ts +2 -1
  542. package/dist/elements/public/ShippingMethodCard/ShippingMethodCard.js +21 -5
  543. package/dist/elements/public/ShippingMethodCard/ShippingMethodCard.js.map +1 -1
  544. package/dist/elements/public/Spinner/Spinner.d.ts +12 -0
  545. package/dist/elements/public/Spinner/Spinner.js +18 -2
  546. package/dist/elements/public/Spinner/Spinner.js.map +1 -1
  547. package/dist/elements/public/StoreCard/StoreCard.d.ts +2 -0
  548. package/dist/elements/public/StoreCard/StoreCard.js +3 -0
  549. package/dist/elements/public/StoreCard/StoreCard.js.map +1 -1
  550. package/dist/elements/public/StoreForm/StoreForm.d.ts +2 -0
  551. package/dist/elements/public/StoreForm/StoreForm.js +7 -1
  552. package/dist/elements/public/StoreForm/StoreForm.js.map +1 -1
  553. package/dist/elements/public/StoreShippingMethodForm/StoreShippingMethodForm.d.ts +2 -0
  554. package/dist/elements/public/StoreShippingMethodForm/StoreShippingMethodForm.js +4 -0
  555. package/dist/elements/public/StoreShippingMethodForm/StoreShippingMethodForm.js.map +1 -1
  556. package/dist/elements/public/StoreTransactionFolderForm/StoreTransactionFolderForm.d.ts +2 -0
  557. package/dist/elements/public/StoreTransactionFolderForm/StoreTransactionFolderForm.js +3 -0
  558. package/dist/elements/public/StoreTransactionFolderForm/StoreTransactionFolderForm.js.map +1 -1
  559. package/dist/elements/public/SubscriptionCard/SubscriptionCard.d.ts +2 -0
  560. package/dist/elements/public/SubscriptionCard/SubscriptionCard.js +4 -0
  561. package/dist/elements/public/SubscriptionCard/SubscriptionCard.js.map +1 -1
  562. package/dist/elements/public/SubscriptionForm/SubscriptionForm.d.ts +2 -0
  563. package/dist/elements/public/SubscriptionForm/SubscriptionForm.js +15 -0
  564. package/dist/elements/public/SubscriptionForm/SubscriptionForm.js.map +1 -1
  565. package/dist/elements/public/SubscriptionSettingsForm/SubscriptionSettingsForm.d.ts +2 -0
  566. package/dist/elements/public/SubscriptionSettingsForm/SubscriptionSettingsForm.js +3 -0
  567. package/dist/elements/public/SubscriptionSettingsForm/SubscriptionSettingsForm.js.map +1 -1
  568. package/dist/elements/public/SubscriptionsTable/SubscriptionsTable.d.ts +2 -0
  569. package/dist/elements/public/SubscriptionsTable/SubscriptionsTable.js +12 -2
  570. package/dist/elements/public/SubscriptionsTable/SubscriptionsTable.js.map +1 -1
  571. package/dist/elements/public/Table/Table.js +1 -0
  572. package/dist/elements/public/Table/Table.js.map +1 -1
  573. package/dist/elements/public/TaxCard/TaxCard.d.ts +3 -1
  574. package/dist/elements/public/TaxCard/TaxCard.js +5 -1
  575. package/dist/elements/public/TaxCard/TaxCard.js.map +1 -1
  576. package/dist/elements/public/TaxForm/TaxForm.d.ts +3 -0
  577. package/dist/elements/public/TaxForm/TaxForm.js +7 -0
  578. package/dist/elements/public/TaxForm/TaxForm.js.map +1 -1
  579. package/dist/elements/public/TemplateConfigForm/TemplateConfigForm.d.ts +2 -0
  580. package/dist/elements/public/TemplateConfigForm/TemplateConfigForm.js +7 -1
  581. package/dist/elements/public/TemplateConfigForm/TemplateConfigForm.js.map +1 -1
  582. package/dist/elements/public/TemplateForm/TemplateForm.d.ts +3 -0
  583. package/dist/elements/public/TemplateForm/TemplateForm.js +6 -0
  584. package/dist/elements/public/TemplateForm/TemplateForm.js.map +1 -1
  585. package/dist/elements/public/TemplateForm/internal/InternalTemplateFormAsyncAction/InternalTemplateFormAsyncAction.js +7 -2
  586. package/dist/elements/public/TemplateForm/internal/InternalTemplateFormAsyncAction/InternalTemplateFormAsyncAction.js.map +1 -1
  587. package/dist/elements/public/TemplateSetCard/TemplateSetCard.d.ts +2 -0
  588. package/dist/elements/public/TemplateSetCard/TemplateSetCard.js +3 -0
  589. package/dist/elements/public/TemplateSetCard/TemplateSetCard.js.map +1 -1
  590. package/dist/elements/public/TemplateSetForm/TemplateSetForm.d.ts +3 -0
  591. package/dist/elements/public/TemplateSetForm/TemplateSetForm.js +6 -0
  592. package/dist/elements/public/TemplateSetForm/TemplateSetForm.js.map +1 -1
  593. package/dist/elements/public/Transaction/Transaction.d.ts +8 -0
  594. package/dist/elements/public/Transaction/Transaction.js +87 -40
  595. package/dist/elements/public/Transaction/Transaction.js.map +1 -1
  596. package/dist/elements/public/Transaction/internal/InternalTransactionActionsControl/InternalTransactionActionsControl.js +8 -3
  597. package/dist/elements/public/Transaction/internal/InternalTransactionActionsControl/InternalTransactionActionsControl.js.map +1 -1
  598. package/dist/elements/public/TransactionCard/TransactionCard.d.ts +2 -0
  599. package/dist/elements/public/TransactionCard/TransactionCard.js +7 -2
  600. package/dist/elements/public/TransactionCard/TransactionCard.js.map +1 -1
  601. package/dist/elements/public/TransactionsTable/TransactionsTable.d.ts +2 -0
  602. package/dist/elements/public/TransactionsTable/TransactionsTable.js +3 -0
  603. package/dist/elements/public/TransactionsTable/TransactionsTable.js.map +1 -1
  604. package/dist/elements/public/UpdatePaymentMethodForm/UpdatePaymentMethodForm.d.ts +3 -0
  605. package/dist/elements/public/UpdatePaymentMethodForm/UpdatePaymentMethodForm.js +12 -0
  606. package/dist/elements/public/UpdatePaymentMethodForm/UpdatePaymentMethodForm.js.map +1 -1
  607. package/dist/elements/public/UserCard/UserCard.d.ts +2 -0
  608. package/dist/elements/public/UserCard/UserCard.js +3 -0
  609. package/dist/elements/public/UserCard/UserCard.js.map +1 -1
  610. package/dist/elements/public/UserForm/UserForm.d.ts +2 -0
  611. package/dist/elements/public/UserForm/UserForm.js +3 -0
  612. package/dist/elements/public/UserForm/UserForm.js.map +1 -1
  613. package/dist/elements/public/UserInvitationCard/UserInvitationCard.d.ts +8 -0
  614. package/dist/elements/public/UserInvitationCard/UserInvitationCard.js +63 -1
  615. package/dist/elements/public/UserInvitationCard/UserInvitationCard.js.map +1 -1
  616. package/dist/elements/public/UserInvitationCard/types.d.ts +3 -1
  617. package/dist/elements/public/UserInvitationCard/types.js.map +1 -1
  618. package/dist/elements/public/UserInvitationForm/UserInvitationForm.d.ts +36 -1
  619. package/dist/elements/public/UserInvitationForm/UserInvitationForm.js +149 -25
  620. package/dist/elements/public/UserInvitationForm/UserInvitationForm.js.map +1 -1
  621. package/dist/elements/public/UserInvitationForm/index.d.ts +1 -0
  622. package/dist/elements/public/UserInvitationForm/index.js +1 -0
  623. package/dist/elements/public/UserInvitationForm/index.js.map +1 -1
  624. package/dist/elements/public/UserInvitationForm/internal/InternalUserInvitationFormAsyncAction/InternalUserInvitationFormAsyncAction.js +3 -2
  625. package/dist/elements/public/UserInvitationForm/internal/InternalUserInvitationFormAsyncAction/InternalUserInvitationFormAsyncAction.js.map +1 -1
  626. package/dist/elements/public/UserInvitationForm/internal/InternalUserInvitationFormScopeControl/InternalUserInvitationFormScopeControl.d.ts +101 -0
  627. package/dist/elements/public/UserInvitationForm/internal/InternalUserInvitationFormScopeControl/InternalUserInvitationFormScopeControl.js +373 -0
  628. package/dist/elements/public/UserInvitationForm/internal/InternalUserInvitationFormScopeControl/InternalUserInvitationFormScopeControl.js.map +1 -0
  629. package/dist/elements/public/UserInvitationForm/internal/InternalUserInvitationFormScopeControl/index.d.ts +6 -0
  630. package/dist/elements/public/UserInvitationForm/internal/InternalUserInvitationFormScopeControl/index.js +8 -0
  631. package/dist/elements/public/UserInvitationForm/internal/InternalUserInvitationFormScopeControl/index.js.map +1 -0
  632. package/dist/elements/public/UserInvitationForm/types.d.ts +3 -1
  633. package/dist/elements/public/UserInvitationForm/types.js.map +1 -1
  634. package/dist/elements/public/UsersTable/UsersTable.js +1 -0
  635. package/dist/elements/public/UsersTable/UsersTable.js.map +1 -1
  636. package/dist/elements/public/WebhookCard/WebhookCard.d.ts +4 -1
  637. package/dist/elements/public/WebhookCard/WebhookCard.js +27 -11
  638. package/dist/elements/public/WebhookCard/WebhookCard.js.map +1 -1
  639. package/dist/elements/public/WebhookForm/WebhookForm.d.ts +2 -0
  640. package/dist/elements/public/WebhookForm/WebhookForm.js +4 -0
  641. package/dist/elements/public/WebhookForm/WebhookForm.js.map +1 -1
  642. package/dist/elements/public/WebhookLogCard/WebhookLogCard.d.ts +3 -1
  643. package/dist/elements/public/WebhookLogCard/WebhookLogCard.js +5 -1
  644. package/dist/elements/public/WebhookLogCard/WebhookLogCard.js.map +1 -1
  645. package/dist/elements/public/WebhookStatusCard/WebhookStatusCard.d.ts +3 -1
  646. package/dist/elements/public/WebhookStatusCard/WebhookStatusCard.js +5 -1
  647. package/dist/elements/public/WebhookStatusCard/WebhookStatusCard.js.map +1 -1
  648. package/dist/mixins/configurable.d.ts +14 -0
  649. package/dist/mixins/configurable.js +72 -2
  650. package/dist/mixins/configurable.js.map +1 -1
  651. package/dist/mixins/themeable.js +6 -0
  652. package/dist/mixins/themeable.js.map +1 -1
  653. package/dist/utils/group-invitation-scopes.d.ts +38 -0
  654. package/dist/utils/group-invitation-scopes.js +70 -0
  655. package/dist/utils/group-invitation-scopes.js.map +1 -0
  656. package/dist/utils/ignore-access-denied.d.ts +8 -0
  657. package/dist/utils/ignore-access-denied.js +19 -0
  658. package/dist/utils/ignore-access-denied.js.map +1 -0
  659. package/dist/utils/invitation-scope.d.ts +46 -0
  660. package/dist/utils/invitation-scope.js +119 -0
  661. package/dist/utils/invitation-scope.js.map +1 -0
  662. package/dist/utils/is-access-denied.d.ts +12 -0
  663. package/dist/utils/is-access-denied.js +37 -0
  664. package/dist/utils/is-access-denied.js.map +1 -0
  665. package/dist/utils/item-scope-collection.d.ts +22 -0
  666. package/dist/utils/item-scope-collection.js +38 -0
  667. package/dist/utils/item-scope-collection.js.map +1 -0
  668. package/dist/utils/native-integration-scope-collection.d.ts +6 -0
  669. package/dist/utils/native-integration-scope-collection.js +20 -0
  670. package/dist/utils/native-integration-scope-collection.js.map +1 -0
  671. package/dist/utils/user-scope.d.ts +40 -0
  672. package/dist/utils/user-scope.js +112 -0
  673. package/dist/utils/user-scope.js.map +1 -0
  674. package/package.json +1 -1
  675. package/dist/cdn/shared-23baaa34.js +0 -1
  676. package/dist/cdn/shared-276618b9.js +0 -1
  677. package/dist/cdn/shared-2e56ae76.js +0 -1
  678. package/dist/cdn/shared-37fe7ec4.js +0 -1
  679. package/dist/cdn/shared-41c9c53f.js +0 -1
  680. package/dist/cdn/shared-49e95410.js +0 -1
  681. package/dist/cdn/shared-4b3bdf49.js +0 -1
  682. package/dist/cdn/shared-b4816a44.js +0 -1
  683. package/dist/cdn/shared-c6c81c1b.js +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"configurable.js","sourceRoot":"","sources":["../../src/mixins/configurable.ts"],"names":[],"mappings":"AAAA,sEAAsE;AAEtE,OAAO,EAAiE,IAAI,EAAE,MAAM,aAAa,CAAC;AAElG,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAgI3D,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAC/B,WAAkB,EAC0B,EAAE;IAC9C,OAAO,MAAM,mBAAoB,SAAQ,WAAW;QAA7C;;YAmDL,cAAS,GAAG,EAA4C,CAAC;YAEzD,SAAI,GAAiC,YAAY,CAAC;YAElD,aAAQ,GAAG,KAAK,CAAC;YAEjB,qBAAgB,GAAoB,eAAe,CAAC,KAAK,CAAC;YAE1D,aAAQ,GAAG,KAAK,CAAC;YA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,CAAC;YAEH,IAAI,CAAC,YAAY,EAAE,CAAC;QACtB,CAAC;QAEO,YAAY;YAClB,MAAM,MAAM,GAAyB;gBACnC,aAAa,EAAE,IAAI;gBACnB,UAAU,EAAE,IAAI;gBAChB,SAAS,EAAE,IAAI;gBACf,OAAO,EAAE,IAAI;aACd,CAAC;YAEF,IAAI,CAAC,UAAU,CAAC,UAAU,EAAE,CAAC;YAC7B,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;YAEtC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;gBACxC,IAAI,KAAK,CAAC,SAAS,KAAK,UAAU,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,MAAM,CAAC;oBAAE,OAAO;gBAC1E,IAAI,CAAC,UAAU,CAAC,OAAO,CAAE,KAA6B,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;YAC1E,CAAC,CAAC,CAAC;YAEH,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC;QAC9B,CAAC;KACF,CAAC;AACJ,CAAC,CAAC","sourcesContent":["/* eslint-disable @typescript-eslint/explicit-module-boundary-types */\n\nimport { Constructor, LitElement, PropertyDeclarations, TemplateResult, html } from 'lit-element';\n\nimport { BooleanSelector } from '@foxy.io/sdk/core';\nimport { ifDefined } from 'lit-html/directives/if-defined';\nimport { InferrableMixinHost } from './inferrable';\n\nexport declare class ConfigurableMixinHost {\n /** Template render functions mapped to their name. */\n templates: Partial<Record<string, Renderer<any>>>;\n\n /**\n * Toggles additional functionality for developers on and off. In particular,\n * setting this property (or attribute with the same name) to \"development\" will\n * start tracking changes in templates, allowing developers to edit HTML in the browser\n * and see results without having to refresh the page every time.\n */\n mode: 'development' | 'production';\n\n /**\n * If true, makes every editable control inside of this element read-only.\n * This property is reflected to the `readonly` boolean attribute.\n *\n * @since 1.4.0\n */\n readonly: boolean;\n\n /**\n * [BooleanSelector](https://sdk.foxy.dev/classes/_core_index_.booleanselector.html) selecting\n * controls to render as read-only. Parsed version of the `readonlycontrols` attribute value.\n *\n * @type {BooleanSelector}\n * @since 1.4.0\n * @default BooleanSelector.False\n */\n readonlyControls: BooleanSelector;\n\n /**\n * If true, disables every interactive control inside of this element.\n * This property is reflected to the `disabled` boolean attribute.\n *\n * @since 1.4.0\n */\n disabled: boolean;\n\n /**\n * [BooleanSelector](https://sdk.foxy.dev/classes/_core_index_.booleanselector.html) selecting\n * controls to render as disabled. Parsed version of the `disabledcontrols` attribute value.\n *\n * @type {BooleanSelector}\n * @since 1.4.0\n * @default BooleanSelector.False\n */\n disabledControls: BooleanSelector;\n\n /**\n * If true, hides every configurable control inside of this element.\n * This property is reflected to the `hidden` boolean attribute.\n *\n * @since 1.4.0\n */\n hidden: boolean;\n\n /**\n * [BooleanSelector](https://sdk.foxy.dev/classes/_core_index_.booleanselector.html) selecting\n * controls to hide. Parsed version of the `hiddencontrols` attribute value.\n *\n * @type {BooleanSelector}\n * @since 1.4.0\n * @default BooleanSelector.False\n */\n hiddenControls: BooleanSelector;\n\n /**\n * Combined [BooleanSelector](https://sdk.foxy.dev/classes/_core_index_.booleanselector.html) for `readonlyControls`\n * and `readonly` properties. If `readonly` is true, this selector will match any control,\n * otherwise it will match the same controls as in `readonlyControls`.\n *\n * @since 1.4.0\n */\n get readonlySelector(): BooleanSelector;\n\n /**\n * Combined [BooleanSelector](https://sdk.foxy.dev/classes/_core_index_.booleanselector.html) for `disabledControls`\n * and `disabled` properties. If `disabled` is true, this selector will match any control,\n * otherwise it will match the same controls as in `disabledControls`.\n *\n * @since 1.4.0\n */\n get disabledSelector(): BooleanSelector;\n\n /**\n * Combined [BooleanSelector](https://sdk.foxy.dev/classes/_core_index_.booleanselector.html) for `hiddenControls`\n * and `hidden` properties. If `hidden` is true, this selector will match any control,\n * otherwise it will match the same controls as in `hiddenControls`.\n *\n * @since 1.4.0\n */\n get hiddenSelector(): BooleanSelector;\n\n /**\n * Looks for templates in element's children and compiles them to render functions.\n *\n * @param replace If true, all existing templates will be removed.\n */\n compileTemplates(replace?: boolean): void;\n\n /**\n * Renders a template with the given name if available and a slot otherwise.\n * For empty name looks for a \"default\" template first and renders it if found – otherwise renders a default slot.\n *\n * @param name Name of the template/slot to render.\n * @param context Context to provide template renderer with.\n */\n renderTemplateOrSlot(name?: string, context?: any): void;\n\n /**\n * Zooms into templates with complex names. For example, zooming on `customer` in `customer:header:before`\n * will return `header:before`.\n *\n * @param id Name to zoom on.\n */\n getNestedTemplates<T extends Partial<Record<string, Renderer<any>>>>(id: string): T;\n}\n\ntype Base = Constructor<InferrableMixinHost> &\n Constructor<LitElement> & { properties?: PropertyDeclarations; inferredProperties: string[] };\n\ntype TemplateFunction = typeof html;\n\nexport type Renderer<THost> = (html: TemplateFunction, host: THost) => TemplateResult;\n\nexport const ConfigurableMixin = <TBase extends Base>(\n BaseElement: TBase\n): TBase & Constructor<ConfigurableMixinHost> => {\n return class ConfigurableElement extends BaseElement {\n static get inferredProperties(): string[] {\n return [\n ...super.inferredProperties,\n 'disabledSelector',\n 'readonlySelector',\n 'hiddenSelector',\n 'templates',\n 'disabled',\n 'readonly',\n 'hidden',\n 'mode',\n ];\n }\n\n static get properties(): PropertyDeclarations {\n return {\n ...super.properties,\n\n templates: { attribute: false },\n mode: { type: String },\n\n readonly: { type: Boolean, reflect: true },\n readonlyControls: {\n attribute: 'readonlycontrols',\n converter: { fromAttribute: value => new BooleanSelector(value ?? '') },\n hasChanged: (value: BooleanSelector, newValue?: BooleanSelector) => {\n return value.toString() !== newValue?.toString();\n },\n },\n\n disabled: { type: Boolean, reflect: true },\n disabledControls: {\n attribute: 'disabledcontrols',\n converter: { fromAttribute: value => new BooleanSelector(value ?? '') },\n hasChanged: (value: BooleanSelector, newValue?: BooleanSelector) => {\n return value.toString() !== newValue?.toString();\n },\n },\n\n hidden: { type: Boolean, reflect: true },\n hiddenControls: {\n attribute: 'hiddencontrols',\n converter: { fromAttribute: value => new BooleanSelector(value ?? '') },\n hasChanged: (value: BooleanSelector, newValue?: BooleanSelector) => {\n return value.toString() !== newValue?.toString();\n },\n },\n };\n }\n\n templates = {} as Partial<Record<string, Renderer<any>>>;\n\n mode: 'development' | 'production' = 'production';\n\n readonly = false;\n\n readonlyControls: BooleanSelector = BooleanSelector.False;\n\n disabled = false;\n\n disabledControls: BooleanSelector = BooleanSelector.False;\n\n hidden = false;\n\n hiddenControls: BooleanSelector = BooleanSelector.False;\n\n private readonly __observer = new MutationObserver(() => this.__onMutation());\n\n get readonlySelector(): BooleanSelector {\n return this.readonly ? BooleanSelector.True : this.readonlyControls;\n }\n\n get disabledSelector(): BooleanSelector {\n return this.disabled ? BooleanSelector.True : this.disabledControls;\n }\n\n get hiddenSelector(): BooleanSelector {\n return this.hidden ? BooleanSelector.True : this.hiddenControls;\n }\n\n connectedCallback(): void {\n super.connectedCallback();\n if (this.mode === 'development') this.__observe();\n }\n\n disconnectedCallback(): void {\n super.disconnectedCallback();\n this.__observer.disconnect();\n }\n\n protected firstUpdated(...args: Parameters<LitElement['firstUpdated']>): void {\n super.firstUpdated(...args);\n if (this.mode === 'production') this.compileTemplates();\n }\n\n protected updated(changes: Map<keyof this, unknown>): void {\n super.updated(changes);\n\n this.style.display = this.hidden ? 'none' : '';\n\n if (changes.has('mode')) {\n this.__observer.disconnect();\n if (this.mode === 'development') this.__observe();\n }\n }\n\n compileTemplates(replace = false): void {\n const templates = replace ? {} : { ...this.templates };\n\n Array.from(this.children).forEach(child => {\n if (child.localName !== 'template') return;\n const slot = child.getAttribute('slot') ?? 'default';\n\n try {\n const script = `return html\\`${child.innerHTML}\\``;\n templates[slot] = new Function('html', 'host', script) as () => TemplateResult;\n } catch (err) {\n console.error(err);\n }\n });\n\n this.templates = templates;\n }\n\n renderTemplateOrSlot(name?: string, context?: any) {\n const templateName = name ?? 'default';\n const template = this.templates[templateName];\n\n if (!template) return html`<slot name=${ifDefined(name)}></slot>`;\n\n const renderer = () => {\n try {\n const target = {} as unknown as this;\n const resolvedContext = context ?? this;\n const proxy = new Proxy(target, { get: (_, key) => resolvedContext[key] });\n\n return template?.(html, proxy);\n } catch (err) {\n console.error(err);\n }\n };\n\n return html`\n <foxy-internal-sandbox data-testid=${templateName} .render=${renderer}>\n </foxy-internal-sandbox>\n `;\n }\n\n getNestedTemplates<T extends Partial<Record<string, Renderer<any>>>>(id: string): T {\n const nestedTemplates = {} as T;\n\n Object.entries(this.templates).forEach(([key, value]) => {\n if (key.startsWith(`${id}:`)) {\n const zoomedKey = key.replace(`${id}:`, '');\n nestedTemplates[zoomedKey as keyof T] = value as T[keyof T];\n }\n });\n\n return nestedTemplates;\n }\n\n applyInferredProperties(context: Map<string, unknown>): void {\n super.applyInferredProperties(context);\n\n type Templates = ConfigurableMixinHost['templates'];\n type Mode = ConfigurableMixinHost['mode'];\n\n if (this.infer === null) return;\n\n const disabledSelector = context.get('disabledSelector') as BooleanSelector | undefined;\n const disabled = context.get('disabled') as boolean | undefined;\n\n const readonlySelector = context.get('readonlySelector') as BooleanSelector | undefined;\n const readonly = context.get('readonly') as boolean | undefined;\n\n const hiddenSelector = context.get('hiddenSelector') as BooleanSelector | undefined;\n const hidden = context.get('hidden') as boolean | undefined;\n\n const templates = context.get('templates') as Templates | undefined;\n const mode = context.get('mode') as Mode | undefined;\n\n const trueAsString = BooleanSelector.True.toString();\n const simplify = (selector: BooleanSelector, fallback?: boolean) => {\n return selector.toString() === trueAsString || (fallback ?? false);\n };\n\n const zoomIfNested = (selector?: BooleanSelector) => {\n return (this.infer ? selector?.zoom(this.infer) : selector) ?? BooleanSelector.False;\n };\n\n this.disabledControls = zoomIfNested(disabledSelector);\n this.disabled = simplify(this.disabledControls, disabled);\n\n this.readonlyControls = zoomIfNested(readonlySelector);\n this.readonly = simplify(this.readonlyControls, readonly);\n\n this.hiddenControls = zoomIfNested(hiddenSelector);\n this.hidden = simplify(this.hiddenControls, hidden);\n\n this.templates = templates ?? {};\n if (this.infer) this.templates = this.getNestedTemplates(this.infer);\n\n this.mode = mode ?? 'production';\n }\n\n private __observe() {\n this.__observer.observe(this, {\n characterData: true,\n attributes: true,\n childList: true,\n subtree: true,\n });\n\n this.__onMutation();\n }\n\n private __onMutation() {\n const config: MutationObserverInit = {\n characterData: true,\n attributes: true,\n childList: true,\n subtree: true,\n };\n\n this.__observer.disconnect();\n this.__observer.observe(this, config);\n\n Array.from(this.children).forEach(child => {\n if (child.localName !== 'template' || !child.hasAttribute('slot')) return;\n this.__observer.observe((child as HTMLTemplateElement).content, config);\n });\n\n this.compileTemplates(true);\n }\n };\n};\n"]}
1
+ {"version":3,"file":"configurable.js","sourceRoot":"","sources":["../../src/mixins/configurable.ts"],"names":[],"mappings":"AAAA,sEAAsE;AAEtE,OAAO,EAAiE,IAAI,EAAE,MAAM,aAAa,CAAC;AAElG,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAE3D,OAAO,EAA8B,iBAAiB,EAAE,cAAc,EAAE,+BAA4B;AA+IpG,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAC/B,WAAkB,EAC0B,EAAE;IAC9C,OAAO,MAAM,mBAAoB,SAAQ,WAAW;QAA7C;;YAqDL,cAAS,GAAG,EAA4C,CAAC;YAEzD,SAAI,GAAiC,YAAY,CAAC;YAElD,aAAQ,GAAG,KAAK,CAAC;YAEjB,qBAAgB,GAAoB,eAAe,CAAC,KAAK,CAAC;YAE1D,aAAQ,GAAG,KAAK,CAAC;YAEjB,qBAAgB,GAAoB,eAAe,CAAC,KAAK,CAAC;YAE1D,WAAM,GAAG,KAAK,CAAC;YAEf,mBAAc,GAAoB,eAAe,CAAC,KAAK,CAAC;YAExD,qBAAgB,GAAkB,IAAI,CAAC;YAEvC,gGAAgG;YACxF,qBAAgB,GAAkB,IAAI,CAAC;YAE9B,eAAU,GAAG,IAAI,gBAAgB,CAAC,GAAG,EAAE,CAA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AAU,EAAE,CAAC;YAC7B,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;YAEtC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;gBACxC,IAAI,KAAK,CAAC,SAAS,KAAK,UAAU,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,MAAM,CAAC;oBAAE,OAAO;gBAC1E,IAAI,CAAC,UAAU,CAAC,OAAO,CAAE,KAA6B,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;YAC1E,CAAC,CAAC,CAAC;YAEH,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC;QAC9B,CAAC;KACF,CAAC;AACJ,CAAC,CAAC","sourcesContent":["/* eslint-disable @typescript-eslint/explicit-module-boundary-types */\n\nimport { Constructor, LitElement, PropertyDeclarations, TemplateResult, html } from 'lit-element';\n\nimport { BooleanSelector } from '@foxy.io/sdk/core';\nimport { ifDefined } from 'lit-html/directives/if-defined';\nimport { InferrableMixinHost } from './inferrable';\nimport { ScopeCollection, ScopeRule, getScopeSelectors, parseUserScope } from '../utils/user-scope';\n\nexport declare class ConfigurableMixinHost {\n /** Template render functions mapped to their name. */\n templates: Partial<Record<string, Renderer<any>>>;\n\n /**\n * Toggles additional functionality for developers on and off. In particular,\n * setting this property (or attribute with the same name) to \"development\" will\n * start tracking changes in templates, allowing developers to edit HTML in the browser\n * and see results without having to refresh the page every time.\n */\n mode: 'development' | 'production';\n\n /**\n * If true, makes every editable control inside of this element read-only.\n * This property is reflected to the `readonly` boolean attribute.\n *\n * @since 1.4.0\n */\n readonly: boolean;\n\n /**\n * [BooleanSelector](https://sdk.foxy.dev/classes/_core_index_.booleanselector.html) selecting\n * controls to render as read-only. Parsed version of the `readonlycontrols` attribute value.\n *\n * @type {BooleanSelector}\n * @since 1.4.0\n * @default BooleanSelector.False\n */\n readonlyControls: BooleanSelector;\n\n /**\n * If true, disables every interactive control inside of this element.\n * This property is reflected to the `disabled` boolean attribute.\n *\n * @since 1.4.0\n */\n disabled: boolean;\n\n /**\n * [BooleanSelector](https://sdk.foxy.dev/classes/_core_index_.booleanselector.html) selecting\n * controls to render as disabled. Parsed version of the `disabledcontrols` attribute value.\n *\n * @type {BooleanSelector}\n * @since 1.4.0\n * @default BooleanSelector.False\n */\n disabledControls: BooleanSelector;\n\n /**\n * If true, hides every configurable control inside of this element.\n * This property is reflected to the `hidden` boolean attribute.\n *\n * @since 1.4.0\n */\n hidden: boolean;\n\n /**\n * [BooleanSelector](https://sdk.foxy.dev/classes/_core_index_.booleanselector.html) selecting\n * controls to hide. Parsed version of the `hiddencontrols` attribute value.\n *\n * @type {BooleanSelector}\n * @since 1.4.0\n * @default BooleanSelector.False\n */\n hiddenControls: BooleanSelector;\n\n /**\n * Space-separated API token scope of the current user, e.g. `transactions_read`. When set,\n * controls the user cannot access are hidden or made read-only. Inferred from parent elements;\n * an unset value never overrides one set on an ancestor. Empty or unset means no restrictions.\n */\n currentUserScope: string | null;\n\n /**\n * Combined [BooleanSelector](https://sdk.foxy.dev/classes/_core_index_.booleanselector.html) for `readonlyControls`\n * and `readonly` properties. If `readonly` is true, this selector will match any control,\n * otherwise it will match the same controls as in `readonlyControls`.\n *\n * @since 1.4.0\n */\n get readonlySelector(): BooleanSelector;\n\n /**\n * Combined [BooleanSelector](https://sdk.foxy.dev/classes/_core_index_.booleanselector.html) for `disabledControls`\n * and `disabled` properties. If `disabled` is true, this selector will match any control,\n * otherwise it will match the same controls as in `disabledControls`.\n *\n * @since 1.4.0\n */\n get disabledSelector(): BooleanSelector;\n\n /**\n * Combined [BooleanSelector](https://sdk.foxy.dev/classes/_core_index_.booleanselector.html) for `hiddenControls`\n * and `hidden` properties. If `hidden` is true, this selector will match any control,\n * otherwise it will match the same controls as in `hiddenControls`.\n *\n * @since 1.4.0\n */\n get hiddenSelector(): BooleanSelector;\n\n /**\n * Collection this element edits. Elements override this to lock themselves when the user\n * can only read it. `null` by default.\n */\n get scopeCollection(): ScopeCollection | null;\n\n /** Per-control scope rules. Elements override this to hide or lock controls. Empty by default. */\n get scopeRules(): ScopeRule[];\n\n /**\n * Looks for templates in element's children and compiles them to render functions.\n *\n * @param replace If true, all existing templates will be removed.\n */\n compileTemplates(replace?: boolean): void;\n\n /**\n * Renders a template with the given name if available and a slot otherwise.\n * For empty name looks for a \"default\" template first and renders it if found – otherwise renders a default slot.\n *\n * @param name Name of the template/slot to render.\n * @param context Context to provide template renderer with.\n */\n renderTemplateOrSlot(name?: string, context?: any): void;\n\n /**\n * Zooms into templates with complex names. For example, zooming on `customer` in `customer:header:before`\n * will return `header:before`.\n *\n * @param id Name to zoom on.\n */\n getNestedTemplates<T extends Partial<Record<string, Renderer<any>>>>(id: string): T;\n}\n\ntype Base = Constructor<InferrableMixinHost> &\n Constructor<LitElement> & { properties?: PropertyDeclarations; inferredProperties: string[] };\n\ntype TemplateFunction = typeof html;\n\nexport type Renderer<THost> = (html: TemplateFunction, host: THost) => TemplateResult;\n\nexport const ConfigurableMixin = <TBase extends Base>(\n BaseElement: TBase\n): TBase & Constructor<ConfigurableMixinHost> => {\n return class ConfigurableElement extends BaseElement {\n static get inferredProperties(): string[] {\n return [\n ...super.inferredProperties,\n 'disabledSelector',\n 'readonlySelector',\n 'hiddenSelector',\n 'templates',\n 'disabled',\n 'readonly',\n 'hidden',\n 'mode',\n 'currentUserScope',\n ];\n }\n\n static get properties(): PropertyDeclarations {\n return {\n ...super.properties,\n\n currentUserScope: { attribute: 'current-user-scope' },\n templates: { attribute: false },\n mode: { type: String },\n\n readonly: { type: Boolean, reflect: true },\n readonlyControls: {\n attribute: 'readonlycontrols',\n converter: { fromAttribute: value => new BooleanSelector(value ?? '') },\n hasChanged: (value: BooleanSelector, newValue?: BooleanSelector) => {\n return value.toString() !== newValue?.toString();\n },\n },\n\n disabled: { type: Boolean, reflect: true },\n disabledControls: {\n attribute: 'disabledcontrols',\n converter: { fromAttribute: value => new BooleanSelector(value ?? '') },\n hasChanged: (value: BooleanSelector, newValue?: BooleanSelector) => {\n return value.toString() !== newValue?.toString();\n },\n },\n\n hidden: { type: Boolean, reflect: true },\n hiddenControls: {\n attribute: 'hiddencontrols',\n converter: { fromAttribute: value => new BooleanSelector(value ?? '') },\n hasChanged: (value: BooleanSelector, newValue?: BooleanSelector) => {\n return value.toString() !== newValue?.toString();\n },\n },\n };\n }\n\n templates = {} as Partial<Record<string, Renderer<any>>>;\n\n mode: 'development' | 'production' = 'production';\n\n readonly = false;\n\n readonlyControls: BooleanSelector = BooleanSelector.False;\n\n disabled = false;\n\n disabledControls: BooleanSelector = BooleanSelector.False;\n\n hidden = false;\n\n hiddenControls: BooleanSelector = BooleanSelector.False;\n\n currentUserScope: string | null = null;\n\n /** Last scope inherited from an ancestor. Lets an ancestor that clears its scope reset ours. */\n private __inheritedScope: string | null = null;\n\n private readonly __observer = new MutationObserver(() => this.__onMutation());\n\n get scopeCollection(): ScopeCollection | null {\n return null;\n }\n\n get scopeRules(): ScopeRule[] {\n return [];\n }\n\n get readonlySelector(): BooleanSelector {\n const scope = this.__getScopeSelectors();\n if (this.readonly || scope.readonlyAll) return BooleanSelector.True;\n return this.__addPaths(this.readonlyControls, scope.readonly);\n }\n\n get disabledSelector(): BooleanSelector {\n return this.disabled ? BooleanSelector.True : this.disabledControls;\n }\n\n get hiddenSelector(): BooleanSelector {\n if (this.hidden) return BooleanSelector.True;\n return this.__addPaths(this.hiddenControls, this.__getScopeSelectors().hidden);\n }\n\n inferFromElement(key: string, element: HTMLElement): unknown | undefined {\n const value = super.inferFromElement(key, element);\n // An unset (null or empty) scope must not stop the walk: an ancestor further up may have one.\n return key === 'currentUserScope' && !value ? undefined : value;\n }\n\n connectedCallback(): void {\n super.connectedCallback();\n if (this.mode === 'development') this.__observe();\n // Without `infer` no parent passes properties down, so a top-level element looks up the\n // scope itself (e.g. `currentUserScope` set once on <html>). Only the scope: inferring\n // everything would also change `ns`, `lang` and the selectors.\n if (this.infer === null && this.currentUserScope === null) this.__inferScope();\n }\n\n private __inferScope(): void {\n let node: Node | null = this.parentNode;\n\n while (node) {\n if (node instanceof ShadowRoot) {\n node = node.host;\n } else if (node instanceof HTMLElement) {\n const value = this.inferFromElement('currentUserScope', node) as string | undefined;\n if (value !== undefined) {\n this.currentUserScope = value;\n this.__inheritedScope = value;\n return;\n }\n node = node.parentNode;\n } else {\n return;\n }\n }\n }\n\n disconnectedCallback(): void {\n super.disconnectedCallback();\n this.__observer.disconnect();\n }\n\n protected firstUpdated(...args: Parameters<LitElement['firstUpdated']>): void {\n super.firstUpdated(...args);\n if (this.mode === 'production') this.compileTemplates();\n }\n\n protected updated(changes: Map<keyof this, unknown>): void {\n super.updated(changes);\n\n this.style.display = this.hidden ? 'none' : '';\n\n if (changes.has('mode')) {\n this.__observer.disconnect();\n if (this.mode === 'development') this.__observe();\n }\n }\n\n compileTemplates(replace = false): void {\n const templates = replace ? {} : { ...this.templates };\n\n Array.from(this.children).forEach(child => {\n if (child.localName !== 'template') return;\n const slot = child.getAttribute('slot') ?? 'default';\n\n try {\n const script = `return html\\`${child.innerHTML}\\``;\n templates[slot] = new Function('html', 'host', script) as () => TemplateResult;\n } catch (err) {\n console.error(err);\n }\n });\n\n this.templates = templates;\n }\n\n renderTemplateOrSlot(name?: string, context?: any) {\n const templateName = name ?? 'default';\n const template = this.templates[templateName];\n\n if (!template) return html`<slot name=${ifDefined(name)}></slot>`;\n\n const renderer = () => {\n try {\n const target = {} as unknown as this;\n const resolvedContext = context ?? this;\n const proxy = new Proxy(target, { get: (_, key) => resolvedContext[key] });\n\n return template?.(html, proxy);\n } catch (err) {\n console.error(err);\n }\n };\n\n return html`\n <foxy-internal-sandbox data-testid=${templateName} .render=${renderer}>\n </foxy-internal-sandbox>\n `;\n }\n\n getNestedTemplates<T extends Partial<Record<string, Renderer<any>>>>(id: string): T {\n const nestedTemplates = {} as T;\n\n Object.entries(this.templates).forEach(([key, value]) => {\n if (key.startsWith(`${id}:`)) {\n const zoomedKey = key.replace(`${id}:`, '');\n nestedTemplates[zoomedKey as keyof T] = value as T[keyof T];\n }\n });\n\n return nestedTemplates;\n }\n\n applyInferredProperties(context: Map<string, unknown>): void {\n super.applyInferredProperties(context);\n\n type Templates = ConfigurableMixinHost['templates'];\n type Mode = ConfigurableMixinHost['mode'];\n\n if (this.infer === null) return;\n\n const disabledSelector = context.get('disabledSelector') as BooleanSelector | undefined;\n const disabled = context.get('disabled') as boolean | undefined;\n\n const readonlySelector = context.get('readonlySelector') as BooleanSelector | undefined;\n const readonly = context.get('readonly') as boolean | undefined;\n\n const hiddenSelector = context.get('hiddenSelector') as BooleanSelector | undefined;\n const hidden = context.get('hidden') as boolean | undefined;\n\n const templates = context.get('templates') as Templates | undefined;\n const mode = context.get('mode') as Mode | undefined;\n\n const trueAsString = BooleanSelector.True.toString();\n const simplify = (selector: BooleanSelector, fallback?: boolean) => {\n return selector.toString() === trueAsString || (fallback ?? false);\n };\n\n const zoomIfNested = (selector?: BooleanSelector) => {\n return (this.infer ? selector?.zoom(this.infer) : selector) ?? BooleanSelector.False;\n };\n\n this.disabledControls = zoomIfNested(disabledSelector);\n this.disabled = simplify(this.disabledControls, disabled);\n\n this.readonlyControls = zoomIfNested(readonlySelector);\n this.readonly = simplify(this.readonlyControls, readonly);\n\n this.hiddenControls = zoomIfNested(hiddenSelector);\n this.hidden = simplify(this.hiddenControls, hidden);\n\n this.templates = templates ?? {};\n if (this.infer) this.templates = this.getNestedTemplates(this.infer);\n\n this.mode = mode ?? 'production';\n\n const currentUserScope = context.get('currentUserScope') as string | undefined;\n if (currentUserScope !== undefined) {\n this.currentUserScope = currentUserScope;\n this.__inheritedScope = currentUserScope;\n } else if (this.__inheritedScope !== null) {\n // An ancestor cleared its scope. Drop the stale inherited value, keep an explicit one.\n if (this.currentUserScope === this.__inheritedScope) this.currentUserScope = null;\n this.__inheritedScope = null;\n }\n }\n\n private __getScopeSelectors() {\n const scope = parseUserScope(this.currentUserScope);\n // Subclass getters may need data that is not there yet, so don't read them without a scope.\n if (!scope) return getScopeSelectors(null, [], null);\n return getScopeSelectors(scope, this.scopeRules, this.scopeCollection);\n }\n\n private __addPaths(base: BooleanSelector, paths: string[]): BooleanSelector {\n if (paths.length === 0 || base.toString() === BooleanSelector.True.toString()) return base;\n return new BooleanSelector([base.toString(), ...paths].join(' ').trim());\n }\n\n private __observe() {\n this.__observer.observe(this, {\n characterData: true,\n attributes: true,\n childList: true,\n subtree: true,\n });\n\n this.__onMutation();\n }\n\n private __onMutation() {\n const config: MutationObserverInit = {\n characterData: true,\n attributes: true,\n childList: true,\n subtree: true,\n };\n\n this.__observer.disconnect();\n this.__observer.observe(this, config);\n\n Array.from(this.children).forEach(child => {\n if (child.localName !== 'template' || !child.hasAttribute('slot')) return;\n this.__observer.observe((child as HTMLTemplateElement).content, config);\n });\n\n this.compileTemplates(true);\n }\n };\n};\n"]}
@@ -2369,6 +2369,12 @@ option{
2369
2369
  box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);
2370
2370
  }
2371
2371
 
2372
+ .ring {
2373
+ --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
2374
+ --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);
2375
+ box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);
2376
+ }
2377
+
2372
2378
  .group:focus .group-focus-ring-2 {
2373
2379
  --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
2374
2380
  --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);
@@ -1 +1 @@
1
- {"version":3,"file":"themeable.js","sourceRoot":"","sources":["../../src/mixins/themeable.ts"],"names":[],"mappings":"A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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;SAuKF;aACF,CAAC;QACJ,CAAC;KACF,CAAC;AACJ,CAAC,CAAC;AAEF,IAAI;IACF,cAAc,CACZ,yBAAyB,EACzB,GAAG;;;;;;;;KASF,CACF,CAAC;CACH;AAAC,WAAM;IACN,SAAS;CACV;AAED,IAAI;IACF,cAAc,CACZ,qCAAqC,EACrC,GAAG;;;;;;;KAOF,CACF,CAAC;CACH;AAAC,WAAM;IACN,SAAS;CACV;AAED,IAAI;IACF,cAAc,CACZ,qCAAqC,EACrC,GAAG;;;;;;;KAOF,CACF,CAAC;CACH;AAAC,WAAM;IACN,SAAS;CACV;AAED,IAAI;IACF,cAAc,CACZ,eAAe,EACf,GAAG;;;;;;;KAQF,CACF,CAAC;CACH;AAAC,WAAM;IACN,SAAS;CACV;AAED,IAAI;IACF,uEAAuE;IACvE,cAAc,CACZ,aAAa,EACb,GAAG;;;KAIF,CACF,CAAC;CACH;AAAC,WAAM;IACN,SAAS;CACV;AAED;;;;;;;GAOG;AACH,MAAM,OAAgB,SAAU,SAAQ,mBAAmB,CACzD,eAAe,CAAC,cAAc,CAAC,UAAU,CAAC,CAAC,CAC5C;CAAG","sourcesContent":["/* eslint-disable @typescript-eslint/explicit-module-boundary-types */\n\nimport { CSSResult, CSSResultArray, Constructor, LitElement, css } from 'lit-element';\n\nimport { ResponsiveMixin } from './responsive';\nimport { ScopedElementsMixin } from '@open-wc/scoped-elements';\nimport { registerStyles } from '@vaadin/vaadin-themable-mixin/register-styles';\n\ntype Base = Constructor<LitElement> & { styles?: CSSResult | CSSResultArray | CSSStyleSheet };\n\nexport const ThemeableMixin = <TBase extends Base>(\n BaseElement: TBase\n): TBase & { styles: CSSResultArray } => {\n return class ThemeableElement extends BaseElement {\n static get styles(): CSSResultArray {\n const originalCSS = super.styles;\n\n return [\n ...(originalCSS ? (Array.isArray(originalCSS) ? originalCSS : [originalCSS]) : []),\n css`\n @tailwind base;\n\n * {\n -webkit-tap-highlight-color: transparent;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n }\n\n :host {\n display: block;\n color: var(--lumo-body-text-color);\n line-height: var(--lumo-line-height-m);\n font: normal var(--lumo-font-size-m) var(--lumo-font-family);\n }\n\n details > summary::-webkit-details-marker {\n display: none;\n }\n\n details > summary {\n list-style: none;\n }\n\n vaadin-select {\n margin-top: -4px;\n margin-bottom: -4px;\n }\n\n vaadin-text-area,\n vaadin-text-field,\n vaadin-date-picker,\n vaadin-email-field,\n vaadin-number-field,\n vaadin-custom-field,\n vaadin-integer-field,\n vaadin-password-field,\n vaadin-checkbox-group,\n vaadin-radio-group,\n vaadin-combo-box::part(text-field),\n vaadin-date-picker::part(text-field) {\n padding-top: 0;\n padding-bottom: 0;\n }\n\n vaadin-text-area::part(label),\n vaadin-text-field::part(label),\n vaadin-date-picker::part(label),\n vaadin-email-field::part(label),\n vaadin-number-field::part(label),\n vaadin-custom-field::part(label),\n vaadin-integer-field::part(label),\n vaadin-password-field::part(label),\n vaadin-checkbox-group::part(label),\n vaadin-radio-group::part(label),\n vaadin-combo-box::part(label),\n vaadin-date-picker::part(label) {\n margin-left: 0;\n }\n\n vaadin-time-picker,\n vaadin-date-time-picker {\n width: 100%;\n }\n\n vaadin-button,\n vaadin-checkbox::part(checkbox) {\n margin: 0;\n }\n\n vaadin-checkbox::part(label) {\n margin: 0.1875em var(--lumo-space-m);\n }\n\n .appearance-none {\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n }\n\n .appearance-none::-webkit-calendar-picker-indicator,\n .appearance-none::-webkit-outer-spin-button,\n .appearance-none::-webkit-inner-spin-button,\n .appearance-none::-webkit-list-button {\n opacity: 0 !important;\n width: 0 !important;\n margin: 0 !important;\n padding: 0 !important;\n }\n\n input::-webkit-date-and-time-value {\n text-align: inherit !important;\n }\n\n [hidden] {\n display: none !important;\n }\n\n option {\n color: var(--lumo-body-text-color);\n }\n\n @tailwind components;\n\n @tailwind utilities;\n\n @layer utilities {\n .border-radius-overflow-fix {\n -webkit-mask-image: -webkit-radial-gradient(white, black);\n }\n\n @variants sm, md, lg, xl {\n .grid-rows-auto {\n grid-auto-rows: 1fr;\n }\n\n .icon-inline {\n --iron-icon-height: 1em;\n --iron-icon-width: 1em;\n }\n\n .bg-blurred {\n backdrop-filter: blur(25px);\n background: var(--lumo-tint-80pct);\n }\n\n .max-w-modal {\n max-width: 28rem;\n }\n\n .max-w-modal-wide {\n max-width: 50rem;\n }\n\n .w-narrow-modal {\n width: 18rem;\n }\n\n .snap-x-mandatory {\n scroll-snap-type: x mandatory;\n }\n\n .snap-start {\n scroll-snap-align: start;\n }\n\n .hljs-tag {\n color: var(--lumo-tertiary-text-color);\n font-weight: 500;\n }\n\n .hljs-name {\n color: var(--lumo-primary-text-color);\n font-weight: 500;\n }\n\n .hljs-attr {\n color: var(--lumo-secondary-text-color);\n font-weight: 500;\n }\n\n .hljs-string {\n color: var(--lumo-success-text-color);\n font-weight: 500;\n }\n }\n }\n `,\n ];\n }\n };\n};\n\ntry {\n registerStyles(\n 'vaadin-date-time-picker',\n css`\n vaadin-date-time-picker-custom-field {\n --lumo-text-field-size: auto;\n padding: 0;\n }\n\n vaadin-date-time-picker-custom-field::part(label) {\n padding-bottom: 0.5em;\n }\n `\n );\n} catch {\n // ignore\n}\n\ntry {\n registerStyles(\n 'vaadin-date-time-picker-date-picker',\n css`\n :host {\n --lumo-text-field-size: auto;\n }\n vaadin-date-time-picker-date-text-field {\n padding: 0;\n }\n `\n );\n} catch {\n // ignore\n}\n\ntry {\n registerStyles(\n 'vaadin-date-time-picker-time-picker',\n css`\n :host {\n --lumo-text-field-size: auto;\n }\n vaadin-date-time-picker-time-text-field {\n padding: 0;\n }\n `\n );\n} catch {\n // ignore\n}\n\ntry {\n registerStyles(\n 'vaadin-button',\n css`\n #button {\n cursor: pointer;\n }\n\n :host([theme~='primary']) {\n font-weight: 500;\n }\n `\n );\n} catch {\n // ignore\n}\n\ntry {\n /** https://github.com/vaadin-component-factory/vcf-tooltip/issues/6 */\n registerStyles(\n 'vcf-tooltip',\n css`\n :host([hidden]) [part='container'] {\n display: none !important;\n }\n `\n );\n} catch {\n // ignore\n}\n\n/**\n * One of the base classes for each rel-specific element in the collection\n * providing shared TailwindCSS styles for Shadow DOM content.\n * This class MUST NOT be used on its own (hence the `abstract` keyword) or\n * referenced externally (outside of the package).\n *\n * @deprecated\n */\nexport abstract class Themeable extends ScopedElementsMixin(\n ResponsiveMixin(ThemeableMixin(LitElement))\n) {}\n"]}
1
+ {"version":3,"file":"themeable.js","sourceRoot":"","sources":["../../src/mixins/themeable.ts"],"names":[],"mappings":"AAAA,sEAAsE;AAEtE,OAAO,EAA0C,UAAU,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AAEtF,OAAO,EAAE,eAAe,EAAE,wBAAqB;AAC/C,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,cAAc,EAAE,MAAM,+CAA+C,CAAC;AAI/E,MAAM,CAAC,MAAM,cAAc,GAAG,CAC5B,WAAkB,EACkB,EAAE;IACtC,OAAO,MAAM,gBAAiB,SAAQ,WAAW;QAC/C,MAAM,KAAK,MAAM;YACf,MAAM,WAAW,GAAG,KAAK,CAAC,MAAM,CAAC;YAEjC,OAAO;gBACL,GAAG,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;gBAClF,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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esContent":["/* eslint-disable @typescript-eslint/explicit-module-boundary-types */\n\nimport { CSSResult, CSSResultArray, Constructor, LitElement, css } from 'lit-element';\n\nimport { ResponsiveMixin } from './responsive';\nimport { ScopedElementsMixin } from '@open-wc/scoped-elements';\nimport { registerStyles } from '@vaadin/vaadin-themable-mixin/register-styles';\n\ntype Base = Constructor<LitElement> & { styles?: CSSResult | CSSResultArray | CSSStyleSheet };\n\nexport const ThemeableMixin = <TBase extends Base>(\n BaseElement: TBase\n): TBase & { styles: CSSResultArray } => {\n return class ThemeableElement extends BaseElement {\n static get styles(): CSSResultArray {\n const originalCSS = super.styles;\n\n return [\n ...(originalCSS ? (Array.isArray(originalCSS) ? originalCSS : [originalCSS]) : []),\n css`\n @tailwind base;\n\n * {\n -webkit-tap-highlight-color: transparent;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n }\n\n :host {\n display: block;\n color: var(--lumo-body-text-color);\n line-height: var(--lumo-line-height-m);\n font: normal var(--lumo-font-size-m) var(--lumo-font-family);\n }\n\n details > summary::-webkit-details-marker {\n display: none;\n }\n\n details > summary {\n list-style: none;\n }\n\n vaadin-select {\n margin-top: -4px;\n margin-bottom: -4px;\n }\n\n vaadin-text-area,\n vaadin-text-field,\n vaadin-date-picker,\n vaadin-email-field,\n vaadin-number-field,\n vaadin-custom-field,\n vaadin-integer-field,\n vaadin-password-field,\n vaadin-checkbox-group,\n vaadin-radio-group,\n vaadin-combo-box::part(text-field),\n vaadin-date-picker::part(text-field) {\n padding-top: 0;\n padding-bottom: 0;\n }\n\n vaadin-text-area::part(label),\n vaadin-text-field::part(label),\n vaadin-date-picker::part(label),\n vaadin-email-field::part(label),\n vaadin-number-field::part(label),\n vaadin-custom-field::part(label),\n vaadin-integer-field::part(label),\n vaadin-password-field::part(label),\n vaadin-checkbox-group::part(label),\n vaadin-radio-group::part(label),\n vaadin-combo-box::part(label),\n vaadin-date-picker::part(label) {\n margin-left: 0;\n }\n\n vaadin-time-picker,\n vaadin-date-time-picker {\n width: 100%;\n }\n\n vaadin-button,\n vaadin-checkbox::part(checkbox) {\n margin: 0;\n }\n\n vaadin-checkbox::part(label) {\n margin: 0.1875em var(--lumo-space-m);\n }\n\n .appearance-none {\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n }\n\n .appearance-none::-webkit-calendar-picker-indicator,\n .appearance-none::-webkit-outer-spin-button,\n .appearance-none::-webkit-inner-spin-button,\n .appearance-none::-webkit-list-button {\n opacity: 0 !important;\n width: 0 !important;\n margin: 0 !important;\n padding: 0 !important;\n }\n\n input::-webkit-date-and-time-value {\n text-align: inherit !important;\n }\n\n [hidden] {\n display: none !important;\n }\n\n option {\n color: var(--lumo-body-text-color);\n }\n\n @tailwind components;\n\n @tailwind utilities;\n\n @layer utilities {\n .border-radius-overflow-fix {\n -webkit-mask-image: -webkit-radial-gradient(white, black);\n }\n\n @variants sm, md, lg, xl {\n .grid-rows-auto {\n grid-auto-rows: 1fr;\n }\n\n .icon-inline {\n --iron-icon-height: 1em;\n --iron-icon-width: 1em;\n }\n\n .bg-blurred {\n backdrop-filter: blur(25px);\n background: var(--lumo-tint-80pct);\n }\n\n .max-w-modal {\n max-width: 28rem;\n }\n\n .max-w-modal-wide {\n max-width: 50rem;\n }\n\n .w-narrow-modal {\n width: 18rem;\n }\n\n .snap-x-mandatory {\n scroll-snap-type: x mandatory;\n }\n\n .snap-start {\n scroll-snap-align: start;\n }\n\n .hljs-tag {\n color: var(--lumo-tertiary-text-color);\n font-weight: 500;\n }\n\n .hljs-name {\n color: var(--lumo-primary-text-color);\n font-weight: 500;\n }\n\n .hljs-attr {\n color: var(--lumo-secondary-text-color);\n font-weight: 500;\n }\n\n .hljs-string {\n color: var(--lumo-success-text-color);\n font-weight: 500;\n }\n }\n }\n `,\n ];\n }\n };\n};\n\ntry {\n registerStyles(\n 'vaadin-date-time-picker',\n css`\n vaadin-date-time-picker-custom-field {\n --lumo-text-field-size: auto;\n padding: 0;\n }\n\n vaadin-date-time-picker-custom-field::part(label) {\n padding-bottom: 0.5em;\n }\n `\n );\n} catch {\n // ignore\n}\n\ntry {\n registerStyles(\n 'vaadin-date-time-picker-date-picker',\n css`\n :host {\n --lumo-text-field-size: auto;\n }\n vaadin-date-time-picker-date-text-field {\n padding: 0;\n }\n `\n );\n} catch {\n // ignore\n}\n\ntry {\n registerStyles(\n 'vaadin-date-time-picker-time-picker',\n css`\n :host {\n --lumo-text-field-size: auto;\n }\n vaadin-date-time-picker-time-text-field {\n padding: 0;\n }\n `\n );\n} catch {\n // ignore\n}\n\ntry {\n registerStyles(\n 'vaadin-button',\n css`\n #button {\n cursor: pointer;\n }\n\n :host([theme~='primary']) {\n font-weight: 500;\n }\n `\n );\n} catch {\n // ignore\n}\n\ntry {\n /** https://github.com/vaadin-component-factory/vcf-tooltip/issues/6 */\n registerStyles(\n 'vcf-tooltip',\n css`\n :host([hidden]) [part='container'] {\n display: none !important;\n }\n `\n );\n} catch {\n // ignore\n}\n\n/**\n * One of the base classes for each rel-specific element in the collection\n * providing shared TailwindCSS styles for Shadow DOM content.\n * This class MUST NOT be used on its own (hence the `abstract` keyword) or\n * referenced externally (outside of the package).\n *\n * @deprecated\n */\nexport abstract class Themeable extends ScopedElementsMixin(\n ResponsiveMixin(ThemeableMixin(LitElement))\n) {}\n"]}
@@ -0,0 +1,38 @@
1
+ /**
2
+ * Collections an invitation may grant, taken from the API's list of invitation collections minus
3
+ * the two that are not meaningful choices.
4
+ *
5
+ * This list is duplicated from the API. A collection added there will be silently omitted
6
+ * here until it is added to this array AND given a `scopes.<token>` label in every consuming
7
+ * namespace (`user-invitation-card`, `user-invitation-form`). Rendering an unlabelled raw
8
+ * token among humanized names looks broken, so omission is the deliberate failure mode.
9
+ *
10
+ * Two of the API's 22 collections are excluded on purpose -- do not "fix" the omission:
11
+ *
12
+ * - `clients`: a separate top-level resource that the Foxy admin does not manage.
13
+ * Sign-in never issues `clients_read`/`clients_write`, so granting them would have
14
+ * no effect.
15
+ * - `users`: the API treats `user_full_access` as `users_read users_write`,
16
+ * and every admin sign-in requests `user_full_access`, so a user's access here never
17
+ * depends on their invitation. A toggle would be inert rather than merely redundant.
18
+ */
19
+ export declare const COLLECTIONS: readonly ["carts", "coupons", "customers", "customer_portal_settings", "downloadables", "gift_cards", "integrations", "item_categories", "payment_settings", "reporting", "shipping_integrations", "shipping_settings", "stores", "subscriptions", "subscription_settings", "taxes", "templates", "transactions", "user_invitations", "webhooks"];
20
+ /** Collections that additionally support a `_resend` permission. */
21
+ export declare const RESENDABLE: readonly ["transactions", "webhooks", "taxes"];
22
+ export declare type ScopeGroups = {
23
+ /** `store_full_access` was present. All other tokens are ignored and the arrays are empty. */
24
+ storeFullAccess: boolean;
25
+ /** Collections the user can read and write. A `_write` scope implies read, per the API. */
26
+ full: string[];
27
+ /** Collections the user can read but not write. */
28
+ read: string[];
29
+ /** Collections the user can resend. Independent of read/write. */
30
+ resend: string[];
31
+ };
32
+ /**
33
+ * Groups an invitation's space-separated `scope` string by permission level.
34
+ *
35
+ * Returns collection tokens rather than display labels: labels are localized, and sorting
36
+ * by them belongs in the element that has a translation function.
37
+ */
38
+ export declare function groupInvitationScopes(scope: string | null | undefined): ScopeGroups;
@@ -0,0 +1,70 @@
1
+ /**
2
+ * Collections an invitation may grant, taken from the API's list of invitation collections minus
3
+ * the two that are not meaningful choices.
4
+ *
5
+ * This list is duplicated from the API. A collection added there will be silently omitted
6
+ * here until it is added to this array AND given a `scopes.<token>` label in every consuming
7
+ * namespace (`user-invitation-card`, `user-invitation-form`). Rendering an unlabelled raw
8
+ * token among humanized names looks broken, so omission is the deliberate failure mode.
9
+ *
10
+ * Two of the API's 22 collections are excluded on purpose -- do not "fix" the omission:
11
+ *
12
+ * - `clients`: a separate top-level resource that the Foxy admin does not manage.
13
+ * Sign-in never issues `clients_read`/`clients_write`, so granting them would have
14
+ * no effect.
15
+ * - `users`: the API treats `user_full_access` as `users_read users_write`,
16
+ * and every admin sign-in requests `user_full_access`, so a user's access here never
17
+ * depends on their invitation. A toggle would be inert rather than merely redundant.
18
+ */
19
+ export const COLLECTIONS = [
20
+ 'carts',
21
+ 'coupons',
22
+ 'customers',
23
+ 'customer_portal_settings',
24
+ 'downloadables',
25
+ 'gift_cards',
26
+ 'integrations',
27
+ 'item_categories',
28
+ 'payment_settings',
29
+ 'reporting',
30
+ 'shipping_integrations',
31
+ 'shipping_settings',
32
+ 'stores',
33
+ 'subscriptions',
34
+ 'subscription_settings',
35
+ 'taxes',
36
+ 'templates',
37
+ 'transactions',
38
+ 'user_invitations',
39
+ 'webhooks',
40
+ ];
41
+ /** Collections that additionally support a `_resend` permission. */
42
+ export const RESENDABLE = ['transactions', 'webhooks', 'taxes'];
43
+ /**
44
+ * Groups an invitation's space-separated `scope` string by permission level.
45
+ *
46
+ * Returns collection tokens rather than display labels: labels are localized, and sorting
47
+ * by them belongs in the element that has a translation function.
48
+ */
49
+ export function groupInvitationScopes(scope) {
50
+ const tokens = new Set((scope !== null && scope !== void 0 ? scope : '').split(/\s+/).filter(token => token.length > 0));
51
+ if (tokens.has('store_full_access')) {
52
+ return { storeFullAccess: true, full: [], read: [], resend: [] };
53
+ }
54
+ const full = [];
55
+ const read = [];
56
+ const resend = [];
57
+ COLLECTIONS.forEach(collection => {
58
+ // A write scope satisfies a read check in the API, so write wins and the collection
59
+ // is never listed as read-only as well.
60
+ if (tokens.has(`${collection}_write`))
61
+ full.push(collection);
62
+ else if (tokens.has(`${collection}_read`))
63
+ read.push(collection);
64
+ const isResendable = RESENDABLE.includes(collection);
65
+ if (isResendable && tokens.has(`${collection}_resend`))
66
+ resend.push(collection);
67
+ });
68
+ return { storeFullAccess: false, full, read, resend };
69
+ }
70
+ //# sourceMappingURL=group-invitation-scopes.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"group-invitation-scopes.js","sourceRoot":"","sources":["../../src/utils/group-invitation-scopes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,CAAC,MAA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QAEjE,MAAM,YAAY,GAAI,UAAgC,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC;QAC5E,IAAI,YAAY,IAAI,MAAM,CAAC,GAAG,CAAC,GAAG,UAAU,SAAS,CAAC;YAAE,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;IAClF,CAAC,CAAC,CAAC;IAEH,OAAO,EAAE,eAAe,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;AACxD,CAAC","sourcesContent":["/**\n * Collections an invitation may grant, taken from the API's list of invitation collections minus\n * the two that are not meaningful choices.\n *\n * This list is duplicated from the API. A collection added there will be silently omitted\n * here until it is added to this array AND given a `scopes.<token>` label in every consuming\n * namespace (`user-invitation-card`, `user-invitation-form`). Rendering an unlabelled raw\n * token among humanized names looks broken, so omission is the deliberate failure mode.\n *\n * Two of the API's 22 collections are excluded on purpose -- do not \"fix\" the omission:\n *\n * - `clients`: a separate top-level resource that the Foxy admin does not manage.\n * Sign-in never issues `clients_read`/`clients_write`, so granting them would have\n * no effect.\n * - `users`: the API treats `user_full_access` as `users_read users_write`,\n * and every admin sign-in requests `user_full_access`, so a user's access here never\n * depends on their invitation. A toggle would be inert rather than merely redundant.\n */\nexport const COLLECTIONS = [\n 'carts',\n 'coupons',\n 'customers',\n 'customer_portal_settings',\n 'downloadables',\n 'gift_cards',\n 'integrations',\n 'item_categories',\n 'payment_settings',\n 'reporting',\n 'shipping_integrations',\n 'shipping_settings',\n 'stores',\n 'subscriptions',\n 'subscription_settings',\n 'taxes',\n 'templates',\n 'transactions',\n 'user_invitations',\n 'webhooks',\n] as const;\n\n/** Collections that additionally support a `_resend` permission. */\nexport const RESENDABLE = ['transactions', 'webhooks', 'taxes'] as const;\n\nexport type ScopeGroups = {\n /** `store_full_access` was present. All other tokens are ignored and the arrays are empty. */\n storeFullAccess: boolean;\n /** Collections the user can read and write. A `_write` scope implies read, per the API. */\n full: string[];\n /** Collections the user can read but not write. */\n read: string[];\n /** Collections the user can resend. Independent of read/write. */\n resend: string[];\n};\n\n/**\n * Groups an invitation's space-separated `scope` string by permission level.\n *\n * Returns collection tokens rather than display labels: labels are localized, and sorting\n * by them belongs in the element that has a translation function.\n */\nexport function groupInvitationScopes(scope: string | null | undefined): ScopeGroups {\n const tokens = new Set((scope ?? '').split(/\\s+/).filter(token => token.length > 0));\n\n if (tokens.has('store_full_access')) {\n return { storeFullAccess: true, full: [], read: [], resend: [] };\n }\n\n const full: string[] = [];\n const read: string[] = [];\n const resend: string[] = [];\n\n COLLECTIONS.forEach(collection => {\n // A write scope satisfies a read check in the API, so write wins and the collection\n // is never listed as read-only as well.\n if (tokens.has(`${collection}_write`)) full.push(collection);\n else if (tokens.has(`${collection}_read`)) read.push(collection);\n\n const isResendable = (RESENDABLE as readonly string[]).includes(collection);\n if (isResendable && tokens.has(`${collection}_resend`)) resend.push(collection);\n });\n\n return { storeFullAccess: false, full, read, resend };\n}\n"]}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Resolves with the result of the given request, or with `undefined` if the request
3
+ * failed because the token lacks a scope for it. Use it for requests that only
4
+ * enrich a resource that was already loaded. Any other failure is thrown again.
5
+ *
6
+ * Expects failed requests to reject with a `Response`, like `NucleonElement#_fetch` does.
7
+ */
8
+ export declare function ignoreAccessDenied<T>(request: Promise<T>): Promise<T | undefined>;
@@ -0,0 +1,19 @@
1
+ import { isAccessDenied } from "./is-access-denied.js";
2
+ /**
3
+ * Resolves with the result of the given request, or with `undefined` if the request
4
+ * failed because the token lacks a scope for it. Use it for requests that only
5
+ * enrich a resource that was already loaded. Any other failure is thrown again.
6
+ *
7
+ * Expects failed requests to reject with a `Response`, like `NucleonElement#_fetch` does.
8
+ */
9
+ export async function ignoreAccessDenied(request) {
10
+ try {
11
+ return await request;
12
+ }
13
+ catch (err) {
14
+ if (err instanceof Response && (await isAccessDenied(err)))
15
+ return undefined;
16
+ throw err;
17
+ }
18
+ }
19
+ //# sourceMappingURL=ignore-access-denied.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ignore-access-denied.js","sourceRoot":"","sources":["../../src/utils/ignore-access-denied.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,8BAA2B;AAEpD;;;;;;GAMG;AACH,MAAM,CAAC,KAAK,UAAU,kBAAkB,CAAI,OAAmB;IAC7D,IAAI;QACF,OAAO,MAAM,OAAO,CAAC;KACtB;IAAC,OAAO,GAAG,EAAE;QACZ,IAAI,GAAG,YAAY,QAAQ,IAAI,CAAC,MAAM,cAAc,CAAC,GAAG,CAAC,CAAC;YAAE,OAAO,SAAS,CAAC;QAC7E,MAAM,GAAG,CAAC;KACX;AACH,CAAC","sourcesContent":["import { isAccessDenied } from './is-access-denied';\n\n/**\n * Resolves with the result of the given request, or with `undefined` if the request\n * failed because the token lacks a scope for it. Use it for requests that only\n * enrich a resource that was already loaded. Any other failure is thrown again.\n *\n * Expects failed requests to reject with a `Response`, like `NucleonElement#_fetch` does.\n */\nexport async function ignoreAccessDenied<T>(request: Promise<T>): Promise<T | undefined> {\n try {\n return await request;\n } catch (err) {\n if (err instanceof Response && (await isAccessDenied(err))) return undefined;\n throw err;\n }\n}\n"]}
@@ -0,0 +1,46 @@
1
+ /** Access level a single collection can be granted at. */
2
+ export declare type Level = 'none' | 'read' | 'full';
3
+ export declare type Selection = {
4
+ /** `null` means nothing has been chosen yet, which the form's v8n rule rejects. */
5
+ preset: 'store' | 'read' | 'custom' | null;
6
+ /** Level per collection, keyed by the tokens in `COLLECTIONS`. Always fully populated. */
7
+ levels: Record<string, Level>;
8
+ /** Collections with a `_resend` grant. Independent of `levels`, per the API. */
9
+ resend: string[];
10
+ /**
11
+ * Tokens this UI does not model, carried through untouched. `client_full_access` and
12
+ * `user_full_access` are valid grants the API accepts but the matrix cannot express, so
13
+ * dropping them on a round trip would silently revoke access the invitation already had.
14
+ */
15
+ extra: string[];
16
+ };
17
+ /** Parses an invitation's space-separated `scope` string into a UI selection. */
18
+ export declare function parseScope(scope: string | undefined): Selection;
19
+ /** Serializes a UI selection back into a space-separated `scope` string. */
20
+ export declare function serializeScope(selection: Selection): string;
21
+ /** The granter's own scope, prepared for membership checks. */
22
+ export declare type Grantable = {
23
+ storeFullAccess: boolean;
24
+ tokens: Set<string>;
25
+ };
26
+ /**
27
+ * Prepares the granting user's scope for grantability checks.
28
+ *
29
+ * The server is the enforcement boundary — it rejects any
30
+ * token the granter does not hold. These helpers exist so the UI never offers a grant that
31
+ * would be rejected, not to implement the restriction.
32
+ */
33
+ export declare function getGrantable(granterScope: string | undefined): Grantable;
34
+ /** Whether the granter can give `collection` at `level`. */
35
+ export declare function canGrantLevel(grantable: Grantable, collection: string, level: Level): boolean;
36
+ /** Whether the granter can give `collection` a resend grant. */
37
+ export declare function canGrantResend(grantable: Grantable, collection: string): boolean;
38
+ /**
39
+ * Whether the "read-only access to everything" preset can be offered.
40
+ *
41
+ * It is hidden unless the granter can deliver all 20 reads. Silently redefining it as
42
+ * "read-only on whatever I happen to be able to share" would make one preset mean different
43
+ * things to different admins, which is a worse trap than an absent option — `Custom` covers
44
+ * the gap.
45
+ */
46
+ export declare function canGrantReadPreset(grantable: Grantable): boolean;
@@ -0,0 +1,119 @@
1
+ import { COLLECTIONS, RESENDABLE } from "./group-invitation-scopes.js";
2
+ const tokenize = (scope) => {
3
+ return new Set((scope !== null && scope !== void 0 ? scope : '').split(/\s+/).filter(token => token.length > 0));
4
+ };
5
+ /** Parses an invitation's space-separated `scope` string into a UI selection. */
6
+ export function parseScope(scope) {
7
+ const tokens = tokenize(scope);
8
+ const known = new Set();
9
+ const levels = {};
10
+ COLLECTIONS.forEach(collection => {
11
+ const read = `${collection}_read`;
12
+ const write = `${collection}_write`;
13
+ // A write token means full access whether or not the read token is present. The API
14
+ // treats write as implying read, so a lone write is still full access.
15
+ if (tokens.has(write))
16
+ levels[collection] = 'full';
17
+ else if (tokens.has(read))
18
+ levels[collection] = 'read';
19
+ else
20
+ levels[collection] = 'none';
21
+ if (tokens.has(read))
22
+ known.add(read);
23
+ if (tokens.has(write))
24
+ known.add(write);
25
+ });
26
+ const resend = RESENDABLE.filter(collection => {
27
+ const token = `${collection}_resend`;
28
+ if (!tokens.has(token))
29
+ return false;
30
+ known.add(token);
31
+ return true;
32
+ });
33
+ const isStore = tokens.has('store_full_access');
34
+ if (isStore)
35
+ known.add('store_full_access');
36
+ const extra = [...tokens].filter(token => !known.has(token));
37
+ let preset;
38
+ if (isStore) {
39
+ preset = 'store';
40
+ }
41
+ else if (!tokens.size) {
42
+ preset = null;
43
+ }
44
+ else if (!resend.length &&
45
+ !extra.length &&
46
+ COLLECTIONS.every(collection => levels[collection] === 'read')) {
47
+ preset = 'read';
48
+ }
49
+ else {
50
+ preset = 'custom';
51
+ }
52
+ return { preset, levels, resend, extra: [...extra] };
53
+ }
54
+ /** Serializes a UI selection back into a space-separated `scope` string. */
55
+ export function serializeScope(selection) {
56
+ // The store wildcard does NOT supersede `client_full_access` / `user_full_access`:
57
+ // the API treats all three as distinct, independently-granted
58
+ // always-allowed tokens. Dropping preserved extras here would silently revoke whichever
59
+ // of those the invitation already held.
60
+ if (selection.preset === 'store')
61
+ return ['store_full_access', ...selection.extra].join(' ');
62
+ const tokens = [];
63
+ COLLECTIONS.forEach(collection => {
64
+ var _a;
65
+ const level = (_a = selection.levels[collection]) !== null && _a !== void 0 ? _a : 'none';
66
+ // Full emits both tokens rather than write alone. Grantability is literal token
67
+ // membership, so a user granted only `<c>_write` could never afterwards grant anyone
68
+ // read-only access to that collection — the anomaly would propagate down the chain.
69
+ if (level === 'full')
70
+ tokens.push(`${collection}_read`, `${collection}_write`);
71
+ else if (level === 'read')
72
+ tokens.push(`${collection}_read`);
73
+ });
74
+ RESENDABLE.forEach(collection => {
75
+ if (selection.resend.includes(collection))
76
+ tokens.push(`${collection}_resend`);
77
+ });
78
+ return [...tokens, ...selection.extra].join(' ');
79
+ }
80
+ /**
81
+ * Prepares the granting user's scope for grantability checks.
82
+ *
83
+ * The server is the enforcement boundary — it rejects any
84
+ * token the granter does not hold. These helpers exist so the UI never offers a grant that
85
+ * would be rejected, not to implement the restriction.
86
+ */
87
+ export function getGrantable(granterScope) {
88
+ const tokens = tokenize(granterScope);
89
+ return { storeFullAccess: tokens.has('store_full_access'), tokens };
90
+ }
91
+ /** Whether the granter can give `collection` at `level`. */
92
+ export function canGrantLevel(grantable, collection, level) {
93
+ if (level === 'none')
94
+ return true;
95
+ if (grantable.storeFullAccess)
96
+ return true;
97
+ const hasRead = grantable.tokens.has(`${collection}_read`);
98
+ if (level === 'read')
99
+ return hasRead;
100
+ return hasRead && grantable.tokens.has(`${collection}_write`);
101
+ }
102
+ /** Whether the granter can give `collection` a resend grant. */
103
+ export function canGrantResend(grantable, collection) {
104
+ return grantable.storeFullAccess || grantable.tokens.has(`${collection}_resend`);
105
+ }
106
+ /**
107
+ * Whether the "read-only access to everything" preset can be offered.
108
+ *
109
+ * It is hidden unless the granter can deliver all 20 reads. Silently redefining it as
110
+ * "read-only on whatever I happen to be able to share" would make one preset mean different
111
+ * things to different admins, which is a worse trap than an absent option — `Custom` covers
112
+ * the gap.
113
+ */
114
+ export function canGrantReadPreset(grantable) {
115
+ if (grantable.storeFullAccess)
116
+ return true;
117
+ return COLLECTIONS.every(collection => grantable.tokens.has(`${collection}_read`));
118
+ }
119
+ //# sourceMappingURL=invitation-scope.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"invitation-scope.js","sourceRoot":"","sources":["../../src/utils/invitation-scope.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,qCAAkC;AAoBpE,MAAM,QAAQ,GAAG,CAAC,KAAyB,EAAe,EAAE;IAC1D,OAAO,IAAI,GAAG,CAAC,CAAC,KAAK,aAAL,KAAK,cAAL,KAAK,GAAI,EAAE,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,C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C,eAAe,IAAI,SAAS,CAAC,MAAM,CAAC,GAAG,CAAC,GAAG,UAAU,SAAS,CAAC,CAAC;AACnF,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,kBAAkB,CAAC,SAAoB;IACrD,IAAI,SAAS,CAAC,eAAe;QAAE,OAAO,IAAI,CAAC;IAC3C,OAAO,WAAW,CAAC,KAAK,CAAC,UAAU,CAAC,EAAE,CAAC,SAAS,CAAC,MAAM,CAAC,GAAG,CAAC,GAAG,UAAU,OAAO,CAAC,CAAC,CAAC;AACrF,CAAC","sourcesContent":["import { COLLECTIONS, RESENDABLE } from './group-invitation-scopes';\n\n/** Access level a single collection can be granted at. */\nexport type Level = 'none' | 'read' | 'full';\n\nexport type Selection = {\n /** `null` means nothing has been chosen yet, which the form's v8n rule rejects. */\n preset: 'store' | 'read' | 'custom' | null;\n /** Level per collection, keyed by the tokens in `COLLECTIONS`. Always fully populated. */\n levels: Record<string, Level>;\n /** Collections with a `_resend` grant. Independent of `levels`, per the API. */\n resend: string[];\n /**\n * Tokens this UI does not model, carried through untouched. `client_full_access` and\n * `user_full_access` are valid grants the API accepts but the matrix cannot express, so\n * dropping them on a round trip would silently revoke access the invitation already had.\n */\n extra: string[];\n};\n\nconst tokenize = (scope: string | undefined): Set<string> => {\n return new Set((scope ?? '').split(/\\s+/).filter(token => token.length > 0));\n};\n\n/** Parses an invitation's space-separated `scope` string into a UI selection. */\nexport function parseScope(scope: string | undefined): Selection {\n const tokens = tokenize(scope);\n const known = new Set<string>();\n const levels: Record<string, Level> = {};\n\n COLLECTIONS.forEach(collection => {\n const read = `${collection}_read`;\n const write = `${collection}_write`;\n\n // A write token means full access whether or not the read token is present. The API\n // treats write as implying read, so a lone write is still full access.\n if (tokens.has(write)) levels[collection] = 'full';\n else if (tokens.has(read)) levels[collection] = 'read';\n else levels[collection] = 'none';\n\n if (tokens.has(read)) known.add(read);\n if (tokens.has(write)) known.add(write);\n });\n\n const resend = RESENDABLE.filter(collection => {\n const token = `${collection}_resend`;\n if (!tokens.has(token)) return false;\n known.add(token);\n return true;\n });\n\n const isStore = tokens.has('store_full_access');\n if (isStore) known.add('store_full_access');\n\n const extra = [...tokens].filter(token => !known.has(token));\n\n let preset: Selection['preset'];\n\n if (isStore) {\n preset = 'store';\n } else if (!tokens.size) {\n preset = null;\n } else if (\n !resend.length &&\n !extra.length &&\n COLLECTIONS.every(collection => levels[collection] === 'read')\n ) {\n preset = 'read';\n } else {\n preset = 'custom';\n }\n\n return { preset, levels, resend, extra: [...extra] };\n}\n\n/** Serializes a UI selection back into a space-separated `scope` string. */\nexport function serializeScope(selection: Selection): string {\n // The store wildcard does NOT supersede `client_full_access` / `user_full_access`:\n // the API treats all three as distinct, independently-granted\n // always-allowed tokens. Dropping preserved extras here would silently revoke whichever\n // of those the invitation already held.\n if (selection.preset === 'store') return ['store_full_access', ...selection.extra].join(' ');\n\n const tokens: string[] = [];\n\n COLLECTIONS.forEach(collection => {\n const level = selection.levels[collection] ?? 'none';\n\n // Full emits both tokens rather than write alone. Grantability is literal token\n // membership, so a user granted only `<c>_write` could never afterwards grant anyone\n // read-only access to that collection — the anomaly would propagate down the chain.\n if (level === 'full') tokens.push(`${collection}_read`, `${collection}_write`);\n else if (level === 'read') tokens.push(`${collection}_read`);\n });\n\n RESENDABLE.forEach(collection => {\n if (selection.resend.includes(collection)) tokens.push(`${collection}_resend`);\n });\n\n return [...tokens, ...selection.extra].join(' ');\n}\n\n/** The granter's own scope, prepared for membership checks. */\nexport type Grantable = { storeFullAccess: boolean; tokens: Set<string> };\n\n/**\n * Prepares the granting user's scope for grantability checks.\n *\n * The server is the enforcement boundary — it rejects any\n * token the granter does not hold. These helpers exist so the UI never offers a grant that\n * would be rejected, not to implement the restriction.\n */\nexport function getGrantable(granterScope: string | undefined): Grantable {\n const tokens = tokenize(granterScope);\n return { storeFullAccess: tokens.has('store_full_access'), tokens };\n}\n\n/** Whether the granter can give `collection` at `level`. */\nexport function canGrantLevel(grantable: Grantable, collection: string, level: Level): boolean {\n if (level === 'none') return true;\n if (grantable.storeFullAccess) return true;\n\n const hasRead = grantable.tokens.has(`${collection}_read`);\n if (level === 'read') return hasRead;\n\n return hasRead && grantable.tokens.has(`${collection}_write`);\n}\n\n/** Whether the granter can give `collection` a resend grant. */\nexport function canGrantResend(grantable: Grantable, collection: string): boolean {\n return grantable.storeFullAccess || grantable.tokens.has(`${collection}_resend`);\n}\n\n/**\n * Whether the \"read-only access to everything\" preset can be offered.\n *\n * It is hidden unless the granter can deliver all 20 reads. Silently redefining it as\n * \"read-only on whatever I happen to be able to share\" would make one preset mean different\n * things to different admins, which is a worse trap than an absent option — `Custom` covers\n * the gap.\n */\nexport function canGrantReadPreset(grantable: Grantable): boolean {\n if (grantable.storeFullAccess) return true;\n return COLLECTIONS.every(collection => grantable.tokens.has(`${collection}_read`));\n}\n"]}
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Returns `true` if the given failed response means the token lacks the scope
3
+ * required for the resource.
4
+ *
5
+ * 403 is accepted alongside 401 so that a future backend fix to the status code
6
+ * does not require a coordinated frontend release.
7
+ *
8
+ * The response body is read from a clone, so the caller's body stays unconsumed.
9
+ * Any parse failure returns `false`, which degrades to the generic error message
10
+ * rather than throwing inside a render path.
11
+ */
12
+ export declare function isAccessDenied(response: Response): Promise<boolean>;
@@ -0,0 +1,37 @@
1
+ /**
2
+ * hAPI v1 reports a scope denial as HTTP 401 with a `vnd.error` body. That status is
3
+ * also what the OAuth2 layer returns for a bad or missing token, and many unrelated
4
+ * authorization failures reuse the same exception and body shape, so the scope check's
5
+ * own message is the only unambiguous signal.
6
+ *
7
+ * The message reads "The current authenticated user does not appear to have <type>
8
+ * permission for [zoomed ]<rel> resource.", where <type> is `read`, `write` or
9
+ * `resend` and <rel> is a snake_case rel name.
10
+ */
11
+ const SCOPE_DENIAL = /^The current authenticated user does not appear to have \w+ permission for (?:zoomed )?\w+ resource\.$/;
12
+ /**
13
+ * Returns `true` if the given failed response means the token lacks the scope
14
+ * required for the resource.
15
+ *
16
+ * 403 is accepted alongside 401 so that a future backend fix to the status code
17
+ * does not require a coordinated frontend release.
18
+ *
19
+ * The response body is read from a clone, so the caller's body stays unconsumed.
20
+ * Any parse failure returns `false`, which degrades to the generic error message
21
+ * rather than throwing inside a render path.
22
+ */
23
+ export async function isAccessDenied(response) {
24
+ var _a, _b;
25
+ if (response.status !== 401 && response.status !== 403)
26
+ return false;
27
+ try {
28
+ const errors = (_b = (_a = (await response.clone().json())) === null || _a === void 0 ? void 0 : _a._embedded) === null || _b === void 0 ? void 0 : _b['fx:errors'];
29
+ if (!Array.isArray(errors))
30
+ return false;
31
+ return errors.some(error => { var _a; return SCOPE_DENIAL.test((_a = error === null || error === void 0 ? void 0 : error.message) !== null && _a !== void 0 ? _a : ''); });
32
+ }
33
+ catch (_c) {
34
+ return false;
35
+ }
36
+ }
37
+ //# sourceMappingURL=is-access-denied.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"is-access-denied.js","sourceRoot":"","sources":["../../src/utils/is-access-denied.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,MAAM,YAAY,GAChB,wGAAwG,CAAC;AAE3G;;;;;;;;;;GAUG;AACH,MAAM,CAAC,KAAK,UAAU,cAAc,CAAC,QAAkB;;IACrD,IAAI,QAAQ,CAAC,MAAM,KAAK,GAAG,IAAI,QAAQ,CAAC,MAAM,KAAK,GAAG;QAAE,OAAO,KAAK,CAAC;IAErE,IAAI;QACF,MAAM,MAAM,eAAG,CAAC,MAAM,QAAQ,CAAC,KAAK,EAAE,CAAC,IAAI,EAAE,CAAC,0CAAE,SAAS,0CAAG,WAAW,CAAC,CAAC;QACzE,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC;YAAE,OAAO,KAAK,CAAC;QACzC,OAAO,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,WAAC,OAAA,YAAY,CAAC,IAAI,OAAC,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,OAAO,mCAAI,EAAE,CAAC,CAAA,EAAA,CAAC,CAAC;KACtE;IAAC,WAAM;QACN,OAAO,KAAK,CAAC;KACd;AACH,CAAC","sourcesContent":["/**\n * hAPI v1 reports a scope denial as HTTP 401 with a `vnd.error` body. That status is\n * also what the OAuth2 layer returns for a bad or missing token, and many unrelated\n * authorization failures reuse the same exception and body shape, so the scope check's\n * own message is the only unambiguous signal.\n *\n * The message reads \"The current authenticated user does not appear to have <type>\n * permission for [zoomed ]<rel> resource.\", where <type> is `read`, `write` or\n * `resend` and <rel> is a snake_case rel name.\n */\nconst SCOPE_DENIAL =\n /^The current authenticated user does not appear to have \\w+ permission for (?:zoomed )?\\w+ resource\\.$/;\n\n/**\n * Returns `true` if the given failed response means the token lacks the scope\n * required for the resource.\n *\n * 403 is accepted alongside 401 so that a future backend fix to the status code\n * does not require a coordinated frontend release.\n *\n * The response body is read from a clone, so the caller's body stays unconsumed.\n * Any parse failure returns `false`, which degrades to the generic error message\n * rather than throwing inside a render path.\n */\nexport async function isAccessDenied(response: Response): Promise<boolean> {\n if (response.status !== 401 && response.status !== 403) return false;\n\n try {\n const errors = (await response.clone().json())?._embedded?.['fx:errors'];\n if (!Array.isArray(errors)) return false;\n return errors.some(error => SCOPE_DENIAL.test(error?.message ?? ''));\n } catch {\n return false;\n }\n}\n"]}
@@ -0,0 +1,22 @@
1
+ import type { ScopeCollection } from './user-scope';
2
+ declare type Data = {
3
+ _links: Record<string, unknown>;
4
+ } | null | undefined;
5
+ /**
6
+ * Items and their children (options, attributes, discounts, applied taxes, custom fields) follow
7
+ * `carts` while they belong to a cart and `transactions` once they belong to a transaction.
8
+ * Returns `null` when the data says neither, so nothing gets locked by a guess.
9
+ */
10
+ export declare function getItemScopeCollection(data: Data): ScopeCollection | null;
11
+ declare type Cart = {
12
+ currency_code?: string;
13
+ template_set_uri?: string;
14
+ } | null | undefined;
15
+ /**
16
+ * Item cards find their currency code on the transaction, on the cart or subscription transaction
17
+ * template, or on its template set. Returns `false` when the scope can read none of the sources
18
+ * that could still give a code, so the card renders amounts without a currency instead of loading
19
+ * forever. Always `true` when the scope does not restrict store collections.
20
+ */
21
+ export declare function canReadItemCurrency(scope: string | null | undefined, data: Data, cart: Cart): boolean;
22
+ export {};