@aglyn/plugins-commerce 1.0.0-beta.285 → 1.0.0-beta.287

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 (420) hide show
  1. package/README.md +1 -1
  2. package/package.json +13 -13
  3. package/src/lib/components/cart.js +25 -12
  4. package/src/lib/components/cart.js.map +1 -1
  5. package/src/lib/components/commerce-console-page.js +70 -13
  6. package/src/lib/components/commerce-console-page.js.map +1 -1
  7. package/src/lib/components/console/order-detail-dialog.component.js +2 -1
  8. package/src/lib/components/console/order-detail-dialog.component.js.map +1 -1
  9. package/src/lib/components/console/payment-methods-card.component.js +1 -1
  10. package/src/lib/components/console/payment-methods-card.component.js.map +1 -1
  11. package/src/lib/components/console/pos/pos-cart-panel.component.d.ts +5 -0
  12. package/src/lib/components/console/pos/pos-cart-panel.component.js +18 -12
  13. package/src/lib/components/console/pos/pos-cart-panel.component.js.map +1 -1
  14. package/src/lib/components/console/pos/pos-hardware-api.d.ts +76 -5
  15. package/src/lib/components/console/pos/pos-hardware-api.js +53 -11
  16. package/src/lib/components/console/pos/pos-hardware-api.js.map +1 -1
  17. package/src/lib/components/console/pos/pos-hardware-buyer.component.d.ts +18 -0
  18. package/src/lib/components/console/pos/pos-hardware-buyer.component.js +629 -0
  19. package/src/lib/components/console/pos/pos-hardware-buyer.component.js.map +1 -0
  20. package/src/lib/components/console/pos/pos-hardware-sale-api.d.ts +162 -0
  21. package/src/lib/components/console/pos/pos-hardware-sale-api.js +122 -0
  22. package/src/lib/components/console/pos/pos-hardware-sale-api.js.map +1 -0
  23. package/src/lib/components/console/pos/pos-hardware-sale-terms.component.d.ts +39 -0
  24. package/src/lib/components/console/pos/pos-hardware-sale-terms.component.js +251 -0
  25. package/src/lib/components/console/pos/pos-hardware-sale-terms.component.js.map +1 -0
  26. package/src/lib/components/console/pos/use-pos-display.js +50 -0
  27. package/src/lib/components/console/pos/use-pos-display.js.map +1 -1
  28. package/src/lib/components/console/pos-cellular-control.component.d.ts +41 -0
  29. package/src/lib/components/console/pos-cellular-control.component.js +211 -0
  30. package/src/lib/components/console/pos-cellular-control.component.js.map +1 -0
  31. package/src/lib/components/console/pos-devices-card.component.d.ts +9 -1
  32. package/src/lib/components/console/pos-devices-card.component.js +47 -15
  33. package/src/lib/components/console/pos-devices-card.component.js.map +1 -1
  34. package/src/lib/components/console/pos-display/pos-display-api.d.ts +6 -0
  35. package/src/lib/components/console/pos-display/pos-display-api.js +8 -1
  36. package/src/lib/components/console/pos-display/pos-display-api.js.map +1 -1
  37. package/src/lib/components/console/pos-display-page.component.d.ts +13 -0
  38. package/src/lib/components/console/pos-display-page.component.js +44 -2
  39. package/src/lib/components/console/pos-display-page.component.js.map +1 -1
  40. package/src/lib/components/console/pos-hardware-card.component.d.ts +12 -4
  41. package/src/lib/components/console/pos-hardware-card.component.js +157 -36
  42. package/src/lib/components/console/pos-hardware-card.component.js.map +1 -1
  43. package/src/lib/components/console/pos-hardware-orders-staff-page.component.js +360 -80
  44. package/src/lib/components/console/pos-hardware-orders-staff-page.component.js.map +1 -1
  45. package/src/lib/components/console/pos-hardware-terms-page.component.d.ts +34 -0
  46. package/src/lib/components/console/pos-hardware-terms-page.component.js +257 -0
  47. package/src/lib/components/console/pos-hardware-terms-page.component.js.map +1 -0
  48. package/src/lib/components/console/pos-hardware-terms-sign-page.component.d.ts +27 -0
  49. package/src/lib/components/console/pos-hardware-terms-sign-page.component.js +104 -0
  50. package/src/lib/components/console/pos-hardware-terms-sign-page.component.js.map +1 -0
  51. package/src/lib/components/console/pos-hardware-waiting-card.component.d.ts +24 -0
  52. package/src/lib/components/console/pos-hardware-waiting-card.component.js +205 -0
  53. package/src/lib/components/console/pos-hardware-waiting-card.component.js.map +1 -0
  54. package/src/lib/components/console/pos-ops/pos-check-in-dialog.component.js +297 -201
  55. package/src/lib/components/console/pos-ops/pos-check-in-dialog.component.js.map +1 -1
  56. package/src/lib/components/console/pos-ops/pos-check-ins-card.component.d.ts +3 -0
  57. package/src/lib/components/console/pos-ops/pos-check-ins-card.component.js +260 -92
  58. package/src/lib/components/console/pos-ops/pos-check-ins-card.component.js.map +1 -1
  59. package/src/lib/components/console/pos-ops/pos-operations-bar.component.d.ts +9 -0
  60. package/src/lib/components/console/pos-ops/pos-operations-bar.component.js +15 -6
  61. package/src/lib/components/console/pos-ops/pos-operations-bar.component.js.map +1 -1
  62. package/src/lib/components/console/pos-ops/pos-rain-check-dialog.component.d.ts +25 -0
  63. package/src/lib/components/console/pos-ops/pos-rain-check-dialog.component.js +136 -0
  64. package/src/lib/components/console/pos-ops/pos-rain-check-dialog.component.js.map +1 -0
  65. package/src/lib/components/console/pos-ops/pos-shift-panel.component.d.ts +6 -0
  66. package/src/lib/components/console/pos-ops/pos-shift-panel.component.js +48 -31
  67. package/src/lib/components/console/pos-ops/pos-shift-panel.component.js.map +1 -1
  68. package/src/lib/components/console/pos-page.component.d.ts +1 -1
  69. package/src/lib/components/console/pos-page.component.js +63 -12
  70. package/src/lib/components/console/pos-page.component.js.map +1 -1
  71. package/src/lib/components/console/pos-reader-splash-setting.component.js +1 -1
  72. package/src/lib/components/console/pos-reader-splash-setting.component.js.map +1 -1
  73. package/src/lib/components/console/product-check-in-fields.component.d.ts +4 -2
  74. package/src/lib/components/console/product-check-in-fields.component.js +60 -14
  75. package/src/lib/components/console/product-check-in-fields.component.js.map +1 -1
  76. package/src/lib/components/console/product-editor-dialog.component.js +44 -1
  77. package/src/lib/components/console/product-editor-dialog.component.js.map +1 -1
  78. package/src/lib/components/console/product-hardware-sku-field.component.d.ts +19 -0
  79. package/src/lib/components/console/product-hardware-sku-field.component.js +92 -0
  80. package/src/lib/components/console/product-hardware-sku-field.component.js.map +1 -0
  81. package/src/lib/components/console/product-kiosk-offer-field.component.d.ts +22 -0
  82. package/src/lib/components/console/product-kiosk-offer-field.component.js +94 -0
  83. package/src/lib/components/console/product-kiosk-offer-field.component.js.map +1 -0
  84. package/src/lib/components/console/product-register-fields.component.d.ts +4 -0
  85. package/src/lib/components/console/product-register-fields.component.js +31 -2
  86. package/src/lib/components/console/product-register-fields.component.js.map +1 -1
  87. package/src/lib/components/console/products-hub-card.component.js +11 -2
  88. package/src/lib/components/console/products-hub-card.component.js.map +1 -1
  89. package/src/lib/components/console/register-hardware-card.component.d.ts +11 -0
  90. package/src/lib/components/console/register-hardware-card.component.js +56 -27
  91. package/src/lib/components/console/register-hardware-card.component.js.map +1 -1
  92. package/src/lib/components/console/reservation-guests-dialog.component.d.ts +28 -0
  93. package/src/lib/components/console/reservation-guests-dialog.component.js +189 -0
  94. package/src/lib/components/console/reservation-guests-dialog.component.js.map +1 -0
  95. package/src/lib/components/console/reservations-card.component.d.ts +9 -0
  96. package/src/lib/components/console/reservations-card.component.js +158 -23
  97. package/src/lib/components/console/reservations-card.component.js.map +1 -1
  98. package/src/lib/components/console/shippingeasy-card.component.js +1 -1
  99. package/src/lib/components/console/shippingeasy-card.component.js.map +1 -1
  100. package/src/lib/components/console/shipstation-card.component.d.ts +1 -1
  101. package/src/lib/components/console/shipstation-card.component.js +3 -3
  102. package/src/lib/components/console/shipstation-card.component.js.map +1 -1
  103. package/src/lib/components/product-detail.d.ts +4 -0
  104. package/src/lib/components/product-detail.js +40 -5
  105. package/src/lib/components/product-detail.js.map +1 -1
  106. package/src/lib/components/product-reviews.js +28 -11
  107. package/src/lib/components/product-reviews.js.map +1 -1
  108. package/src/lib/components/reservation-widget.js +28 -5
  109. package/src/lib/components/reservation-widget.js.map +1 -1
  110. package/src/lib/components/use-day-picker.d.ts +25 -0
  111. package/src/lib/components/use-day-picker.js +57 -0
  112. package/src/lib/components/use-day-picker.js.map +1 -0
  113. package/src/lib/constants/operator-alerts.d.ts +55 -0
  114. package/src/lib/constants/operator-alerts.js +156 -1
  115. package/src/lib/constants/operator-alerts.js.map +1 -1
  116. package/src/lib/declarations.console-server.js +54 -1
  117. package/src/lib/declarations.console-server.js.map +1 -1
  118. package/src/lib/declarations.d.ts +4 -2
  119. package/src/lib/declarations.js +11 -4
  120. package/src/lib/declarations.js.map +1 -1
  121. package/src/lib/declarations.server.js +9 -0
  122. package/src/lib/declarations.server.js.map +1 -1
  123. package/src/lib/model/commerce-cart.d.ts +9 -1
  124. package/src/lib/model/commerce-cart.js +4 -3
  125. package/src/lib/model/commerce-cart.js.map +1 -1
  126. package/src/lib/model/commerce-check-in-product.d.ts +26 -0
  127. package/src/lib/model/commerce-check-in-product.js +64 -2
  128. package/src/lib/model/commerce-check-in-product.js.map +1 -1
  129. package/src/lib/model/commerce-check-in-record.d.ts +127 -0
  130. package/src/lib/model/commerce-check-in-record.js +36 -0
  131. package/src/lib/model/commerce-check-in-record.js.map +1 -0
  132. package/src/lib/model/commerce-check-in.d.ts +91 -87
  133. package/src/lib/model/commerce-check-in.js +186 -62
  134. package/src/lib/model/commerce-check-in.js.map +1 -1
  135. package/src/lib/model/commerce-kiosk-offer.d.ts +31 -0
  136. package/src/lib/model/commerce-kiosk-offer.js +35 -0
  137. package/src/lib/model/commerce-kiosk-offer.js.map +1 -0
  138. package/src/lib/model/commerce-orders.d.ts +76 -0
  139. package/src/lib/model/commerce-orders.js +6 -0
  140. package/src/lib/model/commerce-orders.js.map +1 -1
  141. package/src/lib/model/commerce-pos-day-report.d.ts +54 -1
  142. package/src/lib/model/commerce-pos-day-report.js +39 -2
  143. package/src/lib/model/commerce-pos-day-report.js.map +1 -1
  144. package/src/lib/model/commerce-pos-offline.d.ts +1 -1
  145. package/src/lib/model/commerce-pos-offline.js +6 -1
  146. package/src/lib/model/commerce-pos-offline.js.map +1 -1
  147. package/src/lib/model/commerce-pos-ops.js +3 -2
  148. package/src/lib/model/commerce-pos-ops.js.map +1 -1
  149. package/src/lib/model/commerce-pos.d.ts +36 -3
  150. package/src/lib/model/commerce-pos.js +14 -6
  151. package/src/lib/model/commerce-pos.js.map +1 -1
  152. package/src/lib/model/commerce-receipt.js +3 -2
  153. package/src/lib/model/commerce-receipt.js.map +1 -1
  154. package/src/lib/model/commerce-reservations.d.ts +69 -4
  155. package/src/lib/model/commerce-reservations.js +57 -5
  156. package/src/lib/model/commerce-reservations.js.map +1 -1
  157. package/src/lib/model/commerce.d.ts +66 -0
  158. package/src/lib/model/commerce.js +15 -0
  159. package/src/lib/model/commerce.js.map +1 -1
  160. package/src/lib/model/order-list-fields.d.ts +11 -0
  161. package/src/lib/model/order-list-fields.js +17 -1
  162. package/src/lib/model/order-list-fields.js.map +1 -1
  163. package/src/lib/model/own-store-tax-summary.d.ts +152 -0
  164. package/src/lib/model/own-store-tax-summary.js +288 -0
  165. package/src/lib/model/own-store-tax-summary.js.map +1 -0
  166. package/src/lib/model/plugin-permissions.d.ts +67 -0
  167. package/src/lib/model/plugin-permissions.js +224 -7
  168. package/src/lib/model/plugin-permissions.js.map +1 -1
  169. package/src/lib/model/pos-cellular.d.ts +223 -0
  170. package/src/lib/model/pos-cellular.js +293 -0
  171. package/src/lib/model/pos-cellular.js.map +1 -0
  172. package/src/lib/model/pos-hardware-in-person.d.ts +98 -0
  173. package/src/lib/model/pos-hardware-in-person.js +224 -0
  174. package/src/lib/model/pos-hardware-in-person.js.map +1 -0
  175. package/src/lib/model/pos-hardware-tax-summary.d.ts +166 -0
  176. package/src/lib/model/pos-hardware-tax-summary.js +225 -0
  177. package/src/lib/model/pos-hardware-tax-summary.js.map +1 -0
  178. package/src/lib/model/pos-hardware-terms.d.ts +74 -0
  179. package/src/lib/model/pos-hardware-terms.js +115 -0
  180. package/src/lib/model/pos-hardware-terms.js.map +1 -0
  181. package/src/lib/model/pos-hardware.d.ts +349 -7
  182. package/src/lib/model/pos-hardware.js +291 -20
  183. package/src/lib/model/pos-hardware.js.map +1 -1
  184. package/src/lib/model/product-write.d.ts +10 -0
  185. package/src/lib/model/product-write.js +4 -2
  186. package/src/lib/model/product-write.js.map +1 -1
  187. package/src/lib/plugin.js +16 -0
  188. package/src/lib/plugin.js.map +1 -1
  189. package/src/lib/server/billing-webhook.js +25 -1
  190. package/src/lib/server/billing-webhook.js.map +1 -1
  191. package/src/lib/server/cancel-order.js +7 -5
  192. package/src/lib/server/cancel-order.js.map +1 -1
  193. package/src/lib/server/cart-checkout.js +20 -8
  194. package/src/lib/server/cart-checkout.js.map +1 -1
  195. package/src/lib/server/cart.js +29 -0
  196. package/src/lib/server/cart.js.map +1 -1
  197. package/src/lib/server/checkout.js +42 -13
  198. package/src/lib/server/checkout.js.map +1 -1
  199. package/src/lib/server/collection-membership.d.ts +4 -0
  200. package/src/lib/server/collection-membership.js +5 -10
  201. package/src/lib/server/collection-membership.js.map +1 -1
  202. package/src/lib/server/commerce-site-keys.d.ts +29 -0
  203. package/src/lib/server/commerce-site-keys.js +40 -0
  204. package/src/lib/server/commerce-site-keys.js.map +1 -0
  205. package/src/lib/server/draft-order.js +8 -5
  206. package/src/lib/server/draft-order.js.map +1 -1
  207. package/src/lib/server/fulfill-order.js +7 -5
  208. package/src/lib/server/fulfill-order.js.map +1 -1
  209. package/src/lib/server/gift-cards.js +8 -5
  210. package/src/lib/server/gift-cards.js.map +1 -1
  211. package/src/lib/server/local-fulfillment-status.js +9 -6
  212. package/src/lib/server/local-fulfillment-status.js.map +1 -1
  213. package/src/lib/server/member-post.js +6 -5
  214. package/src/lib/server/member-post.js.map +1 -1
  215. package/src/lib/server/membership-admin-password.d.ts +4 -2
  216. package/src/lib/server/membership-admin-password.js +10 -8
  217. package/src/lib/server/membership-admin-password.js.map +1 -1
  218. package/src/lib/server/membership-admin-remove.d.ts +7 -5
  219. package/src/lib/server/membership-admin-remove.js +9 -9
  220. package/src/lib/server/membership-admin-remove.js.map +1 -1
  221. package/src/lib/server/order-notifications.js +5 -2
  222. package/src/lib/server/order-notifications.js.map +1 -1
  223. package/src/lib/server/order-print.js +7 -5
  224. package/src/lib/server/order-print.js.map +1 -1
  225. package/src/lib/server/order-receipt-send.js +8 -5
  226. package/src/lib/server/order-receipt-send.js.map +1 -1
  227. package/src/lib/server/orders-shipping-prepare.js +9 -6
  228. package/src/lib/server/orders-shipping-prepare.js.map +1 -1
  229. package/src/lib/server/own-store-tax-return-source.d.ts +47 -0
  230. package/src/lib/server/own-store-tax-return-source.js +312 -0
  231. package/src/lib/server/own-store-tax-return-source.js.map +1 -0
  232. package/src/lib/server/payment-methods.js +13 -9
  233. package/src/lib/server/payment-methods.js.map +1 -1
  234. package/src/lib/server/pos-auth.d.ts +37 -6
  235. package/src/lib/server/pos-auth.js +40 -15
  236. package/src/lib/server/pos-auth.js.map +1 -1
  237. package/src/lib/server/pos-cellular-billing.d.ts +81 -0
  238. package/src/lib/server/pos-cellular-billing.js +711 -0
  239. package/src/lib/server/pos-cellular-billing.js.map +1 -0
  240. package/src/lib/server/pos-cellular-notify.d.ts +47 -0
  241. package/src/lib/server/pos-cellular-notify.js +150 -0
  242. package/src/lib/server/pos-cellular-notify.js.map +1 -0
  243. package/src/lib/server/pos-cellular.d.ts +88 -0
  244. package/src/lib/server/pos-cellular.js +339 -0
  245. package/src/lib/server/pos-cellular.js.map +1 -0
  246. package/src/lib/server/pos-check-in.d.ts +5 -1
  247. package/src/lib/server/pos-check-in.js +296 -28
  248. package/src/lib/server/pos-check-in.js.map +1 -1
  249. package/src/lib/server/pos-day-report.js +29 -3
  250. package/src/lib/server/pos-day-report.js.map +1 -1
  251. package/src/lib/server/pos-display.d.ts +16 -0
  252. package/src/lib/server/pos-display.js +129 -2
  253. package/src/lib/server/pos-display.js.map +1 -1
  254. package/src/lib/server/pos-hardware-admin.d.ts +10 -1
  255. package/src/lib/server/pos-hardware-admin.js +250 -84
  256. package/src/lib/server/pos-hardware-admin.js.map +1 -1
  257. package/src/lib/server/pos-hardware-attach.d.ts +105 -0
  258. package/src/lib/server/pos-hardware-attach.js +443 -0
  259. package/src/lib/server/pos-hardware-attach.js.map +1 -0
  260. package/src/lib/server/pos-hardware-buyer-lookup.d.ts +58 -0
  261. package/src/lib/server/pos-hardware-buyer-lookup.js +180 -0
  262. package/src/lib/server/pos-hardware-buyer-lookup.js.map +1 -0
  263. package/src/lib/server/pos-hardware-buyer-record.d.ts +29 -0
  264. package/src/lib/server/pos-hardware-buyer-record.js +86 -0
  265. package/src/lib/server/pos-hardware-buyer-record.js.map +1 -0
  266. package/src/lib/server/pos-hardware-cancel.d.ts +58 -0
  267. package/src/lib/server/pos-hardware-cancel.js +147 -0
  268. package/src/lib/server/pos-hardware-cancel.js.map +1 -0
  269. package/src/lib/server/pos-hardware-closure-notices.d.ts +27 -0
  270. package/src/lib/server/pos-hardware-closure-notices.js +85 -0
  271. package/src/lib/server/pos-hardware-closure-notices.js.map +1 -0
  272. package/src/lib/server/pos-hardware-closure.d.ts +60 -0
  273. package/src/lib/server/pos-hardware-closure.js +153 -0
  274. package/src/lib/server/pos-hardware-closure.js.map +1 -0
  275. package/src/lib/server/pos-hardware-in-person.d.ts +61 -0
  276. package/src/lib/server/pos-hardware-in-person.js +236 -0
  277. package/src/lib/server/pos-hardware-in-person.js.map +1 -0
  278. package/src/lib/server/pos-hardware-notify.d.ts +40 -2
  279. package/src/lib/server/pos-hardware-notify.js +195 -14
  280. package/src/lib/server/pos-hardware-notify.js.map +1 -1
  281. package/src/lib/server/pos-hardware-readers.d.ts +115 -0
  282. package/src/lib/server/pos-hardware-readers.js +430 -0
  283. package/src/lib/server/pos-hardware-readers.js.map +1 -0
  284. package/src/lib/server/pos-hardware-returns.d.ts +116 -0
  285. package/src/lib/server/pos-hardware-returns.js +502 -0
  286. package/src/lib/server/pos-hardware-returns.js.map +1 -0
  287. package/src/lib/server/pos-hardware-sale-fields.d.ts +28 -0
  288. package/src/lib/server/pos-hardware-sale-fields.js +44 -0
  289. package/src/lib/server/pos-hardware-sale-fields.js.map +1 -0
  290. package/src/lib/server/pos-hardware-sale.d.ts +54 -0
  291. package/src/lib/server/pos-hardware-sale.js +369 -0
  292. package/src/lib/server/pos-hardware-sale.js.map +1 -0
  293. package/src/lib/server/pos-hardware-tax-return-source.d.ts +99 -0
  294. package/src/lib/server/pos-hardware-tax-return-source.js +462 -0
  295. package/src/lib/server/pos-hardware-tax-return-source.js.map +1 -0
  296. package/src/lib/server/pos-hardware-terms.d.ts +64 -0
  297. package/src/lib/server/pos-hardware-terms.js +154 -0
  298. package/src/lib/server/pos-hardware-terms.js.map +1 -0
  299. package/src/lib/server/pos-hardware-user-eraser.d.ts +3 -0
  300. package/src/lib/server/pos-hardware-user-eraser.js +31 -7
  301. package/src/lib/server/pos-hardware-user-eraser.js.map +1 -1
  302. package/src/lib/server/pos-hardware-webhook.d.ts +5 -0
  303. package/src/lib/server/pos-hardware-webhook.js +51 -6
  304. package/src/lib/server/pos-hardware-webhook.js.map +1 -1
  305. package/src/lib/server/pos-hardware.d.ts +74 -1
  306. package/src/lib/server/pos-hardware.js +175 -10
  307. package/src/lib/server/pos-hardware.js.map +1 -1
  308. package/src/lib/server/pos-kiosk.d.ts +2 -0
  309. package/src/lib/server/pos-kiosk.js +17 -12
  310. package/src/lib/server/pos-kiosk.js.map +1 -1
  311. package/src/lib/server/pos-offline-card-order.d.ts +64 -0
  312. package/src/lib/server/pos-offline-card-order.js +102 -0
  313. package/src/lib/server/pos-offline-card-order.js.map +1 -0
  314. package/src/lib/server/pos-offline-card-reconcile.d.ts +67 -1
  315. package/src/lib/server/pos-offline-card-reconcile.js +215 -18
  316. package/src/lib/server/pos-offline-card-reconcile.js.map +1 -1
  317. package/src/lib/server/pos-offline-sync.d.ts +39 -0
  318. package/src/lib/server/pos-offline-sync.js +190 -55
  319. package/src/lib/server/pos-offline-sync.js.map +1 -1
  320. package/src/lib/server/pos-ops-gate.d.ts +15 -4
  321. package/src/lib/server/pos-ops-gate.js +42 -9
  322. package/src/lib/server/pos-ops-gate.js.map +1 -1
  323. package/src/lib/server/pos-ops-routes.js +24 -0
  324. package/src/lib/server/pos-ops-routes.js.map +1 -1
  325. package/src/lib/server/pos-order-refund-ids.d.ts +28 -0
  326. package/src/lib/server/pos-order-refund-ids.js +31 -0
  327. package/src/lib/server/pos-order-refund-ids.js.map +1 -0
  328. package/src/lib/server/pos-order.js +52 -49
  329. package/src/lib/server/pos-order.js.map +1 -1
  330. package/src/lib/server/pos-payment.js +1 -1
  331. package/src/lib/server/pos-payment.js.map +1 -1
  332. package/src/lib/server/pos-reader-splash-admin.js +30 -32
  333. package/src/lib/server/pos-reader-splash-admin.js.map +1 -1
  334. package/src/lib/server/pos-reader-splash-images-route.d.ts +17 -0
  335. package/src/lib/server/pos-reader-splash-images-route.js +113 -0
  336. package/src/lib/server/pos-reader-splash-images-route.js.map +1 -0
  337. package/src/lib/server/pos-reader-splash-images.d.ts +51 -0
  338. package/src/lib/server/pos-reader-splash-images.js +123 -0
  339. package/src/lib/server/pos-reader-splash-images.js.map +1 -0
  340. package/src/lib/server/pos-reader-splash.d.ts +68 -1
  341. package/src/lib/server/pos-reader-splash.js +182 -11
  342. package/src/lib/server/pos-reader-splash.js.map +1 -1
  343. package/src/lib/server/pos-readers.d.ts +29 -0
  344. package/src/lib/server/pos-readers.js +134 -35
  345. package/src/lib/server/pos-readers.js.map +1 -1
  346. package/src/lib/server/pos-return.d.ts +10 -0
  347. package/src/lib/server/pos-return.js +26 -1
  348. package/src/lib/server/pos-return.js.map +1 -1
  349. package/src/lib/server/pos-sale.js +6 -1
  350. package/src/lib/server/pos-sale.js.map +1 -1
  351. package/src/lib/server/pos-shift.js +11 -0
  352. package/src/lib/server/pos-shift.js.map +1 -1
  353. package/src/lib/server/pos-staff-pin.js +25 -20
  354. package/src/lib/server/pos-staff-pin.js.map +1 -1
  355. package/src/lib/server/pos-terminal.d.ts +14 -4
  356. package/src/lib/server/pos-terminal.js +34 -38
  357. package/src/lib/server/pos-terminal.js.map +1 -1
  358. package/src/lib/server/printers.d.ts +7 -3
  359. package/src/lib/server/printers.js +18 -12
  360. package/src/lib/server/printers.js.map +1 -1
  361. package/src/lib/server/product-drafts.d.ts +11 -1
  362. package/src/lib/server/product-drafts.js +12 -8
  363. package/src/lib/server/product-drafts.js.map +1 -1
  364. package/src/lib/server/product.d.ts +15 -1
  365. package/src/lib/server/product.js +16 -3
  366. package/src/lib/server/product.js.map +1 -1
  367. package/src/lib/server/products-write.d.ts +26 -2
  368. package/src/lib/server/products-write.js +19 -7
  369. package/src/lib/server/products-write.js.map +1 -1
  370. package/src/lib/server/refund.js +34 -11
  371. package/src/lib/server/refund.js.map +1 -1
  372. package/src/lib/server/reservation-availability-query.d.ts +8 -0
  373. package/src/lib/server/reservation-availability-query.js +11 -1
  374. package/src/lib/server/reservation-availability-query.js.map +1 -1
  375. package/src/lib/server/reservation-availability.d.ts +1 -1
  376. package/src/lib/server/reservation-availability.js +7 -2
  377. package/src/lib/server/reservation-availability.js.map +1 -1
  378. package/src/lib/server/reservation-guests.d.ts +32 -0
  379. package/src/lib/server/reservation-guests.js +285 -0
  380. package/src/lib/server/reservation-guests.js.map +1 -0
  381. package/src/lib/server/reservation-walk-in.d.ts +11 -1
  382. package/src/lib/server/reservation-walk-in.js +56 -12
  383. package/src/lib/server/reservation-walk-in.js.map +1 -1
  384. package/src/lib/server/reserve.js +18 -5
  385. package/src/lib/server/reserve.js.map +1 -1
  386. package/src/lib/server/returns.js +9 -6
  387. package/src/lib/server/returns.js.map +1 -1
  388. package/src/lib/server/reviews.d.ts +22 -2
  389. package/src/lib/server/reviews.js +88 -20
  390. package/src/lib/server/reviews.js.map +1 -1
  391. package/src/lib/server/shipping-connectors.js +10 -11
  392. package/src/lib/server/shipping-connectors.js.map +1 -1
  393. package/src/lib/server/site-page-resolver.js +20 -3
  394. package/src/lib/server/site-page-resolver.js.map +1 -1
  395. package/src/lib/server/store-day.d.ts +33 -0
  396. package/src/lib/server/store-day.js +46 -0
  397. package/src/lib/server/store-day.js.map +1 -0
  398. package/src/lib/server/store-setup-ai-writer.d.ts +2 -1
  399. package/src/lib/server/store-setup-ai-writer.js +5 -6
  400. package/src/lib/server/store-setup-ai-writer.js.map +1 -1
  401. package/src/lib/server/storefront-tax.d.ts +13 -0
  402. package/src/lib/server/storefront-tax.js +8 -1
  403. package/src/lib/server/storefront-tax.js.map +1 -1
  404. package/src/lib/server/tax-return-source.d.ts +32 -3
  405. package/src/lib/server/tax-return-source.js +99 -20
  406. package/src/lib/server/tax-return-source.js.map +1 -1
  407. package/src/lib/server.js +100 -2
  408. package/src/lib/server.js.map +1 -1
  409. package/src/lib/testing/fake-firestore.js +58 -16
  410. package/src/lib/testing/fake-firestore.js.map +1 -1
  411. package/src/lib/testing/pos-ops-memory-firestore.js +18 -4
  412. package/src/lib/testing/pos-ops-memory-firestore.js.map +1 -1
  413. package/src/lib/testing/site-register-permissions.d.ts +29 -0
  414. package/src/lib/testing/site-register-permissions.js +38 -0
  415. package/src/lib/testing/site-register-permissions.js.map +1 -0
  416. package/src/lib/transfer/tracking.server.js +8 -5
  417. package/src/lib/transfer/tracking.server.js.map +1 -1
  418. package/src/lib/utils/add-to-cart.d.ts +2 -0
  419. package/src/lib/utils/add-to-cart.js +6 -3
  420. package/src/lib/utils/add-to-cart.js.map +1 -1
