@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
@@ -0,0 +1,101 @@
1
+ import type { CSSResultArray, PropertyDeclarations, TemplateResult } from 'lit-element';
2
+ import { InternalEditableControl } from '../../../../internal/InternalEditableControl/InternalEditableControl';
3
+ /**
4
+ * Lets an admin choose which scopes an invitation grants, offering only what the granting
5
+ * user already holds.
6
+ *
7
+ * Bound to the invitation's `scope` string through `infer="scope"`. The server is the real
8
+ * enforcement boundary; this control exists so the UI
9
+ * never offers a grant that would be rejected.
10
+ *
11
+ * @element foxy-internal-user-invitation-form-scope-control
12
+ */
13
+ export declare class InternalUserInvitationFormScopeControl extends InternalEditableControl {
14
+ static get properties(): PropertyDeclarations;
15
+ static get styles(): CSSResultArray;
16
+ /** Space-separated scope of the user creating or editing the invitation. */
17
+ granterScope: string | null;
18
+ /**
19
+ * Set when the admin picks `Custom` explicitly. Needed because an empty scope parses to a
20
+ * `null` preset, so without this the radio would snap back to nothing selected the moment
21
+ * `Custom` was chosen but before any row was set.
22
+ */
23
+ private __customSelected;
24
+ /**
25
+ * Cached outcome of `__hasUnreachableGrant` from the most recently completed `renderControl()`
26
+ * pass. Read by `updated()` below -- see its doc comment for why the lock needs to land on
27
+ * `this.readonly` itself rather than staying a `renderControl()`-local variable.
28
+ */
29
+ private __isLocked;
30
+ renderControl(): TemplateResult;
31
+ /**
32
+ * Reflects a lock onto the real `readonly` property (in addition to whatever `updated()`
33
+ * itself, e.g. `renderControl()`'s own `?readonly=` bindings, already did with the local
34
+ * variable) once the initial render has committed.
35
+ *
36
+ * This exists because each row is now a nested `foxy-internal-select-control`.
37
+ * `ConfigurableMixin` makes every such control infer its own `readonly` from the nearest
38
+ * ancestor that has one (this control), by reading `this.readonly` directly during an async
39
+ * walk (`InferrableMixin.inferFromElement`'s `key in element` check) -- not from whatever a
40
+ * template attribute happened to bind on the row. That walk re-runs on every one of this
41
+ * control's own updates (`InferrableMixin.updated()` calls `inferPropertiesInDescendants()`
42
+ * unconditionally), so a row bound only via `?readonly=${this.readonly || isLocked}` in
43
+ * `renderControl()` is overwritten back to whatever `this.readonly` was moments later --
44
+ * confirmed empirically by a probe test, see this task's report. Setting `this.readonly`
45
+ * itself is what the row's own inference actually reads, so this is not a workaround so much
46
+ * as the property meaning what it says: locked really does mean the whole control, including
47
+ * everything nested inside it, is readonly.
48
+ *
49
+ * Assigning inside `updated()` rather than `renderControl()`/`render()` matters too: mutating
50
+ * a reactive property mid-render is what triggers lit's "scheduled an update... during
51
+ * update" warning (and the `does not warn on a fresh empty-scope render` test would catch
52
+ * it); `updated()` is the lifecycle hook lit itself documents for deriving follow-up state
53
+ * from a completed render, and setting a property there does not warn.
54
+ *
55
+ * Never resets `this.readonly` back to `false` on its own -- the externally-imposed half
56
+ * (e.g. the form's own `readonlycontrols` selector matching `scope`) is owned entirely by
57
+ * `ConfigurableMixin`'s own inheritance, which keeps re-asserting its own value on every
58
+ * update independently of this method.
59
+ */
60
+ updated(changes: Map<keyof this, unknown>): void;
61
+ /**
62
+ * `true` when the invitation already holds something this granter could not themselves
63
+ * grant: the current preset isn't among the ones offered, a collection's current level
64
+ * isn't grantable at that level, or a collection currently has a resend grant the granter
65
+ * cannot extend. Reuses `canGrantLevel` / `canGrantResend` rather than reimplementing
66
+ * grantability -- see `renderControl` for why this forces the whole control readonly.
67
+ */
68
+ private __hasUnreachableGrant;
69
+ /**
70
+ * Renders one collection's level picker as a self-contained `foxy-internal-select-control`
71
+ * in `summary-item` layout: a native `<select>` with a real `<label for="select">` (the
72
+ * collection name, passed via `label`, replacing both the old sibling `foxy-i18n` and the
73
+ * `aria-label` workaround that stood in for a proper accessible name before this control had
74
+ * one) plus the current value shown as compact text. `data-collection` moves onto this
75
+ * element directly -- there's no separate row wrapper left to carry it (see the control's
76
+ * `styles` for why one output element per collection, not a wrapper `<div>` per row, is what
77
+ * lets this control own its own two-column grid).
78
+ */
79
+ private __renderLevelControl;
80
+ /**
81
+ * Renders the three resendable collections' resend grants as `foxy-internal-switch-control`s,
82
+ * one per line, in their own `foxy-internal-summary-control` -- not folded into the level
83
+ * grid above. Resend is a secondary, independent axis (a collection's level and its resend
84
+ * grant are unrelated tokens -- see `parseScope`/`serializeScope`), covers only 3 of the 20
85
+ * collections, and doesn't need the level grid's two-column treatment; keeping it as its own
86
+ * section also means the grid's CSS (sized for 20 short rows) never has to accommodate a
87
+ * structurally different kind of row. Renders nothing at all if the granter can't grant (and
88
+ * the invitation doesn't already hold) any resend permission, rather than an empty section.
89
+ */
90
+ private __renderResendSwitches;
91
+ private __setLevel;
92
+ private __setResend;
93
+ /**
94
+ * The scope currently in the form. Undefined before the first edit on a new invitation.
95
+ * An existing invitation saved without a scope grants full store access in the API, so it
96
+ * reads as the wildcard here instead of as "nothing chosen".
97
+ */
98
+ private get __scope();
99
+ private __preset;
100
+ private __selectPreset;
101
+ }
@@ -0,0 +1,373 @@
1
+ import { InternalEditableControl } from "../../../../internal/InternalEditableControl/InternalEditableControl.js";
2
+ import { COLLECTIONS, RESENDABLE } from "../../../../../utils/group-invitation-scopes.js";
3
+ import { css } from 'lit-element';
4
+ import { html } from 'lit-html';
5
+ import { canGrantLevel, canGrantReadPreset, canGrantResend, getGrantable, parseScope, serializeScope, } from "../../../../../utils/invitation-scope.js";
6
+ /**
7
+ * Lets an admin choose which scopes an invitation grants, offering only what the granting
8
+ * user already holds.
9
+ *
10
+ * Bound to the invitation's `scope` string through `infer="scope"`. The server is the real
11
+ * enforcement boundary; this control exists so the UI
12
+ * never offers a grant that would be rejected.
13
+ *
14
+ * @element foxy-internal-user-invitation-form-scope-control
15
+ */
16
+ export class InternalUserInvitationFormScopeControl extends InternalEditableControl {
17
+ constructor() {
18
+ super(...arguments);
19
+ /** Space-separated scope of the user creating or editing the invitation. */
20
+ this.granterScope = null;
21
+ /**
22
+ * Set when the admin picks `Custom` explicitly. Needed because an empty scope parses to a
23
+ * `null` preset, so without this the radio would snap back to nothing selected the moment
24
+ * `Custom` was chosen but before any row was set.
25
+ */
26
+ this.__customSelected = false;
27
+ /**
28
+ * Cached outcome of `__hasUnreachableGrant` from the most recently completed `renderControl()`
29
+ * pass. Read by `updated()` below -- see its doc comment for why the lock needs to land on
30
+ * `this.readonly` itself rather than staying a `renderControl()`-local variable.
31
+ */
32
+ this.__isLocked = false;
33
+ }
34
+ static get properties() {
35
+ return {
36
+ ...super.properties,
37
+ granterScope: { attribute: 'granter-scope' },
38
+ __customSelected: { attribute: false },
39
+ };
40
+ }
41
+ static get styles() {
42
+ return [
43
+ ...super.styles,
44
+ css `.matrix{
45
+ display:grid;
46
+ grid-template-columns:minmax(0, 1fr);
47
+ gap:1px;
48
+ border-radius:var(--lumo-border-radius);
49
+ overflow:hidden;
50
+ }
51
+
52
+ @media all and (min-width: 640px){
53
+ .matrix{
54
+ grid-template-columns:minmax(0, 1fr) minmax(0, 1fr);
55
+ }
56
+ }
57
+
58
+ .matrix > foxy-internal-select-control{
59
+ background-color:var(--lumo-contrast-5pct);
60
+ padding:calc(0.625em + (var(--lumo-border-radius) / 4) - 1px);
61
+ }
62
+ `,
63
+ ];
64
+ }
65
+ renderControl() {
66
+ var _a;
67
+ const selection = parseScope(this.__scope);
68
+ const grantable = getGrantable((_a = this.granterScope) !== null && _a !== void 0 ? _a : void 0);
69
+ const currentPreset = this.__preset(selection);
70
+ const presets = [];
71
+ if (grantable.storeFullAccess)
72
+ presets.push('store');
73
+ if (canGrantReadPreset(grantable))
74
+ presets.push('read');
75
+ presets.push('custom');
76
+ // The invitation can already hold a preset this granter couldn't offer themselves --
77
+ // e.g. a full-access admin created it, and a narrower admin is now editing it. Omitting
78
+ // it would make an existing grant look like no grant at all, so it's still listed as an
79
+ // option (the same treatment `__renderLevelControl` gives an out-of-reach row level) --
80
+ // otherwise `summary-item`'s displayed value would fall back to its placeholder instead
81
+ // of showing the invitation's actual preset. `custom` is always offered and `null`
82
+ // selects nothing, so only `store` and `read` can end up here.
83
+ const mismatchedPreset = currentPreset && !presets.includes(currentPreset) ? currentPreset : null;
84
+ const renderedPresets = ['store', 'read', 'custom'].filter(preset => presets.includes(preset) || preset === mismatchedPreset);
85
+ // The invitation can hold a grant this granter cannot themselves re-grant (see
86
+ // `__hasUnreachableGrant`, which treats a mismatched preset as grounds to lock on its
87
+ // own). The API validates the *entire* submitted `scope` string
88
+ // whenever it's dirty, not just the delta, so any edit here would re-serialize and
89
+ // resubmit that out-of-reach value and the server would reject the whole save -- a
90
+ // failure the admin cannot fix, because there is no way to *only* change the preset
91
+ // without touching the rest. Locking the whole control instead means no edit, and
92
+ // therefore no failing save, can be attempted. The out-of-reach value stays visible,
93
+ // same as always -- only editability changes. Because a mismatched preset already forces
94
+ // `isLocked` (and therefore `readonly`) below, no separate per-option disabling is needed
95
+ // here either -- the same reasoning `__renderLevelControl` and `__renderResendSwitches`
96
+ // already rely on for their own mismatches.
97
+ const isLocked = this.__hasUnreachableGrant(selection, grantable, !!mismatchedPreset);
98
+ // Read by `updated()` below -- see its doc comment for why the lock also needs to land on
99
+ // the `readonly` *property* itself, not just this render pass's local variable.
100
+ this.__isLocked = isLocked;
101
+ const readonly = this.readonly || isLocked;
102
+ const helperText = isLocked ? this.t('helper_text_locked') : this.helperText;
103
+ const presetOptions = renderedPresets.map(preset => ({
104
+ label: `preset_${preset}`,
105
+ value: preset,
106
+ }));
107
+ return html `
108
+ <div class="grid gap-m">
109
+ <foxy-internal-summary-control infer="" label=${this.label} helper-text=${helperText}>
110
+ <foxy-internal-select-control
111
+ layout="summary-item"
112
+ infer=""
113
+ label=${this.t('preset_label')}
114
+ helper-text=""
115
+ data-preset=""
116
+ ?disabled=${this.disabled}
117
+ ?readonly=${readonly}
118
+ .options=${presetOptions}
119
+ .getValue=${() => currentPreset !== null && currentPreset !== void 0 ? currentPreset : undefined}
120
+ .setValue=${(newValue) => this.__selectPreset(newValue)}
121
+ >
122
+ </foxy-internal-select-control>
123
+ </foxy-internal-summary-control>
124
+ ${currentPreset === 'custom'
125
+ ? html `
126
+ <div class="matrix">
127
+ ${COLLECTIONS.map(collection => this.__renderLevelControl(collection, selection, grantable, readonly))}
128
+ </div>
129
+ ${this.__renderResendSwitches(selection, grantable, readonly)}
130
+ `
131
+ : ''}
132
+ </div>
133
+ `;
134
+ }
135
+ /**
136
+ * Reflects a lock onto the real `readonly` property (in addition to whatever `updated()`
137
+ * itself, e.g. `renderControl()`'s own `?readonly=` bindings, already did with the local
138
+ * variable) once the initial render has committed.
139
+ *
140
+ * This exists because each row is now a nested `foxy-internal-select-control`.
141
+ * `ConfigurableMixin` makes every such control infer its own `readonly` from the nearest
142
+ * ancestor that has one (this control), by reading `this.readonly` directly during an async
143
+ * walk (`InferrableMixin.inferFromElement`'s `key in element` check) -- not from whatever a
144
+ * template attribute happened to bind on the row. That walk re-runs on every one of this
145
+ * control's own updates (`InferrableMixin.updated()` calls `inferPropertiesInDescendants()`
146
+ * unconditionally), so a row bound only via `?readonly=${this.readonly || isLocked}` in
147
+ * `renderControl()` is overwritten back to whatever `this.readonly` was moments later --
148
+ * confirmed empirically by a probe test, see this task's report. Setting `this.readonly`
149
+ * itself is what the row's own inference actually reads, so this is not a workaround so much
150
+ * as the property meaning what it says: locked really does mean the whole control, including
151
+ * everything nested inside it, is readonly.
152
+ *
153
+ * Assigning inside `updated()` rather than `renderControl()`/`render()` matters too: mutating
154
+ * a reactive property mid-render is what triggers lit's "scheduled an update... during
155
+ * update" warning (and the `does not warn on a fresh empty-scope render` test would catch
156
+ * it); `updated()` is the lifecycle hook lit itself documents for deriving follow-up state
157
+ * from a completed render, and setting a property there does not warn.
158
+ *
159
+ * Never resets `this.readonly` back to `false` on its own -- the externally-imposed half
160
+ * (e.g. the form's own `readonlycontrols` selector matching `scope`) is owned entirely by
161
+ * `ConfigurableMixin`'s own inheritance, which keeps re-asserting its own value on every
162
+ * update independently of this method.
163
+ */
164
+ updated(changes) {
165
+ super.updated(changes);
166
+ if (this.__isLocked && !this.readonly)
167
+ this.readonly = true;
168
+ }
169
+ /**
170
+ * `true` when the invitation already holds something this granter could not themselves
171
+ * grant: the current preset isn't among the ones offered, a collection's current level
172
+ * isn't grantable at that level, or a collection currently has a resend grant the granter
173
+ * cannot extend. Reuses `canGrantLevel` / `canGrantResend` rather than reimplementing
174
+ * grantability -- see `renderControl` for why this forces the whole control readonly.
175
+ */
176
+ __hasUnreachableGrant(selection, grantable, hasMismatchedPreset) {
177
+ if (hasMismatchedPreset)
178
+ return true;
179
+ const hasUnreachableLevel = COLLECTIONS.some(collection => {
180
+ var _a;
181
+ return !canGrantLevel(grantable, collection, (_a = selection.levels[collection]) !== null && _a !== void 0 ? _a : 'none');
182
+ });
183
+ if (hasUnreachableLevel)
184
+ return true;
185
+ return selection.resend.some(collection => !canGrantResend(grantable, collection));
186
+ }
187
+ /**
188
+ * Renders one collection's level picker as a self-contained `foxy-internal-select-control`
189
+ * in `summary-item` layout: a native `<select>` with a real `<label for="select">` (the
190
+ * collection name, passed via `label`, replacing both the old sibling `foxy-i18n` and the
191
+ * `aria-label` workaround that stood in for a proper accessible name before this control had
192
+ * one) plus the current value shown as compact text. `data-collection` moves onto this
193
+ * element directly -- there's no separate row wrapper left to carry it (see the control's
194
+ * `styles` for why one output element per collection, not a wrapper `<div>` per row, is what
195
+ * lets this control own its own two-column grid).
196
+ */
197
+ __renderLevelControl(collection, selection, grantable, readonly) {
198
+ var _a;
199
+ const allLevels = ['none', 'read', 'full'];
200
+ const currentLevel = (_a = selection.levels[collection]) !== null && _a !== void 0 ? _a : 'none';
201
+ // `stores_read` is what authorizes `GET /stores/{id}` and the `/stores` listing --
202
+ // without it a user cannot load the store page or the store picker, so "no store access"
203
+ // is not a real choice for this row going forward: this row's own select can only ever be
204
+ // set to `read` or `full` from here on. This narrows what a user can newly *choose*, not
205
+ // what a scope string already contains -- an invitation whose stores row has simply never
206
+ // been touched (imported via the API, or edited only through a different row) still
207
+ // parses `stores` as `none` and is written that way; see `mismatchedLevel` below for how
208
+ // that value stays displayable without being treated as an unreachable grant.
209
+ const offerable = collection === 'stores' ? ['read', 'full'] : allLevels;
210
+ const available = offerable.filter(level => canGrantLevel(grantable, collection, level));
211
+ // The option list must be the grantable levels for this row, PLUS the row's current level
212
+ // if it is not grantable/offerable. `vaadin-combo-box` reconciles its displayed value
213
+ // against `.items` on every `.value`/`.items` change (verified directly, see the control's
214
+ // test suite and this task's report), and the native `<select>` `summary-item` renders
215
+ // behaves the same way for an unlisted `<option>` -- an out-of-reach current level not
216
+ // present in `.options` would fail to display at all. `none` is always grantable (see
217
+ // `canGrantLevel`), so for every collection except `stores` only `read` or `full` can end
218
+ // up here as a mismatch -- but a legacy or API-created invitation can hold no `stores_*`
219
+ // tokens at all, which parses to `none`, and `none` is no longer offerable for that one
220
+ // row, so `none` itself can be the mismatch there.
221
+ //
222
+ // No per-option disabling is needed for a level the granter truly cannot re-grant:
223
+ // `__hasUnreachableGrant` already forces the *entire* control readonly the instant any row
224
+ // holds such a level, so that kind of mismatch can only ever be rendered while the whole
225
+ // row control is already readonly. The `stores` row's own `none` mismatch is different --
226
+ // `canGrantLevel` returns `true` unconditionally for `'none'` (see `invitation-scope.ts`),
227
+ // so it is a *legal* grant the granter could re-issue, not an unreachable one. It does not
228
+ // trip `__hasUnreachableGrant`, and is rendered editable while the rest of the control
229
+ // stays unlocked (pinned by this control's own test suite: "does not lock the control
230
+ // merely because the stores row is at its mismatched-but-grantable none"). Either way, the
231
+ // out-of-reach value is simply the control's value.
232
+ const mismatchedLevel = available.includes(currentLevel) ? null : currentLevel;
233
+ // Filtered from `allLevels`, not the narrowed `offerable` list: for the `stores` row,
234
+ // `none` was removed from `offerable` above, but an invitation with no `stores_*` tokens
235
+ // still parses its current level as `none`. Filtering from `offerable` here would drop
236
+ // `none` from the rendered options even when it's `mismatchedLevel`, leaving the select's
237
+ // value absent from its own option list -- the same "current value must stay a real
238
+ // option" rule as the `mismatchedLevel` fallback right above, just applied one filter
239
+ // earlier where a narrower source list can undo it.
240
+ const renderedLevels = allLevels.filter(level => available.includes(level) || level === mismatchedLevel);
241
+ const options = renderedLevels.map(level => ({
242
+ label: `level_${level}`,
243
+ value: level,
244
+ }));
245
+ return html `
246
+ <foxy-internal-select-control
247
+ layout="summary-item"
248
+ infer=""
249
+ label=${this.t(`scopes.${collection}`)}
250
+ helper-text=""
251
+ data-collection=${collection}
252
+ ?disabled=${this.disabled}
253
+ ?readonly=${readonly}
254
+ .options=${options}
255
+ .getValue=${() => currentLevel}
256
+ .setValue=${(newValue) => {
257
+ // The native `<select>` `summary-item` renders always has a real selection (its
258
+ // first, disabled placeholder `<option>` aside) once a value is set, so there is no
259
+ // "clear" affordance to coerce here the way the old vaadin-combo-box row needed --
260
+ // kept anyway as the same defensive floor: there is no "no level" state for a row,
261
+ // and this must never let an empty/undefined token reach the serialized scope.
262
+ this.__setLevel(collection, (newValue || 'none'));
263
+ }}
264
+ >
265
+ </foxy-internal-select-control>
266
+ `;
267
+ }
268
+ /**
269
+ * Renders the three resendable collections' resend grants as `foxy-internal-switch-control`s,
270
+ * one per line, in their own `foxy-internal-summary-control` -- not folded into the level
271
+ * grid above. Resend is a secondary, independent axis (a collection's level and its resend
272
+ * grant are unrelated tokens -- see `parseScope`/`serializeScope`), covers only 3 of the 20
273
+ * collections, and doesn't need the level grid's two-column treatment; keeping it as its own
274
+ * section also means the grid's CSS (sized for 20 short rows) never has to accommodate a
275
+ * structurally different kind of row. Renders nothing at all if the granter can't grant (and
276
+ * the invitation doesn't already hold) any resend permission, rather than an empty section.
277
+ */
278
+ __renderResendSwitches(selection, grantable, readonly) {
279
+ const switches = RESENDABLE.map(collection => {
280
+ const hasResend = selection.resend.includes(collection);
281
+ const canResend = canGrantResend(grantable, collection);
282
+ // Mirrors the level mismatch in `__renderLevelControl`: the invitation can already carry
283
+ // a resend grant this granter can no longer extend themselves. Unlike the level mismatch,
284
+ // this needs no *separate* `disabled` condition below -- `__hasUnreachableGrant` already
285
+ // treats any resend mismatch as grounds to lock the *entire* control (see its own return
286
+ // statement), so `mismatchedResend` and this control's own `readonly` are never true/false
287
+ // independently of each other; adding a redundant `?disabled=` term here would only be
288
+ // exercising `foxy-internal-switch-control`'s `disabled` -- a `ConfigurableMixin`-inferred
289
+ // property subject to the exact same ancestor-inference-can-overwrite-a-template-binding
290
+ // risk documented on this control's own `updated()`, for a case that can't actually occur.
291
+ const mismatchedResend = hasResend && !canResend;
292
+ return { collection, hasResend, mismatchedResend, show: canResend || mismatchedResend };
293
+ }).filter(entry => entry.show);
294
+ if (!switches.length)
295
+ return '';
296
+ return html `
297
+ <foxy-internal-summary-control infer="" label="" helper-text="">
298
+ ${switches.map(({ collection, hasResend }) => html `
299
+ <foxy-internal-switch-control
300
+ infer=""
301
+ label=${`${this.t('resend')} ${this.t(`scopes.${collection}`).toLowerCase()}`}
302
+ helper-text=""
303
+ data-resend=${collection}
304
+ ?disabled=${this.disabled}
305
+ ?readonly=${readonly}
306
+ .getValue=${() => hasResend}
307
+ .setValue=${(newValue) => this.__setResend(collection, !!newValue)}
308
+ >
309
+ </foxy-internal-switch-control>
310
+ `)}
311
+ </foxy-internal-summary-control>
312
+ `;
313
+ }
314
+ __setLevel(collection, level) {
315
+ // Touching a row is proof the admin is actively editing in custom mode. Without this, an
316
+ // edit that happens to make the selection match another preset (e.g. the last collection
317
+ // reaching `read`) would make `__preset` fall back to `parseScope`'s classification and the
318
+ // matrix would vanish out from under the admin mid-edit.
319
+ this.__customSelected = true;
320
+ const selection = parseScope(this.__scope);
321
+ selection.levels[collection] = level;
322
+ this._value = serializeScope({ ...selection, preset: 'custom' });
323
+ }
324
+ __setResend(collection, checked) {
325
+ this.__customSelected = true;
326
+ const selection = parseScope(this.__scope);
327
+ const resend = checked
328
+ ? [...selection.resend, collection]
329
+ : selection.resend.filter(entry => entry !== collection);
330
+ this._value = serializeScope({ ...selection, preset: 'custom', resend });
331
+ }
332
+ /**
333
+ * The scope currently in the form. Undefined before the first edit on a new invitation.
334
+ * An existing invitation saved without a scope grants full store access in the API, so it
335
+ * reads as the wildcard here instead of as "nothing chosen".
336
+ */
337
+ get __scope() {
338
+ var _a, _b;
339
+ const scope = (_a = this._value) !== null && _a !== void 0 ? _a : void 0;
340
+ if (!(scope === null || scope === void 0 ? void 0 : scope.trim()) && ((_b = this.nucleon) === null || _b === void 0 ? void 0 : _b.data))
341
+ return 'store_full_access';
342
+ return scope;
343
+ }
344
+ __preset(selection) {
345
+ if (this.__customSelected)
346
+ return 'custom';
347
+ return selection.preset;
348
+ }
349
+ __selectPreset(preset) {
350
+ this.__customSelected = preset === 'custom';
351
+ // Choosing Custom keeps whatever is already in the form, so the matrix opens on the
352
+ // current grant rather than wiping it. The wildcard has no per-row levels, so it is
353
+ // expanded into what it grants -- every collection at Full and every resend. Keeping
354
+ // `store_full_access` behind rows that all read None would save a full-access invitation.
355
+ if (preset === 'custom') {
356
+ const selection = parseScope(this.__scope);
357
+ if (selection.preset !== 'store')
358
+ return;
359
+ COLLECTIONS.forEach(collection => (selection.levels[collection] = 'full'));
360
+ this._value = serializeScope({ ...selection, preset: 'custom', resend: [...RESENDABLE] });
361
+ return;
362
+ }
363
+ if (preset === 'store') {
364
+ this._value = 'store_full_access';
365
+ }
366
+ else {
367
+ const selection = parseScope('');
368
+ COLLECTIONS.forEach(collection => (selection.levels[collection] = 'read'));
369
+ this._value = serializeScope(selection);
370
+ }
371
+ }
372
+ }
373
+ //# sourceMappingURL=InternalUserInvitationFormScopeControl.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InternalUserInvitationFormScopeControl.js","sourceRoot":"","sources":["../../../../../../src/elements/public/UserInvitationForm/internal/InternalUserInvitationFormScopeControl/InternalUserInvitationFormScopeControl.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,uBAAuB,EAAE,gFAA6E;AAC/G,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,wDAAqD;AACvF,OAAO,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AAClC,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAEhC,OAAO,EACL,aAAa,EACb,kBAAkB,EAClB,cAAc,EACd,YAAY,EACZ,UAAU,EACV,cAAc,GACf,iDAA8C;AAI/C;;;;;;;;;GASG;AACH,MAAM,OAAO,sCAAuC,SAAQ,uBAAuB;IAAnF;;QAsEE,4EAA4E;QAC5E,iBAAY,GAAkB,IAAI,CAAC;QAEnC;;;;WAIG;QACK,qBAAgB,GAAG,KAAK,CAAC;QAEjC;;;;WAIG;QACK,eAAU,GAAG,KAAK,CAAC;IAiW7B,CAAC;IArbC,MAAM,KAAK,UAAU;QACnB,OAAO;YACL,GAAG,KAAK,CAAC,UAAU;YACnB,YAAY,EAAE,EAAE,SAAS,EAAE,eAAe,EAAE;YAC5C,gBAAgB,EAAE,EAAE,SAAS,EAAE,KAAK,EAAE;SACvC,CAAC;IACJ,CAAC;IAED,MAAM,KAAK,MAAM;QACf,OAAO;YACL,GAAG,KAAK,CAAC,MAAM;YACf,GAAG;;;;;;;;;;;;;;;;;;OAsDF;SACF,CAAC;IACJ,CAAC;IAmBD,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C,MAAc;QACnC,IAAI,CAAC,gBAAgB,GAAG,MAAM,KAAK,QAAQ,CAAC;QAE5C,oFAAoF;QACpF,oFAAoF;QACpF,qFAAqF;QACrF,0FAA0F;QAC1F,IAAI,MAAM,KAAK,QAAQ,EAAE;YACvB,MAAM,SAAS,GAAG,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;YAC3C,IAAI,SAAS,CAAC,MAAM,KAAK,OAAO;gBAAE,OAAO;YAEzC,WAAW,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC,SAAS,CAAC,MAAM,CAAC,UAAU,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC;YAC3E,IAAI,CAAC,MAAM,GAAG,cAAc,CAAC,EAAE,GAAG,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,CAAC,GAAG,UAAU,CAAC,EAAE,CAAC,CAAC;YAC1F,OAAO;SACR;QAED,IAAI,MAAM,KAAK,OAAO,EAAE;YACtB,IAAI,CAAC,MAAM,GAAG,mBAAmB,CAAC;SACnC;aAAM;YACL,MAAM,SAAS,GAAG,UAAU,CAAC,EAAE,CAAC,CAAC;YACjC,WAAW,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC,SAAS,CAAC,MAAM,CAAC,UAAU,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC;YAC3E,IAAI,CAAC,MAAM,GAAG,cAAc,CAAC,SAAS,CAAC,CAAC;SACzC;IACH,CAAC;CACF","sourcesContent":["import type { CSSResultArray, PropertyDeclarations, TemplateResult } from 'lit-element';\nimport type { Option } from '../../../../internal/InternalSelectControl/types';\nimport type { Level, Selection } from '../../../../../utils/invitation-scope';\n\nimport { InternalEditableControl } from '../../../../internal/InternalEditableControl/InternalEditableControl';\nimport { COLLECTIONS, RESENDABLE } from '../../../../../utils/group-invitation-scopes';\nimport { css } from 'lit-element';\nimport { html } from 'lit-html';\n\nimport {\n canGrantLevel,\n canGrantReadPreset,\n canGrantResend,\n getGrantable,\n parseScope,\n serializeScope,\n} from '../../../../../utils/invitation-scope';\n\ntype Preset = 'store' | 'read' | 'custom';\n\n/**\n * Lets an admin choose which scopes an invitation grants, offering only what the granting\n * user already holds.\n *\n * Bound to the invitation's `scope` string through `infer=\"scope\"`. The server is the real\n * enforcement boundary; this control exists so the UI\n * never offers a grant that would be rejected.\n *\n * @element foxy-internal-user-invitation-form-scope-control\n */\nexport class InternalUserInvitationFormScopeControl extends InternalEditableControl {\n static get properties(): PropertyDeclarations {\n return {\n ...super.properties,\n granterScope: { attribute: 'granter-scope' },\n __customSelected: { attribute: false },\n };\n }\n\n static get styles(): CSSResultArray {\n return [\n ...super.styles,\n css`\n /*\n * \\`foxy-internal-summary-control\\` puts \\`::slotted(*) { min-width: 100% }\\` on\n * whatever it slots, and (outside \\`layout=\"section\"\\`) a background/padding on each\n * slotted element too -- both aimed at a vertical list of full-width summary-items, and\n * both outside this control's reach: they're declared against the *slotted* elements\n * from the summary control's own shadow tree, not against anything inside this one, so\n * there is no selector this control's own \\`static styles\\` could write that would stop\n * a slotted element from being full-width, and the grid that would need a second\n * \\`grid-template-columns\\` track lives inside the summary control's own shadow root --\n * not reachable at all from here (confirmed: a \\`::slotted(*)\\` rule only ever targets\n * the slotted elements themselves, never the host's own internal structure around the\n * \\`<slot>\\`). So overriding a rule of ours against the slotted elements, per CSS\n * Scoping's normal-declarations-in-the-tree-the-element-lives-in-beat-::slotted()-rule\n * precedence, can only ever affect how each *individual* slotted box is sized -- it\n * cannot make the summary control itself lay two of them out side by side, because nothing\n * this control writes can reach that summary control's own internal grid container.\n *\n * So there is exactly one slotted child here: \\`.matrix\\`, a wrapper \\`<div>\\` (see\n * \\`renderControl\\`) that lays its own 20 real children out in a grid this control fully\n * owns. \\`layout=\"section\"\\` on the summary control (see \\`renderControl\\`) opts out of its\n * background/padding-on-slotted-child rule, since that would otherwise tint the *whole*\n * wrapper as one block; this control re-creates the summary-item tile look itself, on\n * each *individual* row, below.\n */\n .matrix {\n display: grid;\n grid-template-columns: minmax(0, 1fr);\n gap: 1px;\n border-radius: var(--lumo-border-radius);\n overflow: hidden;\n }\n\n @media all and (min-width: 640px) {\n .matrix {\n grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);\n }\n }\n\n /*\n * Each row is one \\`foxy-internal-select-control[layout=\"summary-item\"]\\`, a single\n * self-contained element (see \\`__renderLevelControl\\`) -- no more per-row wrapper,\n * sibling label, or separate checkbox. Its own background here (rather than\n * \\`::slotted(*)\\`'s, opted out of above) is what recreates the individual-tile look;\n * the 1px \\`.matrix\\` gap on top of \\`var(--lumo-contrast-10pct)\\` shows through between\n * every row *and* column as a hairline divider, in both directions -- a container-level\n * \\`divide-y\\` (this control's previous approach, before the summary-item rework) only\n * ever divides one axis, which draws a confusing line between the two columns' cells of\n * the same visual row; a grid gap does not have that problem.\n */\n .matrix > foxy-internal-select-control {\n background-color: var(--lumo-contrast-5pct);\n padding: calc(0.625em + (var(--lumo-border-radius) / 4) - 1px);\n }\n `,\n ];\n }\n\n /** Space-separated scope of the user creating or editing the invitation. */\n granterScope: string | null = null;\n\n /**\n * Set when the admin picks `Custom` explicitly. Needed because an empty scope parses to a\n * `null` preset, so without this the radio would snap back to nothing selected the moment\n * `Custom` was chosen but before any row was set.\n */\n private __customSelected = false;\n\n /**\n * Cached outcome of `__hasUnreachableGrant` from the most recently completed `renderControl()`\n * pass. Read by `updated()` below -- see its doc comment for why the lock needs to land on\n * `this.readonly` itself rather than staying a `renderControl()`-local variable.\n */\n private __isLocked = false;\n\n renderControl(): TemplateResult {\n const selection = parseScope(this.__scope);\n const grantable = getGrantable(this.granterScope ?? void 0);\n const currentPreset = this.__preset(selection);\n const presets: Preset[] = [];\n\n if (grantable.storeFullAccess) presets.push('store');\n if (canGrantReadPreset(grantable)) presets.push('read');\n presets.push('custom');\n\n // The invitation can already hold a preset this granter couldn't offer themselves --\n // e.g. a full-access admin created it, and a narrower admin is now editing it. Omitting\n // it would make an existing grant look like no grant at all, so it's still listed as an\n // option (the same treatment `__renderLevelControl` gives an out-of-reach row level) --\n // otherwise `summary-item`'s displayed value would fall back to its placeholder instead\n // of showing the invitation's actual preset. `custom` is always offered and `null`\n // selects nothing, so only `store` and `read` can end up here.\n const mismatchedPreset =\n currentPreset && !presets.includes(currentPreset) ? currentPreset : null;\n\n const renderedPresets: Preset[] = (['store', 'read', 'custom'] as const).filter(\n preset => presets.includes(preset) || preset === mismatchedPreset\n );\n\n // The invitation can hold a grant this granter cannot themselves re-grant (see\n // `__hasUnreachableGrant`, which treats a mismatched preset as grounds to lock on its\n // own). The API validates the *entire* submitted `scope` string\n // whenever it's dirty, not just the delta, so any edit here would re-serialize and\n // resubmit that out-of-reach value and the server would reject the whole save -- a\n // failure the admin cannot fix, because there is no way to *only* change the preset\n // without touching the rest. Locking the whole control instead means no edit, and\n // therefore no failing save, can be attempted. The out-of-reach value stays visible,\n // same as always -- only editability changes. Because a mismatched preset already forces\n // `isLocked` (and therefore `readonly`) below, no separate per-option disabling is needed\n // here either -- the same reasoning `__renderLevelControl` and `__renderResendSwitches`\n // already rely on for their own mismatches.\n const isLocked = this.__hasUnreachableGrant(selection, grantable, !!mismatchedPreset);\n\n // Read by `updated()` below -- see its doc comment for why the lock also needs to land on\n // the `readonly` *property* itself, not just this render pass's local variable.\n this.__isLocked = isLocked;\n\n const readonly = this.readonly || isLocked;\n const helperText = isLocked ? this.t('helper_text_locked') : this.helperText;\n\n const presetOptions: Option[] = renderedPresets.map(preset => ({\n label: `preset_${preset}`,\n value: preset,\n }));\n\n return html`\n <div class=\"grid gap-m\">\n <foxy-internal-summary-control infer=\"\" label=${this.label} helper-text=${helperText}>\n <foxy-internal-select-control\n layout=\"summary-item\"\n infer=\"\"\n label=${this.t('preset_label')}\n helper-text=\"\"\n data-preset=\"\"\n ?disabled=${this.disabled}\n ?readonly=${readonly}\n .options=${presetOptions}\n .getValue=${() => currentPreset ?? undefined}\n .setValue=${(newValue: unknown) => this.__selectPreset(newValue as Preset)}\n >\n </foxy-internal-select-control>\n </foxy-internal-summary-control>\n ${currentPreset === 'custom'\n ? html`\n <div class=\"matrix\">\n ${COLLECTIONS.map(collection =>\n this.__renderLevelControl(collection, selection, grantable, readonly)\n )}\n </div>\n ${this.__renderResendSwitches(selection, grantable, readonly)}\n `\n : ''}\n </div>\n `;\n }\n\n /**\n * Reflects a lock onto the real `readonly` property (in addition to whatever `updated()`\n * itself, e.g. `renderControl()`'s own `?readonly=` bindings, already did with the local\n * variable) once the initial render has committed.\n *\n * This exists because each row is now a nested `foxy-internal-select-control`.\n * `ConfigurableMixin` makes every such control infer its own `readonly` from the nearest\n * ancestor that has one (this control), by reading `this.readonly` directly during an async\n * walk (`InferrableMixin.inferFromElement`'s `key in element` check) -- not from whatever a\n * template attribute happened to bind on the row. That walk re-runs on every one of this\n * control's own updates (`InferrableMixin.updated()` calls `inferPropertiesInDescendants()`\n * unconditionally), so a row bound only via `?readonly=${this.readonly || isLocked}` in\n * `renderControl()` is overwritten back to whatever `this.readonly` was moments later --\n * confirmed empirically by a probe test, see this task's report. Setting `this.readonly`\n * itself is what the row's own inference actually reads, so this is not a workaround so much\n * as the property meaning what it says: locked really does mean the whole control, including\n * everything nested inside it, is readonly.\n *\n * Assigning inside `updated()` rather than `renderControl()`/`render()` matters too: mutating\n * a reactive property mid-render is what triggers lit's \"scheduled an update... during\n * update\" warning (and the `does not warn on a fresh empty-scope render` test would catch\n * it); `updated()` is the lifecycle hook lit itself documents for deriving follow-up state\n * from a completed render, and setting a property there does not warn.\n *\n * Never resets `this.readonly` back to `false` on its own -- the externally-imposed half\n * (e.g. the form's own `readonlycontrols` selector matching `scope`) is owned entirely by\n * `ConfigurableMixin`'s own inheritance, which keeps re-asserting its own value on every\n * update independently of this method.\n */\n updated(changes: Map<keyof this, unknown>): void {\n super.updated(changes);\n if (this.__isLocked && !this.readonly) this.readonly = true;\n }\n\n /**\n * `true` when the invitation already holds something this granter could not themselves\n * grant: the current preset isn't among the ones offered, a collection's current level\n * isn't grantable at that level, or a collection currently has a resend grant the granter\n * cannot extend. Reuses `canGrantLevel` / `canGrantResend` rather than reimplementing\n * grantability -- see `renderControl` for why this forces the whole control readonly.\n */\n private __hasUnreachableGrant(\n selection: Selection,\n grantable: ReturnType<typeof getGrantable>,\n hasMismatchedPreset: boolean\n ): boolean {\n if (hasMismatchedPreset) return true;\n\n const hasUnreachableLevel = COLLECTIONS.some(collection => {\n return !canGrantLevel(grantable, collection, selection.levels[collection] ?? 'none');\n });\n\n if (hasUnreachableLevel) return true;\n\n return selection.resend.some(collection => !canGrantResend(grantable, collection));\n }\n\n /**\n * Renders one collection's level picker as a self-contained `foxy-internal-select-control`\n * in `summary-item` layout: a native `<select>` with a real `<label for=\"select\">` (the\n * collection name, passed via `label`, replacing both the old sibling `foxy-i18n` and the\n * `aria-label` workaround that stood in for a proper accessible name before this control had\n * one) plus the current value shown as compact text. `data-collection` moves onto this\n * element directly -- there's no separate row wrapper left to carry it (see the control's\n * `styles` for why one output element per collection, not a wrapper `<div>` per row, is what\n * lets this control own its own two-column grid).\n */\n private __renderLevelControl(\n collection: string,\n selection: Selection,\n grantable: ReturnType<typeof getGrantable>,\n readonly: boolean\n ): TemplateResult {\n const allLevels: Level[] = ['none', 'read', 'full'];\n const currentLevel = selection.levels[collection] ?? 'none';\n\n // `stores_read` is what authorizes `GET /stores/{id}` and the `/stores` listing --\n // without it a user cannot load the store page or the store picker, so \"no store access\"\n // is not a real choice for this row going forward: this row's own select can only ever be\n // set to `read` or `full` from here on. This narrows what a user can newly *choose*, not\n // what a scope string already contains -- an invitation whose stores row has simply never\n // been touched (imported via the API, or edited only through a different row) still\n // parses `stores` as `none` and is written that way; see `mismatchedLevel` below for how\n // that value stays displayable without being treated as an unreachable grant.\n const offerable: Level[] = collection === 'stores' ? ['read', 'full'] : allLevels;\n const available = offerable.filter(level => canGrantLevel(grantable, collection, level));\n\n // The option list must be the grantable levels for this row, PLUS the row's current level\n // if it is not grantable/offerable. `vaadin-combo-box` reconciles its displayed value\n // against `.items` on every `.value`/`.items` change (verified directly, see the control's\n // test suite and this task's report), and the native `<select>` `summary-item` renders\n // behaves the same way for an unlisted `<option>` -- an out-of-reach current level not\n // present in `.options` would fail to display at all. `none` is always grantable (see\n // `canGrantLevel`), so for every collection except `stores` only `read` or `full` can end\n // up here as a mismatch -- but a legacy or API-created invitation can hold no `stores_*`\n // tokens at all, which parses to `none`, and `none` is no longer offerable for that one\n // row, so `none` itself can be the mismatch there.\n //\n // No per-option disabling is needed for a level the granter truly cannot re-grant:\n // `__hasUnreachableGrant` already forces the *entire* control readonly the instant any row\n // holds such a level, so that kind of mismatch can only ever be rendered while the whole\n // row control is already readonly. The `stores` row's own `none` mismatch is different --\n // `canGrantLevel` returns `true` unconditionally for `'none'` (see `invitation-scope.ts`),\n // so it is a *legal* grant the granter could re-issue, not an unreachable one. It does not\n // trip `__hasUnreachableGrant`, and is rendered editable while the rest of the control\n // stays unlocked (pinned by this control's own test suite: \"does not lock the control\n // merely because the stores row is at its mismatched-but-grantable none\"). Either way, the\n // out-of-reach value is simply the control's value.\n const mismatchedLevel = available.includes(currentLevel) ? null : currentLevel;\n\n // Filtered from `allLevels`, not the narrowed `offerable` list: for the `stores` row,\n // `none` was removed from `offerable` above, but an invitation with no `stores_*` tokens\n // still parses its current level as `none`. Filtering from `offerable` here would drop\n // `none` from the rendered options even when it's `mismatchedLevel`, leaving the select's\n // value absent from its own option list -- the same \"current value must stay a real\n // option\" rule as the `mismatchedLevel` fallback right above, just applied one filter\n // earlier where a narrower source list can undo it.\n const renderedLevels = allLevels.filter(\n level => available.includes(level) || level === mismatchedLevel\n );\n\n const options: Option[] = renderedLevels.map(level => ({\n label: `level_${level}`,\n value: level,\n }));\n\n return html`\n <foxy-internal-select-control\n layout=\"summary-item\"\n infer=\"\"\n label=${this.t(`scopes.${collection}`)}\n helper-text=\"\"\n data-collection=${collection}\n ?disabled=${this.disabled}\n ?readonly=${readonly}\n .options=${options}\n .getValue=${() => currentLevel}\n .setValue=${(newValue: unknown) => {\n // The native `<select>` `summary-item` renders always has a real selection (its\n // first, disabled placeholder `<option>` aside) once a value is set, so there is no\n // \"clear\" affordance to coerce here the way the old vaadin-combo-box row needed --\n // kept anyway as the same defensive floor: there is no \"no level\" state for a row,\n // and this must never let an empty/undefined token reach the serialized scope.\n this.__setLevel(collection, ((newValue as string) || 'none') as Level);\n }}\n >\n </foxy-internal-select-control>\n `;\n }\n\n /**\n * Renders the three resendable collections' resend grants as `foxy-internal-switch-control`s,\n * one per line, in their own `foxy-internal-summary-control` -- not folded into the level\n * grid above. Resend is a secondary, independent axis (a collection's level and its resend\n * grant are unrelated tokens -- see `parseScope`/`serializeScope`), covers only 3 of the 20\n * collections, and doesn't need the level grid's two-column treatment; keeping it as its own\n * section also means the grid's CSS (sized for 20 short rows) never has to accommodate a\n * structurally different kind of row. Renders nothing at all if the granter can't grant (and\n * the invitation doesn't already hold) any resend permission, rather than an empty section.\n */\n private __renderResendSwitches(\n selection: Selection,\n grantable: ReturnType<typeof getGrantable>,\n readonly: boolean\n ): TemplateResult | string {\n const switches = RESENDABLE.map(collection => {\n const hasResend = selection.resend.includes(collection);\n const canResend = canGrantResend(grantable, collection);\n\n // Mirrors the level mismatch in `__renderLevelControl`: the invitation can already carry\n // a resend grant this granter can no longer extend themselves. Unlike the level mismatch,\n // this needs no *separate* `disabled` condition below -- `__hasUnreachableGrant` already\n // treats any resend mismatch as grounds to lock the *entire* control (see its own return\n // statement), so `mismatchedResend` and this control's own `readonly` are never true/false\n // independently of each other; adding a redundant `?disabled=` term here would only be\n // exercising `foxy-internal-switch-control`'s `disabled` -- a `ConfigurableMixin`-inferred\n // property subject to the exact same ancestor-inference-can-overwrite-a-template-binding\n // risk documented on this control's own `updated()`, for a case that can't actually occur.\n const mismatchedResend = hasResend && !canResend;\n\n return { collection, hasResend, mismatchedResend, show: canResend || mismatchedResend };\n }).filter(entry => entry.show);\n\n if (!switches.length) return '';\n\n return html`\n <foxy-internal-summary-control infer=\"\" label=\"\" helper-text=\"\">\n ${switches.map(\n ({ collection, hasResend }) => html`\n <foxy-internal-switch-control\n infer=\"\"\n label=${`${this.t('resend')} ${this.t(`scopes.${collection}`).toLowerCase()}`}\n helper-text=\"\"\n data-resend=${collection}\n ?disabled=${this.disabled}\n ?readonly=${readonly}\n .getValue=${() => hasResend}\n .setValue=${(newValue: unknown) => this.__setResend(collection, !!newValue)}\n >\n </foxy-internal-switch-control>\n `\n )}\n </foxy-internal-summary-control>\n `;\n }\n\n private __setLevel(collection: string, level: Level): void {\n // Touching a row is proof the admin is actively editing in custom mode. Without this, an\n // edit that happens to make the selection match another preset (e.g. the last collection\n // reaching `read`) would make `__preset` fall back to `parseScope`'s classification and the\n // matrix would vanish out from under the admin mid-edit.\n this.__customSelected = true;\n\n const selection = parseScope(this.__scope);\n selection.levels[collection] = level;\n this._value = serializeScope({ ...selection, preset: 'custom' });\n }\n\n private __setResend(collection: string, checked: boolean): void {\n this.__customSelected = true;\n\n const selection = parseScope(this.__scope);\n\n const resend = checked\n ? [...selection.resend, collection]\n : selection.resend.filter(entry => entry !== collection);\n\n this._value = serializeScope({ ...selection, preset: 'custom', resend });\n }\n\n /**\n * The scope currently in the form. Undefined before the first edit on a new invitation.\n * An existing invitation saved without a scope grants full store access in the API, so it\n * reads as the wildcard here instead of as \"nothing chosen\".\n */\n private get __scope(): string | undefined {\n const scope = (this._value as string | undefined) ?? void 0;\n if (!scope?.trim() && this.nucleon?.data) return 'store_full_access';\n return scope;\n }\n\n private __preset(selection: Selection): Preset | null {\n if (this.__customSelected) return 'custom';\n return selection.preset;\n }\n\n private __selectPreset(preset: Preset): void {\n this.__customSelected = preset === 'custom';\n\n // Choosing Custom keeps whatever is already in the form, so the matrix opens on the\n // current grant rather than wiping it. The wildcard has no per-row levels, so it is\n // expanded into what it grants -- every collection at Full and every resend. Keeping\n // `store_full_access` behind rows that all read None would save a full-access invitation.\n if (preset === 'custom') {\n const selection = parseScope(this.__scope);\n if (selection.preset !== 'store') return;\n\n COLLECTIONS.forEach(collection => (selection.levels[collection] = 'full'));\n this._value = serializeScope({ ...selection, preset: 'custom', resend: [...RESENDABLE] });\n return;\n }\n\n if (preset === 'store') {\n this._value = 'store_full_access';\n } else {\n const selection = parseScope('');\n COLLECTIONS.forEach(collection => (selection.levels[collection] = 'read'));\n this._value = serializeScope(selection);\n }\n }\n}\n"]}
@@ -0,0 +1,6 @@
1
+ import '../../../../internal/InternalEditableControl/index';
2
+ import '../../../../internal/InternalSelectControl/index';
3
+ import '../../../../internal/InternalSummaryControl/index';
4
+ import '../../../../internal/InternalSwitchControl/index';
5
+ import { InternalUserInvitationFormScopeControl as Control } from './InternalUserInvitationFormScopeControl';
6
+ export { Control as InternalUserInvitationFormScopeControl };
@@ -0,0 +1,8 @@
1
+ import "../../../../internal/InternalEditableControl/index.js";
2
+ import "../../../../internal/InternalSelectControl/index.js";
3
+ import "../../../../internal/InternalSummaryControl/index.js";
4
+ import "../../../../internal/InternalSwitchControl/index.js";
5
+ import { InternalUserInvitationFormScopeControl as Control } from "./InternalUserInvitationFormScopeControl.js";
6
+ customElements.define('foxy-internal-user-invitation-form-scope-control', Control);
7
+ export { Control as InternalUserInvitationFormScopeControl };
8
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/elements/public/UserInvitationForm/internal/InternalUserInvitationFormScopeControl/index.ts"],"names":[],"mappings":"AAAA,+DAA4D;AAC5D,6DAA0D;AAC1D,8DAA2D;AAC3D,6DAA0D;AAE1D,OAAO,EAAE,sCAAsC,IAAI,OAAO,EAAE,oDAAiD;AAE7G,cAAc,CAAC,MAAM,CAAC,kDAAkD,EAAE,OAAO,CAAC,CAAC;AAEnF,OAAO,EAAE,OAAO,IAAI,sCAAsC,EAAE,CAAC","sourcesContent":["import '../../../../internal/InternalEditableControl/index';\nimport '../../../../internal/InternalSelectControl/index';\nimport '../../../../internal/InternalSummaryControl/index';\nimport '../../../../internal/InternalSwitchControl/index';\n\nimport { InternalUserInvitationFormScopeControl as Control } from './InternalUserInvitationFormScopeControl';\n\ncustomElements.define('foxy-internal-user-invitation-form-scope-control', Control);\n\nexport { Control as InternalUserInvitationFormScopeControl };\n"]}
@@ -1,3 +1,5 @@
1
1
  import type { Resource } from '@foxy.io/sdk/core';