@@ -0,0 +1,92 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2026 Aglyn LLC
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */ 'use client';
17
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
18
+ import { MenuItem, Stack, TextField, Typography } from "@mui/material";
19
+ import { useUser } from "@aglyn/tenant-feature-instance";
20
+ import { memo, useEffect, useId, useState } from "react";
21
+ import { posHardwareSaleStatus } from "./pos/pos-hardware-sale-api.js";
22
+ /**
23
+ * "Point of sale hardware" (AGL-4038): which card reader or accessory this
24
+ * product is, on the platform's own store only. A sale of it at that
25
+ * store's register becomes a hardware order for the buyer's workspace. On
26
+ * every other store the server answers `seller: false` and this draws
27
+ * nothing, so no merchant is shown a control that would do nothing.
28
+ *
29
+ * Loaded on its own, only by the editor's register section.
30
+ */ function ProductHardwareSkuField(props) {
31
+ const { hostId, hardwareSku, update } = props;
32
+ const { data: user } = useUser();
33
+ const helpId = useId();
34
+ const [status, setStatus] = useState(null);
35
+ useEffect(()=>{
36
+ if (!user || !hostId) return;
37
+ let live = true;
38
+ posHardwareSaleStatus(user, hostId).then((answer)=>{
39
+ if (live) setStatus(answer);
40
+ })// A store that cannot be asked shows nothing, as one that is not the seller.
41
+ .catch(()=>undefined);
42
+ return ()=>{
43
+ live = false;
44
+ };
45
+ }, [
46
+ user,
47
+ hostId
48
+ ]);
49
+ if (!(status == null ? void 0 : status.seller)) return null;
50
+ const known = status.items.some((item)=>item.sku === hardwareSku);
51
+ return /*#__PURE__*/ _jsxs(Stack, {
52
+ spacing: 0.5,
53
+ children: [
54
+ /*#__PURE__*/ _jsxs(TextField, {
55
+ select: true,
56
+ size: "small",
57
+ label: "Point of sale hardware",
58
+ value: known ? hardwareSku : '',
59
+ onChange: (event)=>update({
60
+ hardwareSku: event.target.value
61
+ }),
62
+ slotProps: {
63
+ htmlInput: {
64
+ 'aria-describedby': helpId
65
+ }
66
+ },
67
+ sx: {
68
+ maxWidth: (theme)=>theme.spacing(50)
69
+ },
70
+ children: [
71
+ /*#__PURE__*/ _jsx(MenuItem, {
72
+ value: "",
73
+ children: 'Not point of sale hardware'
74
+ }),
75
+ status.items.map((item)=>/*#__PURE__*/ _jsx(MenuItem, {
76
+ value: item.sku,
77
+ children: item.name
78
+ }, item.sku))
79
+ ]
80
+ }),
81
+ /*#__PURE__*/ _jsx(Typography, {
82
+ id: helpId,
83
+ variant: "body2",
84
+ color: "text.secondary",
85
+ children: known ? 'Selling this at the register makes a hardware order for the buyer’s workspace, attached at the sale or later from the To attach list.' : 'Choose the card reader or accessory this product is, so a sale of it at the register reaches the buyer’s workspace.'
86
+ })
87
+ ]
88
+ });
89
+ }
90
+ export default /*#__PURE__*/ memo(ProductHardwareSkuField);
91
+
92
+ //# sourceMappingURL=product-hardware-sku-field.component.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../../../libs/plugins/commerce/src/lib/components/console/product-hardware-sku-field.component.tsx"],"sourcesContent":["/**\n * @license\n * Copyright 2026 Aglyn LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n'use client'\n\nimport { MenuItem, Stack, TextField, Typography } from '@mui/material'\nimport { useUser } from '@aglyn/tenant-feature-instance'\nimport { memo, useEffect, useId, useState } from 'react'\nimport type * as CommerceModel from '../../model'\nimport { posHardwareSaleStatus, type PosHardwareSaleStatus } from './pos/pos-hardware-sale-api'\n\ntype Patch = Partial<CommerceModel.HostProduct>\n\nexport interface ProductHardwareSkuFieldProps {\n hostId: string\n hardwareSku: string | undefined\n update: (patch: Patch) => void\n}\n\n/**\n * \"Point of sale hardware\" (AGL-4038): which card reader or accessory this\n * product is, on the platform's own store only. A sale of it at that\n * store's register becomes a hardware order for the buyer's workspace. On\n * every other store the server answers `seller: false` and this draws\n * nothing, so no merchant is shown a control that would do nothing.\n *\n * Loaded on its own, only by the editor's register section.\n */\nfunction ProductHardwareSkuField(props: ProductHardwareSkuFieldProps) {\n const { hostId, hardwareSku, update } = props\n const { data: user } = useUser()\n const helpId = useId()\n const [status, setStatus] = useState<PosHardwareSaleStatus | null>(null)\n\n useEffect(() => {\n if (!user || !hostId) return\n let live = true\n posHardwareSaleStatus(user, hostId)\n .then((answer) => {\n if (live) setStatus(answer)\n })\n // A store that cannot be asked shows nothing, as one that is not the seller.\n .catch(() => undefined)\n return () => {\n live = false\n }\n }, [user, hostId])\n\n if (!status?.seller) return null\n const known = status.items.some((item) => item.sku === hardwareSku)\n return (\n <Stack spacing={0.5}>\n <TextField\n select\n size=\"small\"\n label=\"Point of sale hardware\"\n value={known ? hardwareSku : ''}\n onChange={(event) => update({ hardwareSku: event.target.value })}\n slotProps={{ htmlInput: { 'aria-describedby': helpId } }}\n sx={{ maxWidth: (theme) => theme.spacing(50) }}\n >\n <MenuItem value=\"\">{'Not point of sale hardware'}</MenuItem>\n {status.items.map((item) => (\n <MenuItem key={item.sku} value={item.sku}>\n {item.name}\n </MenuItem>\n ))}\n </TextField>\n <Typography id={helpId} variant=\"body2\" color=\"text.secondary\">\n {known\n ? 'Selling this at the register makes a hardware order for the buyer’s workspace, attached at the sale or later from the To attach list.'\n : 'Choose the card reader or accessory this product is, so a sale of it at the register reaches the buyer’s workspace.'}\n </Typography>\n </Stack>\n )\n}\n\nexport default memo(ProductHardwareSkuField)\n"],"names":["MenuItem","Stack","TextField","Typography","useUser","memo","useEffect","useId","useState","posHardwareSaleStatus","ProductHardwareSkuField","props","hostId","hardwareSku","update","data","user","helpId","status","setStatus","live","then","answer","catch","undefined","seller","known","items","some","item","sku","spacing","select","size","label","value","onChange","event","target","slotProps","htmlInput","sx","maxWidth","theme","map","name","id","variant","color"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC,GACD;;AAEA,SAASA,QAAQ,EAAEC,KAAK,EAAEC,SAAS,EAAEC,UAAU,QAAQ,gBAAe;AACtE,SAASC,OAAO,QAAQ,iCAAgC;AACxD,SAASC,IAAI,EAAEC,SAAS,EAAEC,KAAK,EAAEC,QAAQ,QAAQ,QAAO;AAExD,SAASC,qBAAqB,QAAoC,iCAA6B;AAU/F;;;;;;;;CAQC,GACD,SAASC,wBAAwBC,KAAmC;IAClE,MAAM,EAAEC,MAAM,EAAEC,WAAW,EAAEC,MAAM,EAAE,GAAGH;IACxC,MAAM,EAAEI,MAAMC,IAAI,EAAE,GAAGZ;IACvB,MAAMa,SAASV;IACf,MAAM,CAACW,QAAQC,UAAU,GAAGX,SAAuC;IAEnEF,UAAU;QACR,IAAI,CAACU,QAAQ,CAACJ,QAAQ;QACtB,IAAIQ,OAAO;QACXX,sBAAsBO,MAAMJ,QACzBS,IAAI,CAAC,CAACC;YACL,IAAIF,MAAMD,UAAUG;QACtB,EACA,6EAA6E;SAC5EC,KAAK,CAAC,IAAMC;QACf,OAAO;YACLJ,OAAO;QACT;IACF,GAAG;QAACJ;QAAMJ;KAAO;IAEjB,IAAI,EAACM,0BAAAA,OAAQO,MAAM,GAAE,OAAO;IAC5B,MAAMC,QAAQR,OAAOS,KAAK,CAACC,IAAI,CAAC,CAACC,OAASA,KAAKC,GAAG,KAAKjB;IACvD,qBACE,MAACZ;QAAM8B,SAAS;;0BACd,MAAC7B;gBACC8B,MAAM;gBACNC,MAAK;gBACLC,OAAM;gBACNC,OAAOT,QAAQb,cAAc;gBAC7BuB,UAAU,CAACC,QAAUvB,OAAO;wBAAED,aAAawB,MAAMC,MAAM,CAACH,KAAK;oBAAC;gBAC9DI,WAAW;oBAAEC,WAAW;wBAAE,oBAAoBvB;oBAAO;gBAAE;gBACvDwB,IAAI;oBAAEC,UAAU,CAACC,QAAUA,MAAMZ,OAAO,CAAC;gBAAI;;kCAE7C,KAAC/B;wBAASmC,OAAM;kCAAI;;oBACnBjB,OAAOS,KAAK,CAACiB,GAAG,CAAC,CAACf,qBACjB,KAAC7B;4BAAwBmC,OAAON,KAAKC,GAAG;sCACrCD,KAAKgB,IAAI;2BADGhB,KAAKC,GAAG;;;0BAK3B,KAAC3B;gBAAW2C,IAAI7B;gBAAQ8B,SAAQ;gBAAQC,OAAM;0BAC3CtB,QACG,0IACA;;;;AAIZ;AAEA,6BAAerB,KAAKK,yBAAwB"}
@@ -0,0 +1,22 @@
1
+ import * as CommerceModel from '../../model';
2
+ type Patch = Partial<CommerceModel.HostProduct>;
3
+ /** What the section reads of a variant: never its price or SKU, so typing those does not redraw it. */
4
+ export type KioskOfferVariant = Pick<CommerceModel.ProductVariant, 'id' | 'options' | 'offerOnKiosk'>;
5
+ export interface ProductKioskOfferFieldProps {
6
+ /** `productOfferedOnKiosk` of the product: absent reads as on. */
7
+ offerOnKiosk: boolean;
8
+ variants: readonly KioskOfferVariant[];
9
+ update: (patch: Patch | ((at: CommerceModel.HostProduct) => Patch)) => void;
10
+ }
11
+ /**
12
+ * "Offer on the kiosk" (AGL-4038): whether the self-service kiosk offers the
13
+ * product, and for a product with options, which of its variants. On (the
14
+ * default, and what every product stored before the choice reads as) the
15
+ * kiosk offers it as it always has; off, the kiosk leaves it out and refuses
16
+ * it in a cart, while the register, the POS apps and the site sell it as
17
+ * before. The same choice for every product a store sells.
18
+ *
19
+ * Memoized on its own props like every section of this editor (AGL-3423).
20
+ */
21
+ export declare const ProductKioskOfferField: import("react").MemoExoticComponent<(props: ProductKioskOfferFieldProps) => import("react").JSX.Element>;
22
+ export {};
@@ -0,0 +1,94 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2026 Aglyn LLC
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */ 'use client';
17
+ import { _ as _extends } from "@swc/helpers/_/_extends";
18
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
19
+ import { Checkbox, FormControlLabel, FormGroup, FormLabel, Stack, Switch, Typography } from "@mui/material";
20
+ import { memo, useId } from "react";
21
+ function variantLabel(variant) {
22
+ var _variant_options;
23
+ const values = Object.values((_variant_options = variant.options) != null ? _variant_options : {});
24
+ return values.length ? values.join(' / ') : 'Default';
25
+ }
26
+ /**
27
+ * "Offer on the kiosk" (AGL-4038): whether the self-service kiosk offers the
28
+ * product, and for a product with options, which of its variants. On (the
29
+ * default, and what every product stored before the choice reads as) the
30
+ * kiosk offers it as it always has; off, the kiosk leaves it out and refuses
31
+ * it in a cart, while the register, the POS apps and the site sell it as
32
+ * before. The same choice for every product a store sells.
33
+ *
34
+ * Memoized on its own props like every section of this editor (AGL-3423).
35
+ */ export const ProductKioskOfferField = /*#__PURE__*/ memo(function ProductKioskOfferField(props) {
36
+ const { offerOnKiosk, variants, update } = props;
37
+ const helpId = useId();
38
+ const variantsLabelId = useId();
39
+ const setVariant = (variantId, offered)=>update((at)=>({
40
+ variants: at.variants.map((variant)=>variant.id === variantId ? _extends({}, variant, {
41
+ offerOnKiosk: offered
42
+ }) : variant)
43
+ }));
44
+ return /*#__PURE__*/ _jsxs(Stack, {
45
+ spacing: 0.5,
46
+ children: [
47
+ /*#__PURE__*/ _jsx(FormControlLabel, {
48
+ control: /*#__PURE__*/ _jsx(Switch, {
49
+ checked: offerOnKiosk,
50
+ onChange: (event)=>update({
51
+ offerOnKiosk: event.target.checked
52
+ }),
53
+ slotProps: {
54
+ input: {
55
+ 'aria-describedby': helpId
56
+ }
57
+ }
58
+ }),
59
+ label: "Offer on the kiosk"
60
+ }),
61
+ /*#__PURE__*/ _jsx(Typography, {
62
+ id: helpId,
63
+ variant: "body2",
64
+ color: "text.secondary",
65
+ children: offerOnKiosk ? 'Customers can order it at your self-service kiosk.' : 'Left off the self-service kiosk. The register, the POS apps and your site still sell it.'
66
+ }),
67
+ offerOnKiosk && variants.length > 1 ? /*#__PURE__*/ _jsxs(FormGroup, {
68
+ "aria-labelledby": variantsLabelId,
69
+ sx: {
70
+ pl: 1
71
+ },
72
+ children: [
73
+ /*#__PURE__*/ _jsx(FormLabel, {
74
+ id: variantsLabelId,
75
+ sx: {
76
+ typography: 'body2'
77
+ },
78
+ children: 'Variants the kiosk offers'
79
+ }),
80
+ variants.map((variant)=>/*#__PURE__*/ _jsx(FormControlLabel, {
81
+ control: /*#__PURE__*/ _jsx(Checkbox, {
82
+ size: "small",
83
+ checked: variant.offerOnKiosk !== false,
84
+ onChange: (event)=>setVariant(variant.id, event.target.checked)
85
+ }),
86
+ label: variantLabel(variant)
87
+ }, variant.id))
88
+ ]
89
+ }) : null
90
+ ]
91
+ });
92
+ });
93
+
94
+ //# sourceMappingURL=product-kiosk-offer-field.component.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../../../libs/plugins/commerce/src/lib/components/console/product-kiosk-offer-field.component.tsx"],"sourcesContent":["/**\n * @license\n * Copyright 2026 Aglyn LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n'use client'\n\nimport { Checkbox, FormControlLabel, FormGroup, FormLabel, Stack, Switch, Typography } from '@mui/material'\nimport { memo, useId } from 'react'\nimport * as CommerceModel from '../../model'\n\ntype Patch = Partial<CommerceModel.HostProduct>\n\n/** What the section reads of a variant: never its price or SKU, so typing those does not redraw it. */\nexport type KioskOfferVariant = Pick<CommerceModel.ProductVariant, 'id' | 'options' | 'offerOnKiosk'>\n\nexport interface ProductKioskOfferFieldProps {\n /** `productOfferedOnKiosk` of the product: absent reads as on. */\n offerOnKiosk: boolean\n variants: readonly KioskOfferVariant[]\n update: (patch: Patch | ((at: CommerceModel.HostProduct) => Patch)) => void\n}\n\nfunction variantLabel(variant: KioskOfferVariant): string {\n const values = Object.values(variant.options ?? {})\n return values.length ? values.join(' / ') : 'Default'\n}\n\n/**\n * \"Offer on the kiosk\" (AGL-4038): whether the self-service kiosk offers the\n * product, and for a product with options, which of its variants. On (the\n * default, and what every product stored before the choice reads as) the\n * kiosk offers it as it always has; off, the kiosk leaves it out and refuses\n * it in a cart, while the register, the POS apps and the site sell it as\n * before. The same choice for every product a store sells.\n *\n * Memoized on its own props like every section of this editor (AGL-3423).\n */\nexport const ProductKioskOfferField = memo(function ProductKioskOfferField(props: ProductKioskOfferFieldProps) {\n const { offerOnKiosk, variants, update } = props\n const helpId = useId()\n const variantsLabelId = useId()\n const setVariant = (variantId: string, offered: boolean) =>\n update((at) => ({\n variants: at.variants.map((variant) =>\n variant.id === variantId ? { ...variant, offerOnKiosk: offered } : variant,\n ),\n }))\n return (\n <Stack spacing={0.5}>\n <FormControlLabel\n control={\n <Switch\n checked={offerOnKiosk}\n onChange={(event) => update({ offerOnKiosk: event.target.checked })}\n slotProps={{ input: { 'aria-describedby': helpId } }}\n />\n }\n label=\"Offer on the kiosk\"\n />\n <Typography id={helpId} variant=\"body2\" color=\"text.secondary\">\n {offerOnKiosk\n ? 'Customers can order it at your self-service kiosk.'\n : 'Left off the self-service kiosk. The register, the POS apps and your site still sell it.'}\n </Typography>\n {offerOnKiosk && variants.length > 1 ? (\n <FormGroup aria-labelledby={variantsLabelId} sx={{ pl: 1 }}>\n <FormLabel id={variantsLabelId} sx={{ typography: 'body2' }}>\n {'Variants the kiosk offers'}\n </FormLabel>\n {variants.map((variant) => (\n <FormControlLabel\n key={variant.id}\n control={\n <Checkbox\n size=\"small\"\n checked={variant.offerOnKiosk !== false}\n onChange={(event) => setVariant(variant.id, event.target.checked)}\n />\n }\n label={variantLabel(variant)}\n />\n ))}\n </FormGroup>\n ) : null}\n </Stack>\n )\n})\n"],"names":["Checkbox","FormControlLabel","FormGroup","FormLabel","Stack","Switch","Typography","memo","useId","variantLabel","variant","values","Object","options","length","join","ProductKioskOfferField","props","offerOnKiosk","variants","update","helpId","variantsLabelId","setVariant","variantId","offered","at","map","id","spacing","control","checked","onChange","event","target","slotProps","input","label","color","aria-labelledby","sx","pl","typography","size"],"mappings":"A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IN;wBAAiBkB,IAAI;4BAAEE,YAAY;wBAAQ;kCACvD;;oBAEFvB,SAASQ,GAAG,CAAC,CAACjB,wBACb,KAACT;4BAEC6B,uBACE,KAAC9B;gCACC2C,MAAK;gCACLZ,SAASrB,QAAQQ,YAAY,KAAK;gCAClCc,UAAU,CAACC,QAAUV,WAAWb,QAAQkB,EAAE,EAAEK,MAAMC,MAAM,CAACH,OAAO;;4BAGpEM,OAAO5B,aAAaC;2BARfA,QAAQkB,EAAE;;iBAYnB;;;AAGV,GAAE"}
@@ -4,11 +4,15 @@ export interface ProductRegisterFieldsProps {
4
4
  posQuickKey: boolean;
5
5
  /** `productSellsOnline` of the product: absent reads as on. */
6
6
  sellOnline: boolean;
7
+ /** What the site does with the reviews of a product sold in person only (AGL-4060). */
8
+ inStoreReviews?: CommerceModel.HostProduct['inStoreReviews'];
7
9
  modifierGroups: readonly CommerceModel.ProductModifierGroup[];
8
10
  update: (patch: Patch) => void;
9
11
  }
10
12
  export interface ProductSellOnlineFieldProps {
11
13
  sellOnline: boolean;
14
+ /** What the site does with its reviews while it sells in person only; absent reads as `show`. */
15
+ inStoreReviews?: CommerceModel.HostProduct['inStoreReviews'];
12
16
  update: (patch: Patch) => void;
13
17
  }
14
18
  /**
@@ -16,7 +16,7 @@
16
16
  */ 'use client';
17
17
  import { _ as _extends } from "@swc/helpers/_/_extends";
18
18
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
19
- import { Box, Button, FormControlLabel, IconButton, Stack, Switch, TextField, Typography } from "@mui/material";
19
+ import { Box, Button, FormControlLabel, IconButton, MenuItem, Stack, Switch, TextField, Typography } from "@mui/material";
20
20
  import { PLATFORM_BRAND_NAME } from "@aglyn/aglyn/app-utils/platform-brand";
21
21
  import { memo, useCallback, useId } from "react";
22
22
  import * as CommerceModel from "../../model/index.js";
@@ -27,15 +27,29 @@ function newId(prefix) {
27
27
  const number = Math.round(Number(String(value).replace(/[^0-9.]/g, '')) * 100);
28
28
  return Number.isFinite(number) && number > 0 ? number : 0;
29
29
  }