2
2
  import type { Rels } from '@foxy.io/sdk/backend';
3
- export declare type Data = Resource<Rels.UserInvitation>;
3
+ export declare type Data = Resource<Rels.UserInvitation> & {
4
+ scope?: string;
5
+ };
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/elements/public/UserInvitationForm/types.ts"],"names":[],"mappings":"","sourcesContent":["import type { Resource } from '@foxy.io/sdk/core';\nimport type { Rels } from '@foxy.io/sdk/backend';\n\nexport type Data = Resource<Rels.UserInvitation>;\n"]}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/elements/public/UserInvitationForm/types.ts"],"names":[],"mappings":"","sourcesContent":["import type { Resource } from '@foxy.io/sdk/core';\nimport type { Rels } from '@foxy.io/sdk/backend';\n\n// TODO: drop this augmentation once @foxy.io/sdk ships `scope` on fx:user_invitation\n// (added on the SDK's feat/user-invitation-scope-type branch) and this package's\n// dependency is bumped past ^1.16.2. `scope` is optional so an API predating the field\n// leaves the control empty rather than submitting `undefined`.\nexport type Data = Resource<Rels.UserInvitation> & { scope?: string };\n"]}
@@ -16,6 +16,7 @@ export class UsersTable extends TranslatableMixin(Table, 'users-table') {
16
16
  render() {
17
17
  return html `
18
18
  <foxy-form-dialog
19
+ .currentUserScope=${this.currentUserScope}
19
20
  parent=${this.href}
20
21
  form="foxy-user-form"
21
22
  lang=${this.lang}
@@ -1 +1 @@
1
- {"version":3,"file":"UsersTable.js","sourceRoot":"","sources":["../../../../src/elements/public/UsersTable/UsersTable.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,IAAI,EAAE,MAAM,aAAa,CAAC;AAMnD,OAAO,EAAE,KAAK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,QAAQ,KAAK,QAAQ,CAAE,CAAC,IAAI;;aAEzD,CACF;;OAEJ,CAAC;IACJ,CAAC;CACF,CAAC;AAEK,4BAAiB,GAAiB;IACvC,SAAS,EAAE,IAAI;IACf,IAAI,EAAE,GAAG,CAAC,EAAE,CAAC,IAAI,CAAA;;;oBAGD,IAAI,CAAC,SAAS,CAAC,EAAE,KAAK,EAAE,GAAG,CAAC,IAAI,CAAC,aAAa,EAAE,CAAC;iBACpD,GAAG,CAAC,IAAI;;eAEV,GAAG,CAAC,EAAE;;;;;oBAKD,IAAI,CAAC,SAAS,CAAC,EAAE,KAAK,EAAE,GAAG,CAAC,IAAI,CAAC,aAAa,EAAE,CAAC;iBACpD,GAAG,CAAC,IAAI;;eAEV,GAAG,CAAC,EAAE;;;;KAIhB;CACF,CAAC;AAEK,wBAAa,GAAiB;IACnC,IAAI,EAAE,GAAG,CAAC,EAAE,CAAC,IAAI,CAAA;;;;iBAIJ,CAAC,GAAgB,EAAE,EAAE;QAC5B,MAAM,MAAM,GAAG,GAAG,CAAC,MAAuB,CAAC;QAC3C,MAAM,IAAI,GAAG,MAAM,CAAC,WAAW,EAAgB,CAAC;QAChD,MAAM,IAAI,GAAG,IAAI,CAAC,aAAa,CAAC,OAAO,CAAe,CAAC;QAEvD,IAAI,CAAC,IAAI,GAAG,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC;QACtC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACpB,CAAC;;0BAEiB,GAAG,CAAC,IAAI,oBAAoB,GAAG,CAAC,EAAE;;KAEvD;CACF,CAAC","sourcesContent":["import { TemplateResult, html } from 'lit-element';\n\nimport { ButtonElement } from '@vaadin/vaadin-button';\nimport { Column } from '../Table/types';\nimport { Data } from './types';\nimport { FormDialog } from '../FormDialog/FormDialog';\nimport { Table } from '../Table/Table';\nimport { TranslatableMixin } from '../../../mixins/translatable';\nimport { roles } from './roles';\n\nexport class UsersTable extends TranslatableMixin(Table, 'users-table')<Data> {\n static nameColumn: Column<Data> = {\n cell: ctx => html`\n <span data-testclass=\"name\" class=\"text-m font-medium\">\n ${ctx.data.first_name} ${ctx.data.last_name}\n </span>\n `,\n };\n\n static emailColumn: Column<Data> = {\n hideBelow: 'md',\n cell: ctx => html`\n <span data-testclass=\"email\" class=\"text-m text-secondary\">${ctx.data.email}</span>\n `,\n };\n\n static rolesColumn: Column<Data> = {\n cell: ctx => {\n const props = [\n 'is_merchant',\n 'is_programmer',\n 'is_front_end_developer',\n 'is_designer',\n ] as const;\n\n return html`\n <div data-testclass=\"roles\" class=\"flex space-x-s\">\n ${props.map(\n property => html`\n <div\n class=${ctx.data[property] ? '' : 'text-disabled'}\n style=\"width: 1rem; height: 1rem;\"\n >\n ${roles.find(role => role.property === property)!.icon}\n </div>\n `\n )}\n </div>\n `;\n },\n };\n\n static lastUpdatedColumn: Column<Data> = {\n hideBelow: 'lg',\n cell: ctx => html`\n <span data-testclass=\"lastUpdated\" class=\"text-m text-secondary font-tnum\">\n <foxy-i18n\n options=${JSON.stringify({ value: ctx.data.date_modified })}\n lang=${ctx.lang}\n key=\"date\"\n ns=${ctx.ns}\n >\n </foxy-i18n>\n\n <foxy-i18n\n options=${JSON.stringify({ value: ctx.data.date_modified })}\n lang=${ctx.lang}\n key=\"time\"\n ns=${ctx.ns}\n >\n </foxy-i18n>\n </span>\n `,\n };\n\n static actionsColumn: Column<Data> = {\n cell: ctx => html`\n <vaadin-button\n data-testclass=\"actions\"\n theme=\"tertiary small\"\n @click=${(evt: CustomEvent) => {\n const button = evt.target as ButtonElement;\n const root = button.getRootNode() as ShadowRoot;\n const form = root.querySelector('#form') as FormDialog;\n\n form.href = ctx.data._links.self.href;\n form.show(button);\n }}\n >\n <foxy-i18n lang=${ctx.lang} key=\"update\" ns=${ctx.ns}></foxy-i18n>\n </vaadin-button>\n `,\n };\n\n columns = [\n UsersTable.nameColumn,\n UsersTable.emailColumn,\n UsersTable.rolesColumn,\n UsersTable.lastUpdatedColumn,\n UsersTable.actionsColumn,\n ];\n\n render(): TemplateResult {\n return html`\n <foxy-form-dialog\n parent=${this.href}\n form=\"foxy-user-form\"\n lang=${this.lang}\n ns=${this.ns}\n id=\"form\"\n >\n </foxy-form-dialog>\n\n ${super.render()}\n `;\n }\n}\n"]}
1
+ {"version":3,"file":"UsersTable.js","sourceRoot":"","sources":["../../../../src/elements/public/UsersTable/UsersTable.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,IAAI,EAAE,MAAM,aAAa,CAAC;AAMnD,OAAO,EAAE,KAAK,EAAE,0BAAuB;AACvC,OAAO,EAAE,iBAAiB,EAAE,wCAAqC;AACjE,OAAO,EAAE,KAAK,EAAE,mBAAgB;AAEhC,MAAM,OAAO,UAAW,SAAQ,iBAAiB,CAAC,KAAK,EAAE,aAAa,CAAO;IAA7E;;QAoFE,YAAO,GAAG;YACR,UAAU,CAAC,UAAU;YACrB,UAAU,CAAC,WAAW;YACtB,UAAU,CAAC,WAAW;YACtB,UAAU,CAAC,iBAAiB;YAC5B,UAAU,CAAC,aAAa;SACzB,CAAC;IAiBJ,CAAC;IAfC,MAAM;QACJ,OAAO,IAAI,CAAA;;4BAEa,IAAI,CAAC,gBAAgB;iBAChC,IAAI,CAAC,IAAI;;eAEX,IAAI,CAAC,IAAI;aACX,IAAI,CAAC,EAAE;;;;;QAKZ,KAAK,CAAC,MAAM,EAAE;KACjB,CAAC;IACJ,CAAC;;AAzGM,qBAAU,GAAiB;IAChC,IAAI,EAAE,GAAG,CAAC,EAAE,CAAC,IAAI,CAAA;;UAEX,GAAG,CAAC,IAAI,CAAC,UAAU,IAAI,GAAG,CAAC,IAAI,CAAC,SAAS;;KAE9C;CACF,CAAC;AAEK,sBAAW,GAAiB;IACjC,SAAS,EAAE,IAAI;IACf,IAAI,EAAE,GAAG,CAAC,EAAE,CAAC,IAAI,CAAA;mEAC8C,GAAG,CAAC,IAAI,CAAC,KAAK;KAC5E;CACF,CAAC;AAEK,sBA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,CAAC,IAAI,CAAC,IAAI,CAAC;QACtC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACpB,CAAC;;0BAEiB,GAAG,CAAC,IAAI,oBAAoB,GAAG,CAAC,EAAE;;KAEvD;CACF,CAAC","sourcesContent":["import { TemplateResult, html } from 'lit-element';\n\nimport { ButtonElement } from '@vaadin/vaadin-button';\nimport { Column } from '../Table/types';\nimport { Data } from './types';\nimport { FormDialog } from '../FormDialog/FormDialog';\nimport { Table } from '../Table/Table';\nimport { TranslatableMixin } from '../../../mixins/translatable';\nimport { roles } from './roles';\n\nexport class UsersTable extends TranslatableMixin(Table, 'users-table')<Data> {\n static nameColumn: Column<Data> = {\n cell: ctx => html`\n <span data-testclass=\"name\" class=\"text-m font-medium\">\n ${ctx.data.first_name} ${ctx.data.last_name}\n </span>\n `,\n };\n\n static emailColumn: Column<Data> = {\n hideBelow: 'md',\n cell: ctx => html`\n <span data-testclass=\"email\" class=\"text-m text-secondary\">${ctx.data.email}</span>\n `,\n };\n\n static rolesColumn: Column<Data> = {\n cell: ctx => {\n const props = [\n 'is_merchant',\n 'is_programmer',\n 'is_front_end_developer',\n 'is_designer',\n ] as const;\n\n return html`\n <div data-testclass=\"roles\" class=\"flex space-x-s\">\n ${props.map(\n property => html`\n <div\n class=${ctx.data[property] ? '' : 'text-disabled'}\n style=\"width: 1rem; height: 1rem;\"\n >\n ${roles.find(role => role.property === property)!.icon}\n </div>\n `\n )}\n </div>\n `;\n },\n };\n\n static lastUpdatedColumn: Column<Data> = {\n hideBelow: 'lg',\n cell: ctx => html`\n <span data-testclass=\"lastUpdated\" class=\"text-m text-secondary font-tnum\">\n <foxy-i18n\n options=${JSON.stringify({ value: ctx.data.date_modified })}\n lang=${ctx.lang}\n key=\"date\"\n ns=${ctx.ns}\n >\n </foxy-i18n>\n\n <foxy-i18n\n options=${JSON.stringify({ value: ctx.data.date_modified })}\n lang=${ctx.lang}\n key=\"time\"\n ns=${ctx.ns}\n >\n </foxy-i18n>\n </span>\n `,\n };\n\n static actionsColumn: Column<Data> = {\n cell: ctx => html`\n <vaadin-button\n data-testclass=\"actions\"\n theme=\"tertiary small\"\n @click=${(evt: CustomEvent) => {\n const button = evt.target as ButtonElement;\n const root = button.getRootNode() as ShadowRoot;\n const form = root.querySelector('#form') as FormDialog;\n\n form.href = ctx.data._links.self.href;\n form.show(button);\n }}\n >\n <foxy-i18n lang=${ctx.lang} key=\"update\" ns=${ctx.ns}></foxy-i18n>\n </vaadin-button>\n `,\n };\n\n columns = [\n UsersTable.nameColumn,\n UsersTable.emailColumn,\n UsersTable.rolesColumn,\n UsersTable.lastUpdatedColumn,\n UsersTable.actionsColumn,\n ];\n\n render(): TemplateResult {\n return html`\n <foxy-form-dialog\n .currentUserScope=${this.currentUserScope}\n parent=${this.href}\n form=\"foxy-user-form\"\n lang=${this.lang}\n ns=${this.ns}\n id=\"form\"\n >\n </foxy-form-dialog>\n\n ${super.render()}\n `;\n }\n}\n"]}