30
+ /** The "Reviews on your site" choices, as the editor words them (AGL-4060). */ const IN_STORE_REVIEWS_OPTIONS = [
31
+ {
32
+ value: 'show',
33
+ label: 'Show, marked Sold in store',
34
+ help: 'Its reviews appear in your site’s reviews and its average, marked “Sold in store”, with no link to a product page.'
35
+ },
36
+ {
37
+ value: 'hide',
38
+ label: 'Hide',
39
+ help: 'Its reviews appear nowhere on your site: not in the reviews list and not in its average. You still see them under Reviews here.'
40
+ }
41
+ ];
30
42
  /**
31
43
  * The product's "Sell online" switch (AGL-4060). On (the default, and what
32
44
  * every product stored before it reads as) the product sells on the site and
33
45
  * its channels as it always has; off, it sells in person only.
34
46
  */ export const ProductSellOnlineField = /*#__PURE__*/ memo(function ProductSellOnlineField(props) {
47
+ var _IN_STORE_REVIEWS_OPTIONS_find;
35
48
  const { sellOnline, update } = props;
36
49
  const helpId = useId();
50
+ const reviews = props.inStoreReviews === 'hide' ? 'hide' : 'show';
37
51
  return /*#__PURE__*/ _jsxs(Stack, {
38
- spacing: 0.5,
52
+ spacing: 1,
39
53
  children: [
40
54
  /*#__PURE__*/ _jsx(FormControlLabel, {
41
55
  control: /*#__PURE__*/ _jsx(Switch, {
@@ -56,6 +70,20 @@ function newId(prefix) {
56
70
  variant: "body2",
57
71
  color: "text.secondary",
58
72
  children: sellOnline ? 'Sold on your site — its product page, product grids, search, the cart and checkout — and in any shopping feeds and marketplaces you connect, as well as in person.' : `In person only: sold at the register, the kiosk, the ${PLATFORM_BRAND_NAME} POS apps and on draft orders. It has no page on your site and is left out of product grids, search, the sitemap, the cart, checkout and every shopping feed.`
73
+ }),
74
+ sellOnline ? null : /*#__PURE__*/ _jsx(TextField, {
75
+ select: true,
76
+ size: "small",
77
+ label: "Reviews on your site",
78
+ value: reviews,
79
+ onChange: (event)=>update({
80
+ inStoreReviews: event.target.value
81
+ }),
82
+ helperText: (_IN_STORE_REVIEWS_OPTIONS_find = IN_STORE_REVIEWS_OPTIONS.find((option)=>option.value === reviews)) == null ? void 0 : _IN_STORE_REVIEWS_OPTIONS_find.help,
83
+ children: IN_STORE_REVIEWS_OPTIONS.map((option)=>/*#__PURE__*/ _jsx(MenuItem, {
84
+ value: option.value,
85
+ children: option.label
86
+ }, option.value))
59
87
  })
60
88
  ]
61
89
  });
@@ -103,6 +131,7 @@ function newId(prefix) {
103
131
  }),
104
132
  /*#__PURE__*/ _jsx(ProductSellOnlineField, {
105
133
  sellOnline: props.sellOnline,
134
+ inStoreReviews: props.inStoreReviews,
106
135
  update: update
107
136
  }),
108
137
  /*#__PURE__*/ _jsx(Typography, {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../../../../libs/plugins/commerce/src/lib/components/console/product-register-fields.component.tsx"],"sourcesContent":["/**\n * @license\n * Copyright 2026 Aglyn LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n'use client'\n\nimport {\n Box,\n Button,\n FormControlLabel,\n IconButton,\n Stack,\n Switch,\n TextField,\n Typography,\n} from '@mui/material'\nimport { PLATFORM_BRAND_NAME } from '@aglyn/aglyn/app-utils/platform-brand'\nimport { memo, useCallback, useId } from 'react'\nimport * as CommerceModel from '../../model'\n\ntype Patch = Partial<CommerceModel.HostProduct>\n\nexport interface ProductRegisterFieldsProps {\n posQuickKey: boolean\n /** `productSellsOnline` of the product: absent reads as on. */\n sellOnline: boolean\n modifierGroups: readonly CommerceModel.ProductModifierGroup[]\n update: (patch: Patch) => void\n}\n\nfunction newId(prefix: string): string {\n return `${prefix}${Math.random().toString(36).slice(2, 10)}`\n}\n\n/** Dollars as typed, to whole cents; blank is free. */\nfunction centsFromDollars(value: string): number {\n const number = Math.round(Number(String(value).replace(/[^0-9.]/g, '')) * 100)\n return Number.isFinite(number) && number > 0 ? number : 0\n}\n\nexport interface ProductSellOnlineFieldProps {\n sellOnline: boolean\n update: (patch: Patch) => void\n}\n\n/**\n * The product's \"Sell online\" switch (AGL-4060). On (the default, and what\n * every product stored before it reads as) the product sells on the site and\n * its channels as it always has; off, it sells in person only.\n */\nexport const ProductSellOnlineField = memo(function ProductSellOnlineField(\n props: ProductSellOnlineFieldProps,\n) {\n const { sellOnline, update } = props\n const helpId = useId()\n return (\n <Stack spacing={0.5}>\n <FormControlLabel\n control={\n <Switch\n checked={sellOnline}\n onChange={(event) => update({ sellOnline: event.target.checked })}\n slotProps={{ input: { 'aria-describedby': helpId } }}\n />\n }\n label=\"Sell online\"\n />\n <Typography id={helpId} variant=\"body2\" color=\"text.secondary\">\n {sellOnline\n ? 'Sold on your site — its product page, product grids, search, the cart and checkout — and in any shopping feeds and marketplaces you connect, as well as in person.'\n : `In person only: sold at the register, the kiosk, the ${PLATFORM_BRAND_NAME} POS apps and on draft orders. It has no page on your site and is left out of product grids, search, the sitemap, the cart, checkout and every shopping feed.`}\n </Typography>\n </Stack>\n )\n})\n\n/**\n * The product's register settings (AGL-3607): whether it is a quick key on\n * the register's first screen, and its modifier groups — choices such as\n * \"Milk\" or \"Add-ons\" the cashier picks as the item is rung up, each choice\n * free or with a price added to the item. A group with a minimum of 1 or\n * more must be answered before the item can be added.\n *\n * Memoized on its own props like every section of this editor (AGL-3423):\n * a keystroke elsewhere in the dialog does not redraw it.\n */\nexport const ProductRegisterFields = memo(function ProductRegisterFields(\n props: ProductRegisterFieldsProps,\n) {\n const { modifierGroups, update } = props\n const setGroups = useCallback(\n (groups: CommerceModel.ProductModifierGroup[]) => update({ modifierGroups: groups }),\n [update],\n )\n const editGroup = (index: number, patch: Partial<CommerceModel.ProductModifierGroup>) =>\n setGroups(modifierGroups.map((group, at) => (at === index ? { ...group, ...patch } : group)))\n const editOption = (\n groupIndex: number,\n optionIndex: number,\n patch: Partial<CommerceModel.ProductModifierOption>,\n ) => {\n const group = modifierGroups[groupIndex]\n editGroup(groupIndex, {\n options: group.options.map((option, at) => (at === optionIndex ? { ...option, ...patch } : option)),\n })\n }\n const problem = CommerceModel.modifierGroupsProblem(modifierGroups)\n\n return (\n <Stack spacing={2}>\n <Typography variant=\"subtitle1\" component=\"h3\">\n {'At the register'}\n </Typography>\n <FormControlLabel\n control={\n <Switch\n checked={props.posQuickKey}\n onChange={(event) => update({ posQuickKey: event.target.checked })}\n />\n }\n label=\"Quick key at the register\"\n />\n <ProductSellOnlineField sellOnline={props.sellOnline} update={update} />\n <Typography variant=\"body2\" color=\"text.secondary\">\n {'Modifiers are choices added as the item is rung up, such as a milk or an extra shot. ' +\n 'Each can be free or add to the price.'}\n </Typography>\n {modifierGroups.map((group, groupIndex) => (\n <Box\n key={group.id}\n role=\"group\"\n aria-label={group.name || 'Modifier group'}\n sx={{ border: 1, borderColor: 'divider', borderRadius: 1, p: 2 }}\n >\n <Stack spacing={1.5}>\n <Stack direction=\"row\" spacing={1} sx={{ alignItems: 'flex-start' }}>\n <TextField\n label=\"Group name\"\n size=\"small\"\n value={group.name}\n onChange={(event) => editGroup(groupIndex, { name: event.target.value })}\n sx={{ flex: 1 }}\n />\n <TextField\n label=\"At least\"\n size=\"small\"\n value={group.min}\n onChange={(event) =>\n editGroup(groupIndex, { min: Math.max(0, Math.round(Number(event.target.value) || 0)) })\n }\n helperText={group.min > 0 ? 'Required' : 'Optional'}\n sx={{ width: 96 }}\n slotProps={{ htmlInput: { inputMode: 'numeric' } }}\n />\n <TextField\n label=\"At most\"\n size=\"small\"\n value={group.max}\n onChange={(event) =>\n editGroup(groupIndex, { max: Math.max(1, Math.round(Number(event.target.value) || 1)) })\n }\n sx={{ width: 96 }}\n slotProps={{ htmlInput: { inputMode: 'numeric' } }}\n />\n <Button\n color=\"error\"\n onClick={() => setGroups(modifierGroups.filter((_group, at) => at !== groupIndex))}\n >\n {'Remove group'}\n </Button>\n </Stack>\n {group.options.map((option, optionIndex) => (\n <Stack key={option.id} direction=\"row\" spacing={1} sx={{ alignItems: 'center' }}>\n <TextField\n label=\"Choice\"\n size=\"small\"\n value={option.name}\n onChange={(event) => editOption(groupIndex, optionIndex, { name: event.target.value })}\n sx={{ flex: 1 }}\n />\n <TextField\n label=\"Adds ($)\"\n size=\"small\"\n defaultValue={option.priceCents ? (option.priceCents / 100).toFixed(2) : ''}\n placeholder=\"0.00\"\n onBlur={(event) =>\n editOption(groupIndex, optionIndex, { priceCents: centsFromDollars(event.target.value) })\n }\n sx={{ width: 120 }}\n slotProps={{ htmlInput: { inputMode: 'decimal' } }}\n />\n <IconButton\n aria-label={`Remove ${option.name || 'choice'}`}\n onClick={() =>\n editGroup(groupIndex, {\n options: group.options.filter((_option, at) => at !== optionIndex),\n max: Math.max(1, Math.min(group.max, group.options.length - 1)),\n })\n }\n >\n {'✕'}\n </IconButton>\n </Stack>\n ))}\n <Box>\n <Button\n onClick={() =>\n editGroup(groupIndex, {\n options: [...group.options, { id: newId('o'), name: '', priceCents: 0 }],\n })\n }\n disabled={group.options.length >= CommerceModel.POS_MAX_MODIFIER_OPTIONS}\n >\n {'Add choice'}\n </Button>\n </Box>\n </Stack>\n </Box>\n ))}\n <Box>\n <Button\n variant=\"outlined\"\n onClick={() =>\n setGroups([\n ...modifierGroups,\n {\n id: newId('g'),\n name: '',\n min: 0,\n max: 1,\n options: [{ id: newId('o'), name: '', priceCents: 0 }],\n },\n ])\n }\n disabled={modifierGroups.length >= CommerceModel.POS_MAX_MODIFIER_GROUPS}\n >\n {'Add modifier group'}\n </Button>\n </Box>\n {problem && modifierGroups.length ? (\n <Typography variant=\"body2\" color=\"warning.main\">\n {problem}\n </Typography>\n ) : null}\n </Stack>\n )\n})\n"],"names":["Box","Button","FormControlLabel","IconButton","Stack","Switch","TextField","Typography","PLATFORM_BRAND_NAME","memo","useCallback","useId","CommerceModel","newId","prefix","Math","random","toString","slice","centsFromDollars","value","number","round","Number","String","replace","isFinite","ProductSellOnlineField","props","sellOnline","update","helpId","spacing","control","checked","onChange","event","target","slotProps","input","label","id","variant","color","ProductRegisterFields","modifierGroups","setGroups","groups","editGroup","index","patch","map","group","at","editOption","groupIndex","optionIndex","options","option","problem","modifierGroupsProblem","component","posQuickKey","role","aria-label","name","sx","border","borderColor","borderRadius","p","direction","alignItems","size","flex","min","max","helperText","width","htmlInput","inputMode","onClick","filter","_group","defaultValue","priceCents","toFixed","placeholder","onBlur","_option","length","disabled","POS_MAX_MODIFIER_OPTIONS","POS_MAX_MODIFIER_GROUPS"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC,GACD;;;AAEA,SACEA,GAAG,EACHC,MAAM,EACNC,gBAAgB,EAChBC,UAAU,EACVC,KAAK,EACLC,MAAM,EACNC,SAAS,EACTC,UAAU,QACL,gBAAe;AACtB,SAASC,mBAAmB,QAAQ,wCAAuC;AAC3E,SAASC,IAAI,EAAEC,WAAW,EAAEC,KAAK,QAAQ,QAAO;AAChD,YAAYC,mBAAmB,uBAAa;AAY5C,SAASC,MAAMC,MAAc;IAC3B,OAAO,GAAGA,SAASC,KAAKC,MAAM,GAAGC,QAAQ,CAAC,IAAIC,KAAK,CAAC,GAAG,KAAK;AAC9D;AAEA,qDAAqD,GACrD,SAASC,iBAAiBC,KAAa;IACrC,MAAMC,SAASN,KAAKO,KAAK,CAACC,OAAOC,OAAOJ,OAAOK,OAAO,CAAC,YAAY,OAAO;IAC1E,OAAOF,OAAOG,QAAQ,CAACL,WAAWA,SAAS,IAAIA,SAAS;AAC1D;AAOA;;;;CAIC,GACD,OAAO,MAAMM,uCAAyBlB,KAAK,SAASkB,uBAClDC,KAAkC;IAElC,MAAM,EAAEC,UAAU,EAAEC,MAAM,EAAE,GAAGF;IAC/B,MAAMG,SAASpB;IACf,qBACE,MAACP;QAAM4B,SAAS;;0BACd,KAAC9B;gBACC+B,uBACE,KAAC5B;oBACC6B,SAASL;oBACTM,UAAU,C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B,EAAE;0CAgCvB,KAACzC;0CACC,cAAA,KAACC;oCACCgF,SAAS,IACPjC,UAAUO,YAAY;4CACpBE,SAAS;mDAAIL,MAAMK,OAAO;gDAAE;oDAAEhB,IAAI5B,MAAM;oDAAMoD,MAAM;oDAAIoB,YAAY;gDAAE;6CAAE;wCAC1E;oCAEFM,UAAUvC,MAAMK,OAAO,CAACiC,MAAM,IAAI9E,cAAcgF,wBAAwB;8CAEvE;;;;;mBApFFxC,MAAMX,EAAE;0BA0FjB,KAACzC;0BACC,cAAA,KAACC;oBACCyC,SAAQ;oBACRuC,SAAS,IACPnC,UAAU;+BACLD;4BACH;gCACEJ,IAAI5B,MAAM;gCACVoD,MAAM;gCACNU,KAAK;gCACLC,KAAK;gCACLnB,SAAS;oCAAC;wCAAEhB,IAAI5B,MAAM;wCAAMoD,MAAM;wCAAIoB,YAAY;oCAAE;iCAAE;4BACxD;yBACD;oBAEHM,UAAU9C,eAAe6C,MAAM,IAAI9E,cAAciF,uBAAuB;8BAEvE;;;YAGJlC,WAAWd,eAAe6C,MAAM,iBAC/B,KAACnF;gBAAWmC,SAAQ;gBAAQC,OAAM;0BAC/BgB;iBAED;;;AAGV,GAAE"}
1
+ {"version":3,"sources":["../../../../../../../../libs/plugins/commerce/src/lib/components/console/product-register-fields.component.tsx"],"sourcesContent":["/**\n * @license\n * Copyright 2026 Aglyn LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n'use client'\n\nimport {\n Box,\n Button,\n FormControlLabel,\n IconButton,\n MenuItem,\n Stack,\n Switch,\n TextField,\n Typography,\n} from '@mui/material'\nimport { PLATFORM_BRAND_NAME } from '@aglyn/aglyn/app-utils/platform-brand'\nimport { memo, useCallback, useId } from 'react'\nimport * as CommerceModel from '../../model'\n\ntype Patch = Partial<CommerceModel.HostProduct>\n\nexport interface ProductRegisterFieldsProps {\n posQuickKey: boolean\n /** `productSellsOnline` of the product: absent reads as on. */\n sellOnline: boolean\n /** What the site does with the reviews of a product sold in person only (AGL-4060). */\n inStoreReviews?: CommerceModel.HostProduct['inStoreReviews']\n modifierGroups: readonly CommerceModel.ProductModifierGroup[]\n update: (patch: Patch) => void\n}\n\nfunction newId(prefix: string): string {\n return `${prefix}${Math.random().toString(36).slice(2, 10)}`\n}\n\n/** Dollars as typed, to whole cents; blank is free. */\nfunction centsFromDollars(value: string): number {\n const number = Math.round(Number(String(value).replace(/[^0-9.]/g, '')) * 100)\n return Number.isFinite(number) && number > 0 ? number : 0\n}\n\nexport interface ProductSellOnlineFieldProps {\n sellOnline: boolean\n /** What the site does with its reviews while it sells in person only; absent reads as `show`. */\n inStoreReviews?: CommerceModel.HostProduct['inStoreReviews']\n update: (patch: Patch) => void\n}\n\n/** The \"Reviews on your site\" choices, as the editor words them (AGL-4060). */\nconst IN_STORE_REVIEWS_OPTIONS: ReadonlyArray<{ value: 'show' | 'hide'; label: string; help: string }> = [\n {\n value: 'show',\n label: 'Show, marked Sold in store',\n help: 'Its reviews appear in your site’s reviews and its average, marked “Sold in store”, with no link to a product page.',\n },\n {\n value: 'hide',\n label: 'Hide',\n help: 'Its reviews appear nowhere on your site: not in the reviews list and not in its average. You still see them under Reviews here.',\n },\n]\n\n/**\n * The product's \"Sell online\" switch (AGL-4060). On (the default, and what\n * every product stored before it reads as) the product sells on the site and\n * its channels as it always has; off, it sells in person only.\n */\nexport const ProductSellOnlineField = memo(function ProductSellOnlineField(\n props: ProductSellOnlineFieldProps,\n) {\n const { sellOnline, update } = props\n const helpId = useId()\n const reviews = props.inStoreReviews === 'hide' ? 'hide' : 'show'\n return (\n <Stack spacing={1}>\n <FormControlLabel\n control={\n <Switch\n checked={sellOnline}\n onChange={(event) => update({ sellOnline: event.target.checked })}\n slotProps={{ input: { 'aria-describedby': helpId } }}\n />\n }\n label=\"Sell online\"\n />\n <Typography id={helpId} variant=\"body2\" color=\"text.secondary\">\n {sellOnline\n ? 'Sold on your site — its product page, product grids, search, the cart and checkout — and in any shopping feeds and marketplaces you connect, as well as in person.'\n : `In person only: sold at the register, the kiosk, the ${PLATFORM_BRAND_NAME} POS apps and on draft orders. It has no page on your site and is left out of product grids, search, the sitemap, the cart, checkout and every shopping feed.`}\n </Typography>\n {/*\n Its reviews, while it sells in person only (AGL-4060): shown on the\n site marked \"Sold in store\" by default, or kept off it. Online, a\n product's reviews are always on its own page, so the choice is not\n offered.\n */}\n {sellOnline ? null : (\n <TextField\n select\n size=\"small\"\n label=\"Reviews on your site\"\n value={reviews}\n onChange={(event) => update({ inStoreReviews: event.target.value as 'show' | 'hide' })}\n helperText={IN_STORE_REVIEWS_OPTIONS.find((option) => option.value === reviews)?.help}\n >\n {IN_STORE_REVIEWS_OPTIONS.map((option) => (\n <MenuItem key={option.value} value={option.value}>\n {option.label}\n </MenuItem>\n ))}\n </TextField>\n )}\n </Stack>\n )\n})\n\n/**\n * The product's register settings (AGL-3607): whether it is a quick key on\n * the register's first screen, and its modifier groups — choices such as\n * \"Milk\" or \"Add-ons\" the cashier picks as the item is rung up, each choice\n * free or with a price added to the item. A group with a minimum of 1 or\n * more must be answered before the item can be added.\n *\n * Memoized on its own props like every section of this editor (AGL-3423):\n * a keystroke elsewhere in the dialog does not redraw it.\n */\nexport const ProductRegisterFields = memo(function ProductRegisterFields(\n props: ProductRegisterFieldsProps,\n) {\n const { modifierGroups, update } = props\n const setGroups = useCallback(\n (groups: CommerceModel.ProductModifierGroup[]) => update({ modifierGroups: groups }),\n [update],\n )\n const editGroup = (index: number, patch: Partial<CommerceModel.ProductModifierGroup>) =>\n setGroups(modifierGroups.map((group, at) => (at === index ? { ...group, ...patch } : group)))\n const editOption = (\n groupIndex: number,\n optionIndex: number,\n patch: Partial<CommerceModel.ProductModifierOption>,\n ) => {\n const group = modifierGroups[groupIndex]\n editGroup(groupIndex, {\n options: group.options.map((option, at) => (at === optionIndex ? { ...option, ...patch } : option)),\n })\n }\n const problem = CommerceModel.modifierGroupsProblem(modifierGroups)\n\n return (\n <Stack spacing={2}>\n <Typography variant=\"subtitle1\" component=\"h3\">\n {'At the register'}\n </Typography>\n <FormControlLabel\n control={\n <Switch\n checked={props.posQuickKey}\n onChange={(event) => update({ posQuickKey: event.target.checked })}\n />\n }\n label=\"Quick key at the register\"\n />\n <ProductSellOnlineField sellOnline={props.sellOnline} inStoreReviews={props.inStoreReviews} update={update} />\n <Typography variant=\"body2\" color=\"text.secondary\">\n {'Modifiers are choices added as the item is rung up, such as a milk or an extra shot. ' +\n 'Each can be free or add to the price.'}\n </Typography>\n {modifierGroups.map((group, groupIndex) => (\n <Box\n key={group.id}\n role=\"group\"\n aria-label={group.name || 'Modifier group'}\n sx={{ border: 1, borderColor: 'divider', borderRadius: 1, p: 2 }}\n >\n <Stack spacing={1.5}>\n <Stack direction=\"row\" spacing={1} sx={{ alignItems: 'flex-start' }}>\n <TextField\n label=\"Group name\"\n size=\"small\"\n value={group.name}\n onChange={(event) => editGroup(groupIndex, { name: event.target.value })}\n sx={{ flex: 1 }}\n />\n <TextField\n label=\"At least\"\n size=\"small\"\n value={group.min}\n onChange={(event) =>\n editGroup(groupIndex, { min: Math.max(0, Math.round(Number(event.target.value) || 0)) })\n }\n helperText={group.min > 0 ? 'Required' : 'Optional'}\n sx={{ width: 96 }}\n slotProps={{ htmlInput: { inputMode: 'numeric' } }}\n />\n <TextField\n label=\"At most\"\n size=\"small\"\n value={group.max}\n onChange={(event) =>\n editGroup(groupIndex, { max: Math.max(1, Math.round(Number(event.target.value) || 1)) })\n }\n sx={{ width: 96 }}\n slotProps={{ htmlInput: { inputMode: 'numeric' } }}\n />\n <Button\n color=\"error\"\n onClick={() => setGroups(modifierGroups.filter((_group, at) => at !== groupIndex))}\n >\n {'Remove group'}\n </Button>\n </Stack>\n {group.options.map((option, optionIndex) => (\n <Stack key={option.id} direction=\"row\" spacing={1} sx={{ alignItems: 'center' }}>\n <TextField\n label=\"Choice\"\n size=\"small\"\n value={option.name}\n onChange={(event) => editOption(groupIndex, optionIndex, { name: event.target.value })}\n sx={{ flex: 1 }}\n />\n <TextField\n label=\"Adds ($)\"\n size=\"small\"\n defaultValue={option.priceCents ? (option.priceCents / 100).toFixed(2) : ''}\n placeholder=\"0.00\"\n onBlur={(event) =>\n editOption(groupIndex, optionIndex, { priceCents: centsFromDollars(event.target.value) })\n }\n sx={{ width: 120 }}\n slotProps={{ htmlInput: { inputMode: 'decimal' } }}\n />\n <IconButton\n aria-label={`Remove ${option.name || 'choice'}`}\n onClick={() =>\n editGroup(groupIndex, {\n options: group.options.filter((_option, at) => at !== optionIndex),\n max: Math.max(1, Math.min(group.max, group.options.length - 1)),\n })\n }\n >\n {'✕'}\n </IconButton>\n </Stack>\n ))}\n <Box>\n <Button\n onClick={() =>\n editGroup(groupIndex, {\n options: [...group.options, { id: newId('o'), name: '', priceCents: 0 }],\n })\n }\n disabled={group.options.length >= CommerceModel.POS_MAX_MODIFIER_OPTIONS}\n >\n {'Add choice'}\n </Button>\n </Box>\n </Stack>\n </Box>\n ))}\n <Box>\n <Button\n variant=\"outlined\"\n onClick={() =>\n setGroups([\n ...modifierGroups,\n {\n id: newId('g'),\n name: '',\n min: 0,\n max: 1,\n options: [{ id: newId('o'), name: '', priceCents: 0 }],\n },\n ])\n }\n disabled={modifierGroups.length >= CommerceModel.POS_MAX_MODIFIER_GROUPS}\n >\n {'Add modifier group'}\n </Button>\n </Box>\n {problem && modifierGroups.length ? (\n <Typography variant=\"body2\" color=\"warning.main\">\n {problem}\n </Typography>\n ) : null}\n </Stack>\n )\n})\n"],"names":["Box","Button","FormControlLabel","IconButton","MenuItem","Stack","Switch","TextField","Typography","PLATFORM_BRAND_NAME","memo","useCallback","useId","CommerceModel","newId","prefix","Math","random","toString","slice","centsFromDollars","value","number","round","Number","String","replace","isFinite","IN_STORE_REVIEWS_OPTIONS","label","help","ProductSellOnlineField","props","sellOnline","update","helpId","reviews","inStoreReviews","spacing","control","checked","onChange","event","target","slotProps","input","id","variant","color","select","size","helperText","find","option","map","ProductRegisterFields","modifierGroups","setGroups","groups","editGroup","index","patch","group","at","editOption","groupIndex","optionIndex","options","problem","modifierGroupsProblem","component","posQuickKey","role","aria-label","name","sx","border","borderColor","borderRadius","p","direction","alignItems","flex","min","max","width","htmlInput","inputMode","onClick","filter","_group","defaultValue","priceCents","toFixed","placeholder","onBlur","_option","length","disabled","POS_MAX_MODIFIER_OPTIONS","POS_MAX_MODIFIER_GROUPS"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC,GACD;;;AAEA,SACEA,GAAG,EACHC,MAAM,EACNC,gBAAgB,EAChBC,UAAU,EACVC,QAAQ,EACRC,KAAK,EACLC,MAAM,EACNC,SAAS,EACTC,UAAU,QACL,gBAAe;AACtB,SAASC,mBAAmB,QAAQ,wCAAuC;AAC3E,SAASC,IAAI,EAAEC,WAAW,EAAEC,KAAK,QAAQ,QAAO;AAChD,YAAYC,mBAAmB,uBAAa;AAc5C,SAASC,MAAMC,MAAc;IAC3B,OAAO,GAAGA,SAASC,KAAKC,MAAM,GAAGC,QAAQ,CAAC,IAAIC,KAAK,CAAC,GAAG,KAAK;AAC9D;AAEA,qDAAqD,GACrD,SAASC,iBAAiBC,KAAa;IACrC,MAAMC,SAASN,KAAKO,KAAK,CAACC,OAAOC,OAAOJ,OAAOK,OAAO,CAAC,YAAY,OAAO;IAC1E,OAAOF,OAAOG,QAAQ,CAACL,WAAWA,SAAS,IAAIA,SAAS;AAC1D;AASA,6EAA6E,GAC7E,MAAMM,2BAAmG;IACvG;QACEP,OAAO;QACPQ,OAAO;QACPC,MAAM;IACR;IACA;QACET,OAAO;QACPQ,OAAO;QACPC,MAAM;IACR;CACD;AAED;;;;CAIC,GACD,OAAO,MAAMC,uCAAyB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AErB,IAAIhC,MAAM;wCAAM4D,MAAM;wCAAIkB,YAAY;oCAAE;iCAAE;4BACxD;yBACD;oBAEHM,UAAU1C,eAAeyC,MAAM,IAAIpF,cAAcuF,uBAAuB;8BAEvE;;;YAGJhC,WAAWZ,eAAeyC,MAAM,iBAC/B,KAACzF;gBAAWuC,SAAQ;gBAAQC,OAAM;0BAC/BoB;iBAED;;;AAGV,GAAE"}
@@ -33,7 +33,7 @@ import { useListColumnSort } from "@aglyn/shared-ui-jsx/hooks/use-list-column-so
33
33
  import { useListGridFilter } from "@aglyn/shared-ui-jsx/hooks/use-list-grid-filter";
34
34
  import { useSnackbar } from "@aglyn/shared-ui-snackstack";
35
35
  import { Timestamp } from "@aglyn/shared-util-timestamp";
36
- import { Alert, Box, Button, Chip, Dialog, DialogActions, DialogContent, DialogTitle, MenuItem, Stack, TextField, Typography } from "@mui/material";
36
+ import { Alert, Box, Button, Chip, Dialog, DialogActions, DialogContent, DialogTitle, MenuItem, Stack, TextField, Tooltip, Typography } from "@mui/material";
37
37
  import { addDoc, collection, doc, documentId, limit, orderBy, query, updateDoc, where } from "firebase/firestore";
38
38
  import { getLiveCountFromServer } from "@aglyn/aglyn/app-utils/live-document-count.client";
39
39
  import { useCallback, useEffect, useMemo, useState } from "react";
@@ -618,7 +618,16 @@ const STATUS_COLOR = {
618
618
  label: "In person only",
619
619
  size: "small",
620
620
  variant: "outlined"
621
- })
621
+ }),
622
+ CommerceModel.productIsSample(row) ? /*#__PURE__*/ _jsx(Tooltip, {
623
+ title: CommerceModel.PRODUCT_SAMPLE_NOTE,
624
+ children: /*#__PURE__*/ _jsx(Chip, {
625
+ label: "Sample",
626
+ size: "small",
627
+ color: "info",
628
+ variant: "outlined"
629
+ })
630
+ }) : null
622
631
  ]
623
632
  });
624
633
  }