@mistriwork/mistri 1.0.0-rc.12 → 1.0.0-rc.13
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.
- package/README.md +4 -3
- package/dist/client/assets/LayoutBuilder-MPzkVU2e.js.map +1 -1
- package/dist/client/assets/index-D2dHI6hR.js.map +1 -1
- package/dist/client/assets/shell-TreN_uLs.js.map +1 -1
- package/dist/docs/access-model.md +1 -1
- package/dist/docs/build-and-deploy.md +0 -1
- package/dist/docs/cli.md +1 -1
- package/dist/docs/glossary.md +3 -3
- package/dist/docs/query.md +9 -21
- package/dist/docs/status.md +3 -3
- package/dist/embed/react/chunks/LayoutBuilder-Cbxa_wve.js.map +1 -1
- package/dist/embed/react/chunks/app-0UZ1Re1k.js.map +1 -1
- package/dist/embed/react/chunks/page-Bx4o1kpQ.js.map +1 -1
- package/dist/embed/react/chunks/palette-Bb7Lf6eo.js.map +1 -1
- package/dist/embed/react/chunks/shell-DZRACiB9.js.map +1 -1
- package/dist/embed/react/chunks/write-BQO4CFc9.js.map +1 -1
- package/dist/embed/react/index.js +1 -1
- package/dist/server/build/dockerfile.js +1 -1
- package/dist/server/cli/usage.js +2 -2
- package/dist/ui/index.js +2 -2
- package/dist/ui/page.js +2 -2
- package/dist/ui/{shared-N4Ej8yRD.js → shared-1PD7TOTJ.js} +5 -5
- package/dist/ui/{shared-N4Ej8yRD.js.map → shared-1PD7TOTJ.js.map} +1 -1
- package/dist/ui/{shared-D5m86-4o.js → shared-1gMnOu9J.js} +6 -6
- package/dist/ui/{shared-D5m86-4o.js.map → shared-1gMnOu9J.js.map} +1 -1
- package/dist/ui/{shared-Ctaj8mR2.js → shared-5RQMi4BR.js} +3 -3
- package/dist/ui/{shared-Ctaj8mR2.js.map → shared-5RQMi4BR.js.map} +1 -1
- package/dist/ui/{shared-DpLeIATZ.js → shared-B-BUF9fx.js} +2 -2
- package/dist/ui/{shared-DpLeIATZ.js.map → shared-B-BUF9fx.js.map} +1 -1
- package/dist/ui/{shared-DWYnjItP.js → shared-B-MhiPIN.js} +9 -9
- package/dist/ui/{shared-DWYnjItP.js.map → shared-B-MhiPIN.js.map} +1 -1
- package/dist/ui/{shared-0fNuhSbG.js → shared-B07qIMlE.js} +5 -5
- package/dist/ui/{shared-0fNuhSbG.js.map → shared-B07qIMlE.js.map} +1 -1
- package/dist/ui/{shared-lYtMadRU.js → shared-B1SAS_J-.js} +3 -3
- package/dist/ui/{shared-lYtMadRU.js.map → shared-B1SAS_J-.js.map} +1 -1
- package/dist/ui/{shared-CpI0Y8M5.js → shared-B4jgU8h9.js} +6 -6
- package/dist/ui/{shared-CpI0Y8M5.js.map → shared-B4jgU8h9.js.map} +1 -1
- package/dist/ui/{shared-Cxu1c35l.js → shared-B5aBCUi7.js} +30 -30
- package/dist/ui/{shared-Cxu1c35l.js.map → shared-B5aBCUi7.js.map} +1 -1
- package/dist/ui/{shared-CAe-US1q.js → shared-B9H7_Pji.js} +5 -5
- package/dist/ui/{shared-CAe-US1q.js.map → shared-B9H7_Pji.js.map} +1 -1
- package/dist/ui/{shared-Q2bgBaYo.js → shared-BAXr20S-.js} +4 -4
- package/dist/ui/{shared-Q2bgBaYo.js.map → shared-BAXr20S-.js.map} +1 -1
- package/dist/ui/{shared-CyEefFFb.js → shared-BDDUzH-f.js} +19 -19
- package/dist/ui/{shared-CyEefFFb.js.map → shared-BDDUzH-f.js.map} +1 -1
- package/dist/ui/{shared-BdhPI6dq.js → shared-BGmkeDeW.js} +3 -3
- package/dist/ui/{shared-BdhPI6dq.js.map → shared-BGmkeDeW.js.map} +1 -1
- package/dist/ui/{shared-DONIpq2q.js → shared-BHCQ60yN.js} +2 -2
- package/dist/ui/{shared-DONIpq2q.js.map → shared-BHCQ60yN.js.map} +1 -1
- package/dist/ui/{shared-CNmaAv64.js → shared-BHsjawAG.js} +8 -8
- package/dist/ui/{shared-CNmaAv64.js.map → shared-BHsjawAG.js.map} +1 -1
- package/dist/ui/{shared-DgjU9kOy.js → shared-BIQuK_nq.js} +4 -4
- package/dist/ui/{shared-DgjU9kOy.js.map → shared-BIQuK_nq.js.map} +1 -1
- package/dist/ui/{shared-icSQAj21.js → shared-BOe4W2FI.js} +3 -3
- package/dist/ui/{shared-icSQAj21.js.map → shared-BOe4W2FI.js.map} +1 -1
- package/dist/ui/{shared-BlxoOJSk.js → shared-BPpC08ip.js} +3 -3
- package/dist/ui/{shared-BlxoOJSk.js.map → shared-BPpC08ip.js.map} +1 -1
- package/dist/ui/{shared-BtiFL37J.js → shared-BdA3LPCB.js} +2 -2
- package/dist/ui/{shared-BtiFL37J.js.map → shared-BdA3LPCB.js.map} +1 -1
- package/dist/ui/{shared-CvR94vn4.js → shared-Be3nbWsd.js} +11 -11
- package/dist/ui/{shared-CvR94vn4.js.map → shared-Be3nbWsd.js.map} +1 -1
- package/dist/ui/{shared-Bl_nF_IH.js → shared-Bf30ZLoS.js} +8 -4
- package/dist/ui/shared-Bf30ZLoS.js.map +1 -0
- package/dist/ui/{shared-DijrJ_V-.js → shared-BguP_BaR.js} +7 -7
- package/dist/ui/{shared-DijrJ_V-.js.map → shared-BguP_BaR.js.map} +1 -1
- package/dist/ui/{shared-DPAVoWY0.js → shared-BoLbc2WD.js} +17 -2
- package/dist/ui/{shared-DPAVoWY0.js.map → shared-BoLbc2WD.js.map} +1 -1
- package/dist/ui/{shared-BkdBTYwx.js → shared-BttyOW4W.js} +3 -3
- package/dist/ui/{shared-BkdBTYwx.js.map → shared-BttyOW4W.js.map} +1 -1
- package/dist/ui/{shared-CQWLz8uT.js → shared-BumxsBlA.js} +10 -10
- package/dist/ui/{shared-CQWLz8uT.js.map → shared-BumxsBlA.js.map} +1 -1
- package/dist/ui/{shared-Dzu7tFiC.js → shared-Bw73ktBk.js} +3 -3
- package/dist/ui/{shared-Dzu7tFiC.js.map → shared-Bw73ktBk.js.map} +1 -1
- package/dist/ui/{shared-BhAYErSx.js → shared-C1B0GH0e.js} +4 -4
- package/dist/ui/{shared-BhAYErSx.js.map → shared-C1B0GH0e.js.map} +1 -1
- package/dist/ui/{shared-BQJQcGgj.js → shared-C2FsyYr7.js} +4 -4
- package/dist/ui/{shared-BQJQcGgj.js.map → shared-C2FsyYr7.js.map} +1 -1
- package/dist/ui/{shared-B9lw2Ryh.js → shared-C2RU1qjv.js} +4 -4
- package/dist/ui/{shared-B9lw2Ryh.js.map → shared-C2RU1qjv.js.map} +1 -1
- package/dist/ui/{shared-DQYNI9wO.js → shared-C42f07hJ.js} +5 -5
- package/dist/ui/{shared-DQYNI9wO.js.map → shared-C42f07hJ.js.map} +1 -1
- package/dist/ui/{shared-CqCZ8wMY.js → shared-C4LkPCU4.js} +3 -3
- package/dist/ui/{shared-CqCZ8wMY.js.map → shared-C4LkPCU4.js.map} +1 -1
- package/dist/ui/{shared-BhtpgOpa.js → shared-C4wSfz6k.js} +9 -9
- package/dist/ui/{shared-BhtpgOpa.js.map → shared-C4wSfz6k.js.map} +1 -1
- package/dist/ui/{shared-BHc2Izkj.js → shared-C9DZtSFH.js} +2 -2
- package/dist/ui/{shared-BHc2Izkj.js.map → shared-C9DZtSFH.js.map} +1 -1
- package/dist/ui/{shared-DW1YuiNS.js → shared-CA52ClGo.js} +2 -2
- package/dist/ui/{shared-DW1YuiNS.js.map → shared-CA52ClGo.js.map} +1 -1
- package/dist/ui/{shared-BbSbilkh.js → shared-CBciTwm6.js} +9 -9
- package/dist/ui/{shared-BbSbilkh.js.map → shared-CBciTwm6.js.map} +1 -1
- package/dist/ui/{shared-C-J32eBn.js → shared-CL3RLKDA.js} +16 -16
- package/dist/ui/{shared-C-J32eBn.js.map → shared-CL3RLKDA.js.map} +1 -1
- package/dist/ui/{shared-Ck8S4OxW.js → shared-CLq3-_hW.js} +3 -3
- package/dist/ui/{shared-Ck8S4OxW.js.map → shared-CLq3-_hW.js.map} +1 -1
- package/dist/ui/{shared-Q5WefT7G.js → shared-CMjK-Ucd.js} +3 -3
- package/dist/ui/{shared-Q5WefT7G.js.map → shared-CMjK-Ucd.js.map} +1 -1
- package/dist/ui/{shared-D3MAuEA3.js → shared-CPjpSFGh.js} +2 -2
- package/dist/ui/{shared-D3MAuEA3.js.map → shared-CPjpSFGh.js.map} +1 -1
- package/dist/ui/{shared-VshXGwXP.js → shared-CSPhENq3.js} +2 -2
- package/dist/ui/{shared-VshXGwXP.js.map → shared-CSPhENq3.js.map} +1 -1
- package/dist/ui/{shared-DJrJaE73.js → shared-CZJE4Bmp.js} +3 -3
- package/dist/ui/{shared-DJrJaE73.js.map → shared-CZJE4Bmp.js.map} +1 -1
- package/dist/ui/{shared-D7ONOwI7.js → shared-C_BhUL2I.js} +7 -7
- package/dist/ui/{shared-D7ONOwI7.js.map → shared-C_BhUL2I.js.map} +1 -1
- package/dist/ui/{shared-j-2peBIB.js → shared-CbeujwdU.js} +4 -4
- package/dist/ui/{shared-j-2peBIB.js.map → shared-CbeujwdU.js.map} +1 -1
- package/dist/ui/{shared-D5GrOEa2.js → shared-Cbf-o4Dt.js} +4 -4
- package/dist/ui/{shared-D5GrOEa2.js.map → shared-Cbf-o4Dt.js.map} +1 -1
- package/dist/ui/{shared-HwiPIajr.js → shared-CdNmeNHh.js} +3 -3
- package/dist/ui/{shared-HwiPIajr.js.map → shared-CdNmeNHh.js.map} +1 -1
- package/dist/ui/{shared-ZCFt-CPb.js → shared-CdQOMD8J.js} +3 -3
- package/dist/ui/{shared-ZCFt-CPb.js.map → shared-CdQOMD8J.js.map} +1 -1
- package/dist/ui/{shared-ClhXSGGK.js → shared-CdiPYlTh.js} +2 -2
- package/dist/ui/{shared-ClhXSGGK.js.map → shared-CdiPYlTh.js.map} +1 -1
- package/dist/ui/{shared-DA8_pVRZ.js → shared-CepLAhwm.js} +2 -2
- package/dist/ui/{shared-DA8_pVRZ.js.map → shared-CepLAhwm.js.map} +1 -1
- package/dist/ui/{shared-BrYKjrnM.js → shared-Ch82h_Fu.js} +6 -6
- package/dist/ui/{shared-BrYKjrnM.js.map → shared-Ch82h_Fu.js.map} +1 -1
- package/dist/ui/{shared-C4UrE8Fb.js → shared-Chp88all.js} +3 -3
- package/dist/ui/{shared-C4UrE8Fb.js.map → shared-Chp88all.js.map} +1 -1
- package/dist/ui/{shared-CWa80DTO.js → shared-Ci16s2rN.js} +9 -9
- package/dist/ui/{shared-CWa80DTO.js.map → shared-Ci16s2rN.js.map} +1 -1
- package/dist/ui/{shared-tksTLD6Q.js → shared-CiqNkoE1.js} +5 -5
- package/dist/ui/{shared-tksTLD6Q.js.map → shared-CiqNkoE1.js.map} +1 -1
- package/dist/ui/{shared-yt7DjSrq.js → shared-CpMhOq8F.js} +2 -2
- package/dist/ui/{shared-yt7DjSrq.js.map → shared-CpMhOq8F.js.map} +1 -1
- package/dist/ui/{shared-Dm0z5WUl.js → shared-CrWv5JKH.js} +6 -6
- package/dist/ui/{shared-Dm0z5WUl.js.map → shared-CrWv5JKH.js.map} +1 -1
- package/dist/ui/{shared-CQL3FGHc.js → shared-Csfi3Pti.js} +2 -2
- package/dist/ui/{shared-CQL3FGHc.js.map → shared-Csfi3Pti.js.map} +1 -1
- package/dist/ui/{shared-BKNRbm-V.js → shared-CuZt26rm.js} +2 -2
- package/dist/ui/{shared-BKNRbm-V.js.map → shared-CuZt26rm.js.map} +1 -1
- package/dist/ui/{shared-Guq3upiR.js → shared-Cws_z-TS.js} +2 -2
- package/dist/ui/{shared-Guq3upiR.js.map → shared-Cws_z-TS.js.map} +1 -1
- package/dist/ui/{shared-Bw_qZeIj.js → shared-D1KWuCg6.js} +2 -2
- package/dist/ui/{shared-Bw_qZeIj.js.map → shared-D1KWuCg6.js.map} +1 -1
- package/dist/ui/{shared-CuCZKwXW.js → shared-D66ju_Cb.js} +23 -23
- package/dist/ui/{shared-CuCZKwXW.js.map → shared-D66ju_Cb.js.map} +1 -1
- package/dist/ui/{shared-DYfX7NSM.js → shared-DGaQZXnw.js} +2 -2
- package/dist/ui/{shared-DYfX7NSM.js.map → shared-DGaQZXnw.js.map} +1 -1
- package/dist/ui/{shared-B3Hp8tOv.js → shared-DHy41sET.js} +6 -6
- package/dist/ui/{shared-B3Hp8tOv.js.map → shared-DHy41sET.js.map} +1 -1
- package/dist/ui/{shared-CXyd7IKi.js → shared-DKEOMQ6l.js} +2 -2
- package/dist/ui/{shared-CXyd7IKi.js.map → shared-DKEOMQ6l.js.map} +1 -1
- package/dist/ui/{shared-Ccmc8YO0.js → shared-DSUICuaJ.js} +33 -33
- package/dist/ui/{shared-Ccmc8YO0.js.map → shared-DSUICuaJ.js.map} +1 -1
- package/dist/ui/{shared-CL2iw_js.js → shared-DUPMRoO0.js} +13 -13
- package/dist/ui/{shared-CL2iw_js.js.map → shared-DUPMRoO0.js.map} +1 -1
- package/dist/ui/{shared-Dtp4eRul.js → shared-DVfdm6ah.js} +2 -2
- package/dist/ui/{shared-Dtp4eRul.js.map → shared-DVfdm6ah.js.map} +1 -1
- package/dist/ui/{shared-BJ5Ex32G.js → shared-DXM7d7lJ.js} +3 -3
- package/dist/ui/{shared-BJ5Ex32G.js.map → shared-DXM7d7lJ.js.map} +1 -1
- package/dist/ui/{shared-BFr6ld0e.js → shared-DXbMlcev.js} +2 -2
- package/dist/ui/{shared-BFr6ld0e.js.map → shared-DXbMlcev.js.map} +1 -1
- package/dist/ui/{shared-BUp3jv-N.js → shared-D_SkPtJ9.js} +6 -6
- package/dist/ui/{shared-BUp3jv-N.js.map → shared-D_SkPtJ9.js.map} +1 -1
- package/dist/ui/{shared-CdNomVzH.js → shared-Dd21k2ic.js} +4 -4
- package/dist/ui/{shared-CdNomVzH.js.map → shared-Dd21k2ic.js.map} +1 -1
- package/dist/ui/{shared-gRMbxmpu.js → shared-Dh0nHtLZ.js} +8 -8
- package/dist/ui/{shared-gRMbxmpu.js.map → shared-Dh0nHtLZ.js.map} +1 -1
- package/dist/ui/{shared-BKGJgjog.js → shared-DkOdSpSK.js} +3 -3
- package/dist/ui/{shared-BKGJgjog.js.map → shared-DkOdSpSK.js.map} +1 -1
- package/dist/ui/{shared-BMsh72Uq.js → shared-Dkph5ckT.js} +2 -2
- package/dist/ui/{shared-BMsh72Uq.js.map → shared-Dkph5ckT.js.map} +1 -1
- package/dist/ui/{shared-Be1HpDOB.js → shared-Dl1_Nx--.js} +3 -3
- package/dist/ui/{shared-Be1HpDOB.js.map → shared-Dl1_Nx--.js.map} +1 -1
- package/dist/ui/{shared-BQIZWOoJ.js → shared-Dm0IGbAf.js} +2 -2
- package/dist/ui/{shared-BQIZWOoJ.js.map → shared-Dm0IGbAf.js.map} +1 -1
- package/dist/ui/{shared-DSUtcU5S.js → shared-DnIkTpPr.js} +5 -5
- package/dist/ui/{shared-DSUtcU5S.js.map → shared-DnIkTpPr.js.map} +1 -1
- package/dist/ui/{shared-DsxGbYlV.js → shared-Docl_0tq.js} +3 -3
- package/dist/ui/{shared-DsxGbYlV.js.map → shared-Docl_0tq.js.map} +1 -1
- package/dist/ui/{shared-DZskrV26.js → shared-DprrHC72.js} +2 -2
- package/dist/ui/{shared-DZskrV26.js.map → shared-DprrHC72.js.map} +1 -1
- package/dist/ui/{shared-Bmw43Hwf.js → shared-DyKsJTZs.js} +2 -2
- package/dist/ui/{shared-Bmw43Hwf.js.map → shared-DyKsJTZs.js.map} +1 -1
- package/dist/ui/{shared-BLG88Pya.js → shared-FO7vfI3F.js} +4 -4
- package/dist/ui/{shared-BLG88Pya.js.map → shared-FO7vfI3F.js.map} +1 -1
- package/dist/ui/{shared-DLSd80D1.js → shared-HalAVHjv.js} +3 -3
- package/dist/ui/{shared-DLSd80D1.js.map → shared-HalAVHjv.js.map} +1 -1
- package/dist/ui/{shared-D1mMBLdj.js → shared-JvcI-LWp.js} +15 -15
- package/dist/ui/{shared-D1mMBLdj.js.map → shared-JvcI-LWp.js.map} +1 -1
- package/dist/ui/{shared-C6Hv_4O0.js → shared-K7Ym27yg.js} +2 -2
- package/dist/ui/{shared-C6Hv_4O0.js.map → shared-K7Ym27yg.js.map} +1 -1
- package/dist/ui/{shared-B39ln7oi.js → shared-SzlnwfJO.js} +3 -3
- package/dist/ui/{shared-B39ln7oi.js.map → shared-SzlnwfJO.js.map} +1 -1
- package/dist/ui/{shared-DgPn_Jll.js → shared-TrGbd1FY.js} +3 -3
- package/dist/ui/{shared-DgPn_Jll.js.map → shared-TrGbd1FY.js.map} +1 -1
- package/dist/ui/{shared-DrFb-XtA.js → shared-WhbuObEW.js} +2 -2
- package/dist/ui/{shared-DrFb-XtA.js.map → shared-WhbuObEW.js.map} +1 -1
- package/dist/ui/{shared-DiFQljcq.js → shared-XcSKDp6N.js} +11 -11
- package/dist/ui/{shared-DiFQljcq.js.map → shared-XcSKDp6N.js.map} +1 -1
- package/dist/ui/{shared-CMAg58rY.js → shared-Z4uBJU6I.js} +7 -6
- package/dist/ui/shared-Z4uBJU6I.js.map +1 -0
- package/dist/ui/{shared-BnUptuUp.js → shared-bAgeiRa5.js} +2 -2
- package/dist/ui/{shared-BnUptuUp.js.map → shared-bAgeiRa5.js.map} +1 -1
- package/dist/ui/{shared-BxMvSjey.js → shared-cgXG7OgZ.js} +5 -5
- package/dist/ui/{shared-BxMvSjey.js.map → shared-cgXG7OgZ.js.map} +1 -1
- package/dist/ui/{shared-u4CG2kQJ.js → shared-eZ0SB_zm.js} +2 -2
- package/dist/ui/{shared-u4CG2kQJ.js.map → shared-eZ0SB_zm.js.map} +1 -1
- package/dist/ui/{shared-L90bWW8e.js → shared-frKFb79C.js} +2 -2
- package/dist/ui/{shared-L90bWW8e.js.map → shared-frKFb79C.js.map} +1 -1
- package/dist/ui/{shared-Dd34nhkw.js → shared-hAayNSRA.js} +3 -3
- package/dist/ui/{shared-Dd34nhkw.js.map → shared-hAayNSRA.js.map} +1 -1
- package/dist/ui/{shared-DzC64cpp.js → shared-j_J16p2B.js} +2 -2
- package/dist/ui/{shared-DzC64cpp.js.map → shared-j_J16p2B.js.map} +1 -1
- package/dist/ui/{shared-DX7HRIV-.js → shared-tqpl5N3g.js} +6 -6
- package/dist/ui/{shared-DX7HRIV-.js.map → shared-tqpl5N3g.js.map} +1 -1
- package/dist/ui/{shared-BS5dBMpA.js → shared-y-6_ZDts.js} +2 -2
- package/dist/ui/{shared-BS5dBMpA.js.map → shared-y-6_ZDts.js.map} +1 -1
- package/dist/ui/{shared-Cv5v_MP1.js → shared-zG6e1Rhz.js} +13 -13
- package/dist/ui/{shared-Cv5v_MP1.js.map → shared-zG6e1Rhz.js.map} +1 -1
- package/dist/ui/testing.js +1 -1
- package/package.json +4 -4
- package/dist/docs/cli-browser.md +0 -232
- package/dist/docs/database-browser.md +0 -115
- package/dist/docs/keyboard.md +0 -63
- package/dist/docs/mcp.md +0 -86
- package/dist/ui/shared-Bl_nF_IH.js.map +0 -1
- package/dist/ui/shared-CMAg58rY.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shared-C4UrE8Fb.js","names":["_Fragment","say","say","say","say"],"sources":["../../../kit/src/client/recordIntent.ts","../../../engine/src/shared/dueDate.ts","../../../kit/src/client/uiBridge.ts","../../../kit/src/client/components/dueOpen.ts","../../../kit/src/client/components/componentSlot.tsx","../../../kit/src/client/components/valueRenderers.tsx","../../../kit/src/client/copy/record/components/Value.ts","../../../kit/src/client/components/Value.tsx","../../../kit/src/client/fieldErrors.ts","../../../kit/src/client/copy/shell/updateAttempts.ts","../../../kit/src/client/updateAttempts.ts","../../../kit/src/client/copy/lists/bulkActions.ts","../../../kit/src/client/bulkActions.ts"],"sourcesContent":["/**\n * What a row or a link that opens a record carries (`data-opens`), for the\n * press that begins reading the record's page before the press is over\n * (recordPress.ts). Depends on nothing, so any list can say it.\n */\nexport function opensRecord(tableId: string | undefined, key: unknown): string | undefined {\n if (!tableId || !key || typeof key !== 'object') return undefined;\n try {\n return JSON.stringify([tableId, key]);\n } catch {\n return undefined;\n }\n}\n","/**\n * A date named like a due date (`due_on`, `deadline`): the convention says it from today\n * (displayDefaults.ts), and the client draws one that has passed on a row still open in the\n * warning tone (client/components/dueOpen.ts). One name list, so the two cannot disagree.\n */\nexport const DUE = /^(due|due_on|due_at|due_date|deadline)$/i;\n","/**\n * What the SDK needs from the page's own navigation, handed in by the\n * modules that own it rather than imported from them: the App the reader is\n * in (the shell's answer, shellMode.ts), a record opened as a glance or a dialog (peekpanel.js) and\n * a view followed (viewLink.ts).\n *\n * Those modules sit in the page's one large tangle of imports (a page draws\n * a record, which draws a page), and the SDK is reached from inside it — a\n * value renderer from `Value`, a custom section from `PageSections`. Were the\n * SDK to import them, it would join the tangle (test/repo/runtime-cycles).\n * So it imports nothing of the page's navigation; each owner registers here\n * when it loads, as peekpanel.js already registers its peeker with core.js.\n */\nimport { shell } from './shellMode.js';\n\ntype OpenPeek = (tableId: string, key: Record<string, unknown>, label: string, mode?: 'drawer' | 'modal') => void;\n\ntype CommandOutcome =\n | { status: 'applied'; message?: string; output?: unknown }\n | { status: 'refused'; message: string }\n | { status: 'closed' }\n | { status: 'unknown'; message: string; check(options?: { challenge?: string }): Promise<CommandOutcome> };\n\n/** What sdk/commands.tsx hands the SDK's host: a command as a component holds it, and a form over the page. */\ninterface CommandHost {\n /* UiCommandHandle (sdk/context.ts), said without importing the React half. */\n command: (\n ref: string,\n page?: string,\n ) => {\n label: string;\n granted: boolean;\n available(key: Readonly<Record<string, unknown>>): Promise<boolean>;\n run(\n key: Readonly<Record<string, unknown>>,\n input?: Readonly<Record<string, unknown>>,\n options?: { label?: string; challenge?: string; attempt?: string },\n ): Promise<CommandOutcome>;\n open(\n key: Readonly<Record<string, unknown>>,\n input?: Readonly<Record<string, unknown>>,\n options?: { label?: string; attempt?: string },\n ): Promise<CommandOutcome>;\n choices?(field: string): ReadonlyArray<{ value: string | number | boolean; label: string }> | undefined;\n };\n openForm: (view: string, prefill: Readonly<Record<string, string | number>>) => void;\n}\n\ninterface Bridge {\n activeApp: () => unknown;\n inAppMode: () => boolean;\n openPeek?: OpenPeek;\n openView?: (key: string, options?: { tab?: string; search?: string; filters?: Readonly<Record<string, string>> }) => boolean;\n commands?: CommandHost;\n}\n\n/* The App the page is showing, and whether it is showing it, are the shell's answers (shellMode.ts). */\nconst bridge: Bridge = { activeApp: () => shell().app(), inAppMode: () => shell().inApp() };\n\n/** peekpanel.js: a record opened beside the page, or over it. */\nexport function registerPeek(openPeek: OpenPeek): void {\n bridge.openPeek = openPeek;\n}\n/** viewLink.ts: one of the App's lists or dashboards followed. */\nexport function registerViewOpener(openView: NonNullable<Bridge['openView']>): void {\n bridge.openView = openView;\n}\n/* sdk/commands.tsx: a component's commands run through the page's own command pipeline and form. It\n draws the command form, whose fields may be components too, so the SDK's host may not import it. */\nexport function registerCommandHost(host: CommandHost): void {\n bridge.commands = host;\n}\n\nexport const pageBridge: Readonly<Bridge> = bridge;\n","/**\n * Whether a due date's row is still open, so a date that has passed is drawn in the warning tone\n * (valueModel.ts, the `relative` format). Only a date the conventions treat as a due date\n * (shared/dueDate.ts): a `created_at` an author asked to be said from today is history, not a\n * deadline. Open is read off the row, never guessed: its resource's machine (a state that is not\n * final), else a yes-or-no named like done (`completed`, Tick's task) that is no. A row that says\n * neither — the column not fetched, no machine, no such flag — is not called overdue.\n */\nimport type { ServedMachine } from '@mistriwork/engine/shared/servedApp.js';\nimport { DUE } from '@mistriwork/engine/shared/dueDate.js';\nimport { pageBridge } from '../uiBridge.js';\n\nconst DONE = /^(is_)?(done|complete|completed|closed|resolved)$/i;\nconst YES = new Set(['true', 't', '1', 'yes']);\n\nconst machineOf = (tableId: string): ServedMachine | undefined =>\n (pageBridge.activeApp() as { resources?: Record<string, { machine?: ServedMachine }> } | null)?.resources?.[tableId]?.machine;\n\nexport function dueOpen(tableId: string | undefined, column: string, row: Readonly<Record<string, unknown>> | undefined): boolean {\n if (!tableId || !row || !DUE.test(column)) return false;\n const machine = machineOf(tableId);\n if (machine) {\n const state = row[machine.column];\n if (state === null || state === undefined) return false;\n return !machine.states.some((s) => s.final && s.value === String(state));\n }\n const done = Object.keys(row).find((name) => DONE.test(name));\n if (done === undefined) return false;\n const value = row[done];\n if (value === null || value === undefined) return false;\n return !YES.has(String(value).toLowerCase());\n}\n","/**\n * A place in the kit an App's component may draw into: a value renderer in\n * a cell, an input in a form's field. The kit never waits for one and never\n * loads one itself. Until the module has arrived — fetched by the shell\n * (shellMode.ts `components`), the first draw that names it having asked —\n * the platform's own `fallback` stands in its place; then every slot showing\n * it redraws once. One that cannot load, or throws, is the fallback from then\n * on, said once in the console.\n *\n * Two of these were written out once each (the value renderers and the\n * inputs), the same cache, listeners and error boundary twice; this is the\n * one. Internal: an author meets the slots only as `ValueProps` and\n * `InputProps` (packages/mistri/schema/ui.d.ts).\n */\nimport { Component, createElement, useEffect, useSyncExternalStore, type ComponentType, type ReactNode } from 'react';\nimport { shell } from '../shellMode.js';\n\ninterface SlotOptions {\n /** The element the component is drawn inside, by class: `custom-value`, `custom-input`. */\n className: string;\n /** Fetch the component `id`; an input names the platform's own with a prefix, and fetches those its own way. */\n load: (id: string) => Promise<unknown>;\n /** Tell the console one cannot be loaded, and that one threw: once each, by the slot's own words. */\n couldNotLoad: (id: string, error: unknown) => void;\n threw: (id: string, error: unknown) => void;\n}\n\n/** A kind of slot: its cache of components by build, and the element that draws one. */\nexport function componentSlot<P extends object>({ className, load, couldNotLoad, threw }: SlotOptions) {\n const drawn = new Map<string, ComponentType<P> | null>();\n const asked = new Set<string>();\n const listeners = new Set<() => void>();\n let version = 0;\n\n /* Keyed by the build (the shell's `useKey`): a save that changed the component is asked for again. */\n function settle(key: string, component: ComponentType<P> | null): void {\n drawn.set(key, component);\n version += 1;\n for (const listener of listeners) listener();\n }\n\n function ask(id: string, key: string): void {\n if (asked.has(key)) return;\n asked.add(key);\n void load(id).then(\n (component) => settle(key, component as ComponentType<P>),\n (error: unknown) => {\n couldNotLoad(id, error);\n settle(key, null);\n },\n );\n }\n\n const subscribe = (listener: () => void) => {\n listeners.add(listener);\n return () => {\n listeners.delete(listener);\n };\n };\n const current = () => version;\n\n class Contained extends Component<{ id: string; slot: string; fallback: ReactNode; children: ReactNode }, { failed: boolean }> {\n state = { failed: false };\n static getDerivedStateFromError() {\n return { failed: true };\n }\n componentDidCatch(error: unknown) {\n /* Once per component: a column of a thousand cells is one mistake, not a thousand. */\n if (drawn.get(this.props.slot) === null) return;\n threw(this.props.id, error);\n settle(this.props.slot, null);\n }\n render() {\n return this.state.failed ? this.props.fallback : this.props.children;\n }\n }\n\n /** The component `id`, drawn with `props` once it is here, and `fallback` until then (or for good, if it cannot be). */\n function Slot({ id, fallback, props }: { id: string; fallback: ReactNode; props: P }) {\n useSyncExternalStore(subscribe, current, current);\n const key = shell().components.useKey(id);\n useEffect(() => {\n ask(id, key);\n }, [id, key]);\n const component = drawn.get(key);\n if (!component) return <>{fallback}</>;\n return (\n <Contained id={id} slot={key} fallback={fallback}>\n <span className={className} data-component={id}>\n {createElement(component, props)}\n </span>\n </Contained>\n );\n }\n return Slot;\n}\n","/**\n * A value renderer where a display rule stands: the author's component draws\n * one value in a grid cell, a record field or a card, and only draws it —\n * sort, filter, totals, export and search keep the raw value, and the\n * Workbench never runs one.\n *\n * A cell never waits for one. The value is drawn the platform's way (the\n * `fallback`) until the module has arrived, the first draw that names it\n * having asked for it; then every slot showing it redraws once. A renderer\n * that throws draws that value the platform's way from then on, said once in\n * the console. Small and in the first chunk, since Value and Grid use it; the\n * loading itself is the shell's (shellMode.ts `components`: in an App,\n * sdk/componentLoader.ts, with the page's side of the SDK, a chunk of its\n * own), and the slot is the kit's one (componentSlot.tsx).\n */\nimport type { ReactNode } from 'react';\nimport { shell } from '../shellMode.js';\nimport { componentSlot } from './componentSlot.js';\n\n/** What a value renderer receives: `ValueProps` in packages/mistri/schema/ui.d.ts. */\ninterface ValueRendererProps {\n value: unknown;\n row?: Record<string, unknown>;\n column: { name: string; resource: string };\n context: 'grid' | 'record' | 'card';\n compact: boolean;\n /** The tone the column's display rule gives this value, and the word it says it as (valueModel's ruleSays). */\n tone?: string;\n word?: string;\n}\n\nconst Slot = componentSlot<ValueRendererProps>({\n className: 'custom-value',\n load: (id) => shell().components.load(id),\n couldNotLoad: (id, error) => console.error(`the value renderer \"${id}\" could not be loaded; its values are drawn plain.`, error),\n threw: (id, error) => console.error(`the value renderer \"${id}\" threw; its values are drawn plain.`, error),\n});\n\n/** One value, drawn by the renderer `id` once it is here, and by `fallback` until then (or for good, if it cannot be). */\nexport function ValueSlot({ id, fallback, ...props }: ValueRendererProps & { id: string; fallback: ReactNode }) {\n return <Slot id={id} fallback={fallback} props={props} />;\n}\n","/** What Value says, in the record page room (packages/kit/src/client/messages.ts says how the catalog is split). */\nimport { defineMessages } from '../../../messages.js';\n\nexport const say = defineMessages({\n openReference: 'Open {label} ({table} {key})',\n openTableKey: 'Open {table} {key}',\n});\n","/**\n * One value, rendered by what it is — shared by every view that shows fields.\n *\n * `Dressed` is the app's dress when a display rule reaches the value: a\n * currency, a percent with its bar, a toned pill, a relative day. `Value`\n * is the plain rendering by the grid's planner. `RefJump` is a foreign key\n * as the walk it is: the value, the table it points at, a hover that shows\n * the row, a click that goes there.\n */\nimport { Fragment, type ReactNode } from 'react';\nimport { api, columnDisplay, emptyWord, findTable, openRecord, refsFrom, state } from '../core.js';\nimport { opensRecord } from '../recordIntent.js';\nimport type { ColumnMeta, TableMeta } from '@mistriwork/engine/shared/schema.js';\nimport { dressFor, linkFor, maskedText, ruleSays, type DisplayRule } from './valueModel.js';\nimport { rowCurrency } from '@mistriwork/engine/shared/money.js';\nimport { dueOpen } from './dueOpen.js';\nimport { JsonValue } from './JsonValue.js';\nimport { jsonValueOf, previewOf } from './jsonModel.js';\nimport { TAGS_TYPE, tagChips } from '@mistriwork/engine/shared/tagLists.js';\nimport { AvatarText, Dressed, Said } from './Dressed.js';\nimport { ValueSlot } from './valueRenderers.js';\nimport { say } from '../copy/record/components/Value.js';\nimport { shellBody } from '../shellHost.js';\n\n/* Drawn here and in the grid; the rules that draw them read no global (Dressed.tsx). */\nexport { AvatarText, Dressed };\n\n/** A value that is a link: mail, a call, or a web page, which opens beside the App rather than in place of it. */\nfunction ValueLink({ link }: { link: NonNullable<ReturnType<typeof linkFor>> }) {\n const text = breakable(link.text);\n /* The break points are not words: the link is named by its text whole. */\n const named = { title: link.text, ...(typeof text === 'string' ? {} : { 'aria-label': link.text }) };\n return link.kind === 'url' ? (\n <a className=\"value-link\" href={link.href} target=\"_blank\" rel=\"noopener noreferrer\" {...named}>\n {text}\n </a>\n ) : (\n <a className=\"value-link\" href={link.href} {...named}>\n {text}\n </a>\n );\n}\n\n/* An address has no spaces, so where a value wraps it would break mid-word.\n It may break after an @ or a slash and before a dot, a hyphen or a query's\n marks — where a reader sees the parts — and nowhere else unless one part\n alone is wider than its column (overflow-wrap). The text is unchanged. */\nfunction breakable(text: string): ReactNode {\n const parts = text.split(/(?<=[@/])|(?=[.\\-_?#&=])/);\n if (parts.length < 2) return text;\n return parts.map((part, index) => (\n <Fragment key={index}>\n {index > 0 && <wbr />}\n {part}\n </Fragment>\n ));\n}\n\ninterface ValueProps {\n col: ColumnMeta | undefined;\n value: unknown;\n /** The table the value belongs to, for the app's dress. Absent in the workbench's raw readings. */\n tableId?: string;\n /** Keep long text inline in constrained previews; full fields retain their prose layout. */\n compact?: boolean;\n /** Whether an address, a number or a page may be a link. Not where the value\n stands inside a target of its own — a card, a row that opens — since a\n link inside a button is neither; a compact value is one of those unless\n its caller says. */\n links?: boolean;\n /** Formatted text drawn whole even where the value is compact: a conversation's message is read, not glanced at. */\n wholeText?: boolean;\n /** The record the value is of, where a money rule reads its currency from another of its columns (money.ts). */\n row?: Readonly<Record<string, unknown>>;\n}\n\n/** A value as the record and the page show it: dressed when the app says, plain otherwise. */\nexport function Value(props: ValueProps) {\n const { col, value, tableId, compact = false } = props;\n const rule = tableId === undefined ? null : (columnDisplay(tableId, col?.name ?? '') as DisplayRule | null);\n /* The App's own renderer, where its display rule names one: the value drawn\n the platform's way until it has arrived, and whenever it cannot draw. An\n empty value is the platform's to say, as it is in a grid cell. */\n const renderer = rule?.component?.id;\n if (\n renderer &&\n tableId !== undefined &&\n maskedText(rule, value) === undefined &&\n value !== null &&\n value !== undefined &&\n shellBody().classList.contains('app-mode')\n ) {\n const { component: _component, ...rest } = rule!;\n return (\n <ValueSlot\n id={renderer}\n value={value}\n column={{ name: col?.name ?? '', resource: tableId }}\n context=\"record\"\n compact={compact}\n {...ruleSays(rest, value)}\n fallback={<PlatformValue {...props} />}\n />\n );\n }\n /* A rule's `face` sets the column's values in that face; the wrapper exists only then. */\n return rule?.face ? (\n <span className={`face-${rule.face}`}>\n <PlatformValue {...props} />\n </span>\n ) : (\n <PlatformValue {...props} />\n );\n}\n\nfunction PlatformValue({ col, value, tableId, compact = false, links = !compact, wholeText = false, row }: ValueProps) {\n if (value === null || value === undefined)\n return (\n <span className=\"null\" title=\"null\">\n {emptyWord()}\n </span>\n );\n /* A record's tags (tagLists.ts) are chips wherever a value is drawn: a phone's row cards said Thread's as the\n JSON the database answered. */\n if (col?.type === TAGS_TYPE) {\n const chips = tagChips(value);\n if (!chips.length)\n return (\n <span className=\"null\" title=\"null\">\n {emptyWord()}\n </span>\n );\n return (\n <span className=\"value-tags\">\n {chips.map((chip) => (\n <span key={chip.label} className={`record-tag tone tone-${chip.tone ?? 'neutral'}`}>\n {chip.label}\n </span>\n ))}\n </span>\n );\n }\n const json = jsonValueOf(col, value);\n if (json) return compact ? <span className=\"json-preview-text\">{previewOf(json.value)}</span> : <JsonValue value={json.value} />;\n const declared = tableId === undefined ? null : (columnDisplay(tableId, col?.name ?? '') as DisplayRule | null);\n /* A money column whose currency is the record's own: the code its row holds. */\n const owned =\n declared?.currencyColumn && row\n ? { ...declared, currency: rowCurrency(declared, row, declared.currency ?? '') || undefined }\n : declared;\n /* A due date passed on a row still open is drawn in the warning tone (dueOpen.ts). */\n const rule = owned?.format === 'relative' && dueOpen(tableId, col?.name ?? '', row) ? { ...owned, open: true } : owned;\n /* An address, a number or a page is something to act on: in an App it is\n a link (by its rule, or by a column named for it); the Workbench shows\n the data as it is. */\n /* A masked value is the placeholder before it is anything else: not a link to the value, not the author's renderer. */\n const mask = tableId === undefined ? undefined : maskedText(rule, value);\n if (mask !== undefined) return <Dressed dress={{ kind: 'masked', text: mask }} compact={compact} />;\n const link = tableId === undefined || !links ? null : linkFor(col?.name, value, rule, shellBody().classList.contains('app-mode'));\n if (link) return <ValueLink link={link} />;\n const dress = tableId === undefined ? null : dressFor(rule, value);\n if (dress) return <Dressed dress={dress} compact={compact && !(wholeText && dress.kind === 'richText')} />;\n /* In an App a vocabulary's value is a word, as its chip says it (\"On hold\"\n for `on_hold`); the Workbench shows the data exactly. */\n return <Said col={col} value={value} compact={compact} app={shellBody().classList.contains('app-mode')} />;\n}\n\ninterface Fk {\n from: { table: string; columns: string[] };\n to: { table: string; columns: string[] };\n}\n\n/**\n * The whole key a composite reference names, read off the row it sits in:\n * a chip that opened with only its own column carried half a key.\n */\nfunction referenceKey(\n table: TableMeta,\n columnName: string,\n row: Record<string, unknown>,\n targetTable: string,\n): Record<string, unknown> | null {\n const fk = ((state as { schema?: unknown }).schema ? (refsFrom(table.id) as Fk[]) : []).find(\n (f) => f.to.table === targetTable && f.from.columns.length > 1 && f.from.columns.includes(columnName),\n );\n if (!fk) return null;\n const values = fk.from.columns.map((c) => row[c]);\n if (values.some((v) => v === null || v === undefined)) return null;\n return Object.fromEntries(fk.to.columns.map((c, i) => [c, values[i]]));\n}\n\n/**\n * The record a reference names, by the key its address is made of. A real\n * foreign key names the primary key already; an App's declared reference\n * (a soft key, `product_sku` → `product.sku`) names another unique column,\n * so the primary key is read once, through the reader's own grants. A value\n * nothing matches opens nothing, as a dangling key would.\n */\nasync function byPrimaryKey(target: TableMeta, column: string, value: unknown): Promise<Record<string, unknown> | null> {\n const keys = target.columns.filter((item) => item.primaryKey).map((item) => item.name);\n if (!keys.length || (keys.length === 1 && keys[0] === column)) return { [column]: value };\n try {\n const data = (await api('/api/query', {\n table: target.id,\n columns: keys,\n filter: { groups: [[{ column, op: '=', value: value as string | number }]] },\n limit: 1,\n offset: 0,\n })) as { rows?: Array<Record<string, unknown>> };\n const row = data.rows?.[0];\n return row ? Object.fromEntries(keys.map((name) => [name, row[name]])) : null;\n } catch {\n return null;\n }\n}\n\ninterface RefJumpProps {\n references: { table: string; column: string };\n value: unknown;\n /** The referenced record's name, when the page fetched it; the id stays in the tooltip. */\n label?: unknown;\n table?: TableMeta;\n column?: string;\n row?: Record<string, unknown>;\n /** A card's title or its \"View dealer\" foot: the same jump, said and dressed as the card needs. */\n className?: string;\n text?: string;\n}\n\n/* A signature points at the file row its picture is kept in: the record shows the picture, not a link to the file. */\nexport function RefJump(props: RefJumpProps) {\n const { table, column, value } = props;\n const rule = table && column ? (columnDisplay(table.id, column) as DisplayRule | null) : null;\n if (rule?.signature && typeof rule.signature === 'object' && value !== null && value !== undefined && value !== '')\n return <Value col={{ name: column } as ColumnMeta} value={value} tableId={table!.id} />;\n return <RefJumpLink {...props} />;\n}\n\nfunction RefJumpLink({ references, value, label, table, column, row, className, text }: RefJumpProps) {\n const target = findTable(references.table) as TableMeta | undefined;\n const key = table && column && row ? referenceKey(table, column, row, references.table) : null;\n const named = label !== undefined && label !== null && String(label) !== '';\n const peek =\n value !== null && value !== undefined && value !== ''\n ? { 'data-ref-table': references.table, 'data-ref-column': references.column, 'data-ref-value': String(value) }\n : {};\n return (\n <button\n type=\"button\"\n className={className ? `ref-jump ${className}` : 'ref-jump'}\n title={\n named\n ? say('openReference', { label: String(label), table: references.table, key: String(value) })\n : say('openTableKey', { table: references.table, key: String(value) })\n }\n {...peek}\n data-opens={target && key ? opensRecord(target.id, key) : undefined}\n onClick={() => {\n if (!target) return;\n /* In the view the walk is already in: a reference followed from a page\n opens the referenced record as a page. */\n const title = `${references.table} ${String(value)}`;\n if (key) {\n void openRecord(target.id, key, title);\n return;\n }\n void byPrimaryKey(target, references.column, value).then((found) => {\n if (found) void openRecord(target.id, found, title);\n });\n }}\n >\n <span className=\"ref-jump-value\">{text ?? (named ? String(label) : String(value))}</span>\n {/* The pill says what a bare id is an id *of*; a chip already showing\n the record's name does not need \"Australia\" explained as a country. */}\n {!named && text === undefined && <span className=\"ref-jump-table\">{references.table}</span>}\n </button>\n );\n}\n","/**\n * The per-field half of a refused write, as a form may show it.\n *\n * A write the server refuses on the application's rules answers\n * `{ errors: [{ message, field?, fields?: [{ field, message }] }], outcome:\n * 'rejected' }`. The names and messages are untrusted response text that ends\n * up as an element's association and an announced message, so they are held\n * to a shape here — once, for the New form and the record page alike — and\n * anything else is dropped rather than shown: a name with whitespace, a\n * control character or a dot (but the one a row-defined field has,\n * `specs.capacity`), a message that is empty or long, a field named twice.\n * What a form cannot place stays in the refusal's summary.\n */\nexport interface FieldError {\n field: string;\n message: string;\n}\n\ninterface FieldErrorEnvelope {\n message: string;\n field?: string;\n fields?: readonly { field: string; message: string }[];\n}\n\nexport function safeFieldErrors(errors: readonly FieldErrorEnvelope[]): FieldError[] {\n const seen = new Set<string>();\n return errors\n .flatMap((error) => [\n ...(typeof error?.field === 'string' ? [{ field: error.field, message: error.message }] : []),\n ...(Array.isArray(error?.fields) ? error.fields : []),\n ])\n .flatMap((error) => {\n if (\n typeof error?.field !== 'string' ||\n // eslint-disable-next-line no-control-regex -- Reject control characters in untrusted response field names.\n !/^[^\\s.\\x00-\\x1f\\x7f]{1,256}(?:\\.[A-Za-z_][A-Za-z0-9_]{0,127})?$/u.test(error.field) ||\n typeof error.message !== 'string' ||\n !error.message.trim() ||\n error.message.length > 256 ||\n seen.has(error.field)\n )\n return [];\n seen.add(error.field);\n return [{ field: error.field, message: error.message }];\n });\n}\n","/** What updateAttempts says, in the shell room (packages/kit/src/client/messages.ts says how the catalog is split). */\nimport { defineMessages } from '../../messages.js';\n\nexport const say = defineMessages({\n updateNotConfirmedTheRecord: 'Update not confirmed. The record may already have changed. Check the stored values before editing again.',\n anUpdateIsAlready: 'An update is already pending for this record.',\n theRequestMayStill: 'The request may still complete.',\n theServerDidNotAcknowledge: 'The server did not acknowledge exactly the requested fields on one record.',\n});\n","import { sessionIdentity, subscribeSessionIdentity } from './sessionIdentity.js';\nimport { historyToken, type HistoryToken } from './historyToken.js';\nimport { shell } from './shellMode.js';\nimport { safeFieldErrors, type FieldError } from './fieldErrors.js';\nimport { say } from './copy/shell/updateAttempts.js';\nimport { addHostListener } from './shellHost.js';\n\nexport interface UpdateOwner {\n connection: string | null;\n table: string;\n key: Record<string, unknown>;\n}\ntype Values = Record<string, string | number | boolean | null>;\nexport interface UpdateAttempt {\n phase: 'pending' | 'uncertain';\n values: Values;\n message: string;\n detail?: string;\n}\n/** A refusal may name the fields it is about — shape-checked, never trusted. */\ntype UpdateOutcome =\n | { kind: 'applied'; applied: Values; undoId?: HistoryToken }\n | { kind: 'rejected'; message: string; fields?: FieldError[] }\n | { kind: 'uncertain' | 'blocked'; message: string };\n\nconst UNCONFIRMED = say('updateNotConfirmedTheRecord');\nexport const updateOwnerKey = (owner: UpdateOwner): string =>\n JSON.stringify([\n owner.connection,\n owner.table,\n Object.keys(owner.key)\n .sort()\n .map((key) => [key, String(owner.key[key])]),\n ]);\nconst object = (value: unknown): value is Record<string, unknown> => Boolean(value) && typeof value === 'object' && !Array.isArray(value);\n\nfunction acknowledgement(result: unknown, requested: Values): Values | undefined {\n if (!object(result) || result.affected !== 1 || !object(result.applied)) return;\n if (result.outcome !== undefined && result.outcome !== 'applied') return;\n const applied = result.applied;\n /* Every column asked for, written. The server may write more of its own in the same row — a state's stamp as\n the record enters it (`approved_at` beside `approved`), a machine's `since` — and says so in `applied`; those\n are the write's, not a different one's. */\n if (!Object.keys(requested).every((column) => Object.hasOwn(applied, column))) return;\n if (\n !Object.values(applied).every(\n (value) =>\n value === null || typeof value === 'string' || typeof value === 'boolean' || (typeof value === 'number' && Number.isFinite(value)),\n )\n )\n return;\n return applied as Values;\n}\n\n/** Tab-local attempt ownership outlives a record component, never the browser session. */\nexport function createUpdateAttempts(tenant = () => false) {\n const attempts = new Map<string, UpdateAttempt>();\n const listeners = new Set<() => void>();\n let version = 0;\n let generation = 0;\n const tell = () => {\n version++;\n for (const listener of listeners) listener();\n };\n const get = (owner: UpdateOwner) => attempts.get(updateOwnerKey(owner));\n const run = async (owner: UpdateOwner, values: Values, send: () => Promise<unknown>): Promise<UpdateOutcome> => {\n const started = generation;\n const tenantAttempt = tenant();\n const key = updateOwnerKey(owner);\n if (attempts.has(key)) return { kind: 'blocked', message: get(owner)!.message || say('anUpdateIsAlready') };\n const proposed = { ...values };\n const tracked = tenantAttempt ? shell().mutations.start('update') : undefined;\n attempts.set(key, { phase: 'pending', values: proposed, message: '' });\n tell();\n const uncertain = (detail: string): UpdateOutcome => {\n shell().mutations.unknown(tracked);\n const message = UNCONFIRMED;\n if (started === generation) {\n attempts.set(key, { phase: 'uncertain', values: proposed, message, detail });\n tell();\n }\n return { kind: 'uncertain', message };\n };\n const rejected = (message: string, fields: FieldError[] = []): UpdateOutcome => {\n shell().mutations.settle(tracked);\n if (started === generation) {\n attempts.delete(key);\n tell();\n }\n return { kind: 'rejected', message, ...(fields.length ? { fields } : {}) };\n };\n const timer = setTimeout(() => uncertain(say('theRequestMayStill')), 30_000);\n let result: unknown;\n try {\n result = await send();\n } catch (error) {\n const status = object(error) ? error.status : undefined;\n const outcome = object(error) ? error.outcome : undefined;\n const message = error instanceof Error ? error.message : String(error);\n return outcome !== 'unknown' &&\n (outcome === 'rejected' ||\n outcome === 'not_applied' ||\n (!tenantAttempt && typeof status === 'number' && [400, 401, 403, 404, 409, 422, 501].includes(status)))\n ? rejected(message)\n : uncertain(message);\n } finally {\n clearTimeout(timer);\n }\n if (object(result) && Array.isArray(result.errors)) {\n const message = object(result.errors[0]) && typeof result.errors[0].message === 'string' ? result.errors[0].message : '';\n return message && result.outcome === 'rejected'\n ? rejected(message, safeFieldErrors(result.errors.filter(object) as unknown as Parameters<typeof safeFieldErrors>[0]))\n : uncertain(message);\n }\n const applied = acknowledgement(result, proposed);\n if (!applied) return uncertain(say('theServerDidNotAcknowledge'));\n shell().mutations.settle(tracked);\n if (started === generation) {\n attempts.delete(key);\n tell();\n }\n const undoId = object(result) ? historyToken(result.undoId, tenantAttempt) : undefined;\n return { kind: 'applied', applied, ...(undoId === undefined ? {} : { undoId }) };\n };\n return {\n get,\n run,\n reset: () => {\n generation++;\n attempts.clear();\n tell();\n },\n hasUnresolved: () => attempts.size > 0,\n version: () => version,\n subscribe: (listener: () => void) => {\n listeners.add(listener);\n return () => {\n listeners.delete(listener);\n };\n },\n };\n}\n\nexport const updateAttempts = createUpdateAttempts(() => sessionIdentity().tenantRequired === true);\nsubscribeSessionIdentity(() => updateAttempts.reset());\naddHostListener(window, 'beforeunload', (event) => {\n if (!updateAttempts.hasUnresolved()) return;\n event.preventDefault();\n event.returnValue = '';\n});\n","/** What bulkActions says, in the lists and grid room (packages/kit/src/client/messages.ts says how the catalog is split). */\nimport { defineMessages } from '../../messages.js';\n\nexport const say = defineMessages({\n notWrittenTheList: 'Not written: the list is no longer current.',\n selectBetween1And: 'Select between 1 and {max} records.',\n theSelectedRecordsCould: 'The selected records could not be prepared.',\n alreadyPending: '{blocked} already pending',\n notWritten: '{skipped} not written',\n applied: '{applied} applied',\n rejected: '{rejected} rejected',\n unconfirmed: '{uncertain} unconfirmed',\n labelApplied: '{label}: {count} applied.',\n labelRefused: '{label}: refused, so none of the {records} was written.',\n});\n","/**\n * A fixed update applied to a selection, one record at a time.\n *\n * The contract, in one place so every list that offers it says the same\n * thing: a selection is the exact keys of loaded records, never \"everything\n * matching\"; each record is written through the ordinary update route, gate\n * and journal on its own, so a rejection or a lost acknowledgement on one\n * record neither undoes nor stops the others; and the answer is per record.\n * There is deliberately no whole-selection transaction for a fixed update.\n *\n * The other half, a command declared `targets: 'many'`, is the atomic one:\n * the same exact selection goes in one request, and every record commits or\n * none does. Prepare reads each record's revision and whether it matches the\n * action's `when`; because one ineligible record would refuse the whole\n * request, the form lists those and asks for them to be deselected first.\n * Its answer is one outcome for the group, not one per record.\n */\nimport { ownedBy } from './requestIdentity.js';\nimport { api, primaryKey, quote } from './core.js';\nimport { andQuery } from '@mistriwork/engine/shared/query.js';\nimport { BULK_LIMIT, commandKeyText } from '@mistriwork/engine/shared/commandWire.js';\nimport type { AppCommandAction } from '@mistriwork/engine/schema/model.js';\nimport type { TableMeta } from '@mistriwork/engine/shared/schema.js';\nimport { recordKey } from './resourceRequests.js';\nimport { updateAttempts, type UpdateOwner } from './updateAttempts.js';\nimport { plural } from './locale.js';\nimport { say } from './copy/lists/bulkActions.js';\n\n/** A selection larger than one loaded page is a filter, not a selection; the server caps a command's key list at the same number. */\nexport { BULK_LIMIT };\n\ntype BulkValues = Record<string, string | number | boolean | null>;\n/** One record to write: its key, what the list calls it, and, where the list read them, the values it expects the written columns to still hold (expectedValues). */\nexport interface BulkTarget {\n key: Record<string, unknown>;\n label: string;\n expected?: BulkValues;\n}\ntype BulkOutcomeKind = 'applied' | 'rejected' | 'uncertain' | 'blocked' | 'skipped';\nexport interface BulkRecordOutcome extends BulkTarget {\n kind: BulkOutcomeKind;\n message: string;\n}\nexport interface BulkResult {\n outcomes: BulkRecordOutcome[];\n counts: Record<BulkOutcomeKind, number>;\n /** The list stopped being current part-way; the remaining records were skipped, not written. */\n stopped: boolean;\n}\n\n/** The opaque, order-stable text of a key: the selection's own word for a record. */\nexport const bulkKey = (table: TableMeta, key: Record<string, unknown>): string =>\n JSON.stringify((primaryKey(table) as string[]).map((column) => [column, String(key[column])]));\n\nconst keyText = (table: TableMeta, key: Record<string, unknown>) =>\n (primaryKey(table) as string[]).map((column) => `${column} = ${quote(String(key[column]))}`).join(' and ');\n\n/**\n * Which of these records satisfy `when` right now, judged by the server in\n * one read. No `when` means all of them. A read that fails matches nothing:\n * an action the server could not vouch for is not offered.\n */\nexport async function matchingKeys(\n table: TableMeta,\n keys: Record<string, unknown>[],\n when: string | undefined,\n connection?: string | null,\n): Promise<Set<string>> {\n if (!keys.length) return new Set();\n if (!when) return new Set(keys.map((key) => bulkKey(table, key)));\n const pk = primaryKey(table) as string[];\n /* The query language takes at most 64 OR branches (a board of four lanes of twenty cards is past it), so the keys\n are asked in runs that fit, at once; a run that fails vouches for none of its keys. */\n const runs: Record<string, unknown>[][] = [];\n for (let at = 0; at < keys.length; at += MATCH_RUN) runs.push(keys.slice(at, at + MATCH_RUN));\n const answers = await Promise.all(\n runs.map(async (run) => {\n const anyOf = run.map((key) => `(${keyText(table, key)})`).join(' or ');\n try {\n const data = await api('/api/run', {\n q: `${table.id} ${andQuery(anyOf, when)} show ${pk.join(', ')}`,\n limit: run.length,\n offset: 0,\n count: 'none',\n ...(connection ? ownedBy(connection) : {}),\n });\n if (!Array.isArray(data.rows) || data.errors?.length) return [];\n return (data.rows as Array<Record<string, unknown>>).map((row) => bulkKey(table, row));\n } catch {\n return [];\n }\n }),\n );\n return new Set(answers.flat());\n}\n/** Keys asked about in one question: under the query language's 64 OR branches, with room for the condition's own. */\nconst MATCH_RUN = 48;\n\n/**\n * Apply `values` to each target in order. `isCurrent` is asked before every\n * write: once the list, connection or session has moved on, the rest are\n * skipped and said so — a write nobody is looking at is not a write to make.\n */\nexport async function applyBulk(\n owner: Pick<UpdateOwner, 'connection' | 'table'>,\n values: BulkValues,\n targets: BulkTarget[],\n isCurrent: () => boolean,\n onProgress?: (done: number, total: number) => void,\n): Promise<BulkResult> {\n const outcomes: BulkRecordOutcome[] = [];\n let stopped = false;\n for (const target of targets) {\n if (stopped || !isCurrent()) {\n stopped = true;\n outcomes.push({ ...target, kind: 'skipped', message: say('notWrittenTheList') });\n continue;\n }\n const record: UpdateOwner = { connection: owner.connection, table: owner.table, key: { ...target.key } };\n let key;\n try {\n key = recordKey(record.key);\n } catch (error) {\n outcomes.push({ ...target, kind: 'rejected', message: (error as Error).message });\n continue;\n }\n const outcome = await updateAttempts.run(record, values, () =>\n api('/api/update', {\n ...ownedBy(record.connection),\n table: record.table,\n key,\n values,\n ...(target.expected ? { expected: target.expected } : {}),\n }),\n );\n outcomes.push({ ...target, kind: outcome.kind, message: outcome.kind === 'applied' ? '' : outcome.message });\n onProgress?.(outcomes.length, targets.length);\n }\n const counts: BulkResult['counts'] = { applied: 0, rejected: 0, uncertain: 0, blocked: 0, skipped: 0 };\n for (const outcome of outcomes) counts[outcome.kind]++;\n return { outcomes, counts, stopped };\n}\n\n/** One selected record as a bulk command's prepare saw it. */\nexport interface PreparedTarget {\n key: Record<string, string | number>;\n /** Null when the record is gone or out of this account's reach. */\n expectedVersion: number | null;\n /** Present and matching the action's `when` right now. */\n eligible: boolean;\n}\n\n/**\n * Prepare a `targets: 'many'` command for exactly these keys, in this order.\n * The answer is aligned with the request; anything else is refused rather\n * than guessed at, because the versions it carries go into the envelope.\n */\nexport async function prepareBulkCommand(\n connection: string,\n action: AppCommandAction,\n keys: Array<Record<string, string | number>>,\n): Promise<PreparedTarget[]> {\n if (!keys.length || keys.length > BULK_LIMIT) throw new Error(say('selectBetween1And', { max: BULK_LIMIT }));\n const result = await api('/api/commands/prepare', {\n ...ownedBy(connection),\n command: action.command.id,\n commandVersion: action.command.version,\n keys,\n });\n const targets = (result as { targets?: unknown } | null)?.targets;\n if (!Array.isArray(targets) || targets.length !== keys.length) throw new Error(say('theSelectedRecordsCould'));\n return targets.map((raw, index) => {\n const target = raw as { key?: unknown; expectedVersion?: unknown; eligible?: unknown } | null;\n const version = target?.expectedVersion;\n if (\n commandKeyText(target?.key) !== commandKeyText(keys[index]) ||\n (version !== null && !(typeof version === 'number' && Number.isSafeInteger(version) && version >= 0))\n ) {\n throw new Error(say('theSelectedRecordsCould'));\n }\n return { key: keys[index], expectedVersion: version as number | null, eligible: target?.eligible === true && version !== null };\n });\n}\n\n/**\n * An action's label said for the records it will take: \"Approve timesheet\"\n * over two is \"Approve 2 timesheets\". Only a label that names the record —\n * the resource's noun, one or many, at its end — is counted; any other\n * (\"Send reminder\") stays as written, beside the count the bar already says.\n */\nexport function countedLabel(label: string, count: number, noun: { one: string; many: string }): string {\n if (count === 1) return label;\n for (const said of [noun.one, noun.many]) {\n const at = label.length - said.length;\n if (at > 0 && label[at - 1] === ' ' && label.slice(at).toLowerCase() === said.toLowerCase()) {\n return `${label.slice(0, at)}${plural(count, { one: noun.one, other: noun.many })}`;\n }\n }\n return label;\n}\n\n/** A bulk command's one outcome, for the whole group: it applied to all, or to none. */\nexport function bulkCommandSummary(label: string, count: number, kind: 'applied' | 'rejected', message = ''): string {\n const records = say('common.records2', { count });\n return kind === 'applied'\n ? say('labelApplied', { label, count })\n : `${say('labelRefused', { label, records })}${message ? ` ${message}` : ''}`;\n}\n\n/** One sentence for the result region: what happened, in the order a reader checks it. */\nexport function bulkSummary(label: string, result: BulkResult): string {\n const { counts } = result;\n const parts = [say('applied', { applied: counts.applied })];\n if (counts.rejected) parts.push(say('rejected', { rejected: counts.rejected }));\n if (counts.uncertain) parts.push(say('unconfirmed', { uncertain: counts.uncertain }));\n if (counts.blocked) parts.push(say('alreadyPending', { blocked: counts.blocked }));\n if (counts.skipped) parts.push(say('notWritten', { skipped: counts.skipped }));\n return `${label}: ${parts.join(', ')}.`;\n}\n"],"mappings":";;;;;;;;;;;;;;;AAKA,SAAgB,YAAY,SAA6B,KAAkC;CACzF,IAAI,CAAC,WAAW,CAAC,OAAO,OAAO,QAAQ,UAAU,OAAO,KAAA;CACxD,IAAI;EACF,OAAO,KAAK,UAAU,CAAC,SAAS,GAAG,CAAC;CACtC,QAAQ;EACN;CACF;AACF;;;;;;;ACPA,IAAa,MAAM;;;;;;;;;;;;;;;ACoDnB,IAAM,SAAiB;CAAE,iBAAiB,MAAM,CAAC,CAAC,IAAI;CAAG,iBAAiB,MAAM,CAAC,CAAC,MAAM;AAAE;;AAO1F,SAAgB,mBAAmB,UAAiD;CAClF,OAAO,WAAW;AACpB;AAGA,SAAgB,oBAAoB,MAAyB;CAC3D,OAAO,WAAW;AACpB;AAEA,IAAa,aAA+B;;AC7D5C,IAAM,OAAO;AACb,IAAM,sBAAM,IAAI,IAAI;CAAC;CAAQ;CAAK;CAAK;AAAK,CAAC;AAE7C,IAAM,aAAa,YAChB,WAAW,UAAU,CAAC,EAAyE,YAAY,QAAQ,EAAE;AAExH,SAAgB,QAAQ,SAA6B,QAAgB,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MAAM,SAAS,KAAK;EAC/B,IAAI,KAAK,KAAK,MAAM,KAAK,OAAO,OAAO,MAAM,MAAM,EAAE,CAAC,CAAC,YAAY,MAAM,KAAK,YAAY,GACxF,OAAO,GAAG,MAAM,MAAM,GAAG,EAAE,IAAI,OAAO,OAAO;GAAE,KAAK,KAAK;GAAK,OAAO,KAAK;EAAK,CAAC;CAEpF;CACA,OAAO;AACT;;AAGA,SAAgB,mBAAmB,OAAe,OAAe,MAA8B,UAAU,IAAY;CACnH,MAAM,UAAU,IAAI,mBAAmB,EAAE,MAAM,CAAC;CAChD,OAAO,SAAS,YACZ,IAAI,gBAAgB;EAAE;EAAO;CAAM,CAAC,IACpC,GAAG,IAAI,gBAAgB;EAAE;EAAO;CAAQ,CAAC,IAAI,UAAU,IAAI,YAAY;AAC7E;;AAGA,SAAgB,YAAY,OAAe,QAA4B;CACrE,MAAM,EAAE,WAAW;CACnB,MAAM,QAAQ,CAAC,IAAI,WAAW,EAAE,SAAS,OAAO,QAAQ,CAAC,CAAC;CAC1D,IAAI,OAAO,UAAU,MAAM,KAAK,IAAI,YAAY,EAAE,UAAU,OAAO,SAAS,CAAC,CAAC;CAC9E,IAAI,OAAO,WAAW,MAAM,KAAK,IAAI,eAAe,EAAE,WAAW,OAAO,UAAU,CAAC,CAAC;CACpF,IAAI,OAAO,SAAS,MAAM,KAAK,IAAI,kBAAkB,EAAE,SAAS,OAAO,QAAQ,CAAC,CAAC;CACjF,IAAI,OAAO,SAAS,MAAM,KAAK,IAAI,cAAc,EAAE,SAAS,OAAO,QAAQ,CAAC,CAAC;CAC7E,OAAO,GAAG,MAAM,IAAI,MAAM,KAAK,IAAI,EAAE;AACvC"}
|
|
1
|
+
{"version":3,"file":"shared-Chp88all.js","names":["_Fragment","say","say","say","say"],"sources":["../../../kit/src/client/recordIntent.ts","../../../engine/src/shared/dueDate.ts","../../../kit/src/client/uiBridge.ts","../../../kit/src/client/components/dueOpen.ts","../../../kit/src/client/components/componentSlot.tsx","../../../kit/src/client/components/valueRenderers.tsx","../../../kit/src/client/copy/record/components/Value.ts","../../../kit/src/client/components/Value.tsx","../../../kit/src/client/fieldErrors.ts","../../../kit/src/client/copy/shell/updateAttempts.ts","../../../kit/src/client/updateAttempts.ts","../../../kit/src/client/copy/lists/bulkActions.ts","../../../kit/src/client/bulkActions.ts"],"sourcesContent":["/**\n * What a row or a link that opens a record carries (`data-opens`), for the\n * press that begins reading the record's page before the press is over\n * (recordPress.ts). Depends on nothing, so any list can say it.\n */\nexport function opensRecord(tableId: string | undefined, key: unknown): string | undefined {\n if (!tableId || !key || typeof key !== 'object') return undefined;\n try {\n return JSON.stringify([tableId, key]);\n } catch {\n return undefined;\n }\n}\n","/**\n * A date named like a due date (`due_on`, `deadline`): the convention says it from today\n * (displayDefaults.ts), and the client draws one that has passed on a row still open in the\n * warning tone (client/components/dueOpen.ts). One name list, so the two cannot disagree.\n */\nexport const DUE = /^(due|due_on|due_at|due_date|deadline)$/i;\n","/**\n * What the SDK needs from the page's own navigation, handed in by the\n * modules that own it rather than imported from them: the App the reader is\n * in (the shell's answer, shellMode.ts), a record opened as a glance or a dialog (peekpanel.js) and\n * a view followed (viewLink.ts).\n *\n * Those modules sit in the page's one large tangle of imports (a page draws\n * a record, which draws a page), and the SDK is reached from inside it — a\n * value renderer from `Value`, a custom section from `PageSections`. Were the\n * SDK to import them, it would join the tangle (test/repo/runtime-cycles).\n * So it imports nothing of the page's navigation; each owner registers here\n * when it loads, as peekpanel.js already registers its peeker with core.js.\n */\nimport { shell } from './shellMode.js';\n\ntype OpenPeek = (tableId: string, key: Record<string, unknown>, label: string, mode?: 'drawer' | 'modal') => void;\n\ntype CommandOutcome =\n | { status: 'applied'; message?: string; output?: unknown }\n | { status: 'refused'; message: string }\n | { status: 'closed' }\n | { status: 'unknown'; message: string; check(options?: { challenge?: string }): Promise<CommandOutcome> };\n\n/** What sdk/commands.tsx hands the SDK's host: a command as a component holds it, and a form over the page. */\ninterface CommandHost {\n /* UiCommandHandle (sdk/context.ts), said without importing the React half. */\n command: (\n ref: string,\n page?: string,\n ) => {\n label: string;\n granted: boolean;\n available(key: Readonly<Record<string, unknown>>): Promise<boolean>;\n run(\n key: Readonly<Record<string, unknown>>,\n input?: Readonly<Record<string, unknown>>,\n options?: { label?: string; challenge?: string; attempt?: string },\n ): Promise<CommandOutcome>;\n open(\n key: Readonly<Record<string, unknown>>,\n input?: Readonly<Record<string, unknown>>,\n options?: { label?: string; attempt?: string },\n ): Promise<CommandOutcome>;\n choices?(field: string): ReadonlyArray<{ value: string | number | boolean; label: string }> | undefined;\n };\n openForm: (view: string, prefill: Readonly<Record<string, string | number>>) => void;\n}\n\ninterface Bridge {\n activeApp: () => unknown;\n inAppMode: () => boolean;\n openPeek?: OpenPeek;\n openView?: (key: string, options?: { tab?: string; search?: string; filters?: Readonly<Record<string, string>> }) => boolean;\n commands?: CommandHost;\n}\n\n/* The App the page is showing, and whether it is showing it, are the shell's answers (shellMode.ts). */\nconst bridge: Bridge = { activeApp: () => shell().app(), inAppMode: () => shell().inApp() };\n\n/** peekpanel.js: a record opened beside the page, or over it. */\nexport function registerPeek(openPeek: OpenPeek): void {\n bridge.openPeek = openPeek;\n}\n/** viewLink.ts: one of the App's lists or dashboards followed. */\nexport function registerViewOpener(openView: NonNullable<Bridge['openView']>): void {\n bridge.openView = openView;\n}\n/* sdk/commands.tsx: a component's commands run through the page's own command pipeline and form. It\n draws the command form, whose fields may be components too, so the SDK's host may not import it. */\nexport function registerCommandHost(host: CommandHost): void {\n bridge.commands = host;\n}\n\nexport const pageBridge: Readonly<Bridge> = bridge;\n","/**\n * Whether a due date's row is still open, so a date that has passed is drawn in the warning tone\n * (valueModel.ts, the `relative` format). Only a date the conventions treat as a due date\n * (shared/dueDate.ts): a `created_at` an author asked to be said from today is history, not a\n * deadline. Open is read off the row, never guessed: its resource's machine (a state that is not\n * final), else a yes-or-no named like done (`completed`, Tick's task) that is no. A row that says\n * neither — the column not fetched, no machine, no such flag — is not called overdue.\n */\nimport type { ServedMachine } from '@mistriwork/engine/shared/servedApp.js';\nimport { DUE } from '@mistriwork/engine/shared/dueDate.js';\nimport { pageBridge } from '../uiBridge.js';\n\nconst DONE = /^(is_)?(done|complete|completed|closed|resolved)$/i;\nconst YES = new Set(['true', 't', '1', 'yes']);\n\nconst machineOf = (tableId: string): ServedMachine | undefined =>\n (pageBridge.activeApp() as { resources?: Record<string, { machine?: ServedMachine }> } | null)?.resources?.[tableId]?.machine;\n\nexport function dueOpen(tableId: string | undefined, column: string, row: Readonly<Record<string, unknown>> | undefined): boolean {\n if (!tableId || !row || !DUE.test(column)) return false;\n const machine = machineOf(tableId);\n if (machine) {\n const state = row[machine.column];\n if (state === null || state === undefined) return false;\n return !machine.states.some((s) => s.final && s.value === String(state));\n }\n const done = Object.keys(row).find((name) => DONE.test(name));\n if (done === undefined) return false;\n const value = row[done];\n if (value === null || value === undefined) return false;\n return !YES.has(String(value).toLowerCase());\n}\n","/**\n * A place in the kit an App's component may draw into: a value renderer in\n * a cell, an input in a form's field. The kit never waits for one and never\n * loads one itself. Until the module has arrived — fetched by the shell\n * (shellMode.ts `components`), the first draw that names it having asked —\n * the platform's own `fallback` stands in its place; then every slot showing\n * it redraws once. One that cannot load, or throws, is the fallback from then\n * on, said once in the console.\n *\n * Two of these were written out once each (the value renderers and the\n * inputs), the same cache, listeners and error boundary twice; this is the\n * one. Internal: an author meets the slots only as `ValueProps` and\n * `InputProps` (packages/mistri/schema/ui.d.ts).\n */\nimport { Component, createElement, useEffect, useSyncExternalStore, type ComponentType, type ReactNode } from 'react';\nimport { shell } from '../shellMode.js';\n\ninterface SlotOptions {\n /** The element the component is drawn inside, by class: `custom-value`, `custom-input`. */\n className: string;\n /** Fetch the component `id`; an input names the platform's own with a prefix, and fetches those its own way. */\n load: (id: string) => Promise<unknown>;\n /** Tell the console one cannot be loaded, and that one threw: once each, by the slot's own words. */\n couldNotLoad: (id: string, error: unknown) => void;\n threw: (id: string, error: unknown) => void;\n}\n\n/** A kind of slot: its cache of components by build, and the element that draws one. */\nexport function componentSlot<P extends object>({ className, load, couldNotLoad, threw }: SlotOptions) {\n const drawn = new Map<string, ComponentType<P> | null>();\n const asked = new Set<string>();\n const listeners = new Set<() => void>();\n let version = 0;\n\n /* Keyed by the build (the shell's `useKey`): a save that changed the component is asked for again. */\n function settle(key: string, component: ComponentType<P> | null): void {\n drawn.set(key, component);\n version += 1;\n for (const listener of listeners) listener();\n }\n\n function ask(id: string, key: string): void {\n if (asked.has(key)) return;\n asked.add(key);\n void load(id).then(\n (component) => settle(key, component as ComponentType<P>),\n (error: unknown) => {\n couldNotLoad(id, error);\n settle(key, null);\n },\n );\n }\n\n const subscribe = (listener: () => void) => {\n listeners.add(listener);\n return () => {\n listeners.delete(listener);\n };\n };\n const current = () => version;\n\n class Contained extends Component<{ id: string; slot: string; fallback: ReactNode; children: ReactNode }, { failed: boolean }> {\n state = { failed: false };\n static getDerivedStateFromError() {\n return { failed: true };\n }\n componentDidCatch(error: unknown) {\n /* Once per component: a column of a thousand cells is one mistake, not a thousand. */\n if (drawn.get(this.props.slot) === null) return;\n threw(this.props.id, error);\n settle(this.props.slot, null);\n }\n render() {\n return this.state.failed ? this.props.fallback : this.props.children;\n }\n }\n\n /** The component `id`, drawn with `props` once it is here, and `fallback` until then (or for good, if it cannot be). */\n function Slot({ id, fallback, props }: { id: string; fallback: ReactNode; props: P }) {\n useSyncExternalStore(subscribe, current, current);\n const key = shell().components.useKey(id);\n useEffect(() => {\n ask(id, key);\n }, [id, key]);\n const component = drawn.get(key);\n if (!component) return <>{fallback}</>;\n return (\n <Contained id={id} slot={key} fallback={fallback}>\n <span className={className} data-component={id}>\n {createElement(component, props)}\n </span>\n </Contained>\n );\n }\n return Slot;\n}\n","/**\n * A value renderer where a display rule stands: the author's component draws\n * one value in a grid cell, a record field or a card, and only draws it —\n * sort, filter, totals, export and search keep the raw value, and the\n * Workbench never runs one.\n *\n * A cell never waits for one. The value is drawn the platform's way (the\n * `fallback`) until the module has arrived, the first draw that names it\n * having asked for it; then every slot showing it redraws once. A renderer\n * that throws draws that value the platform's way from then on, said once in\n * the console. Small and in the first chunk, since Value and Grid use it; the\n * loading itself is the shell's (shellMode.ts `components`: in an App,\n * sdk/componentLoader.ts, with the page's side of the SDK, a chunk of its\n * own), and the slot is the kit's one (componentSlot.tsx).\n */\nimport type { ReactNode } from 'react';\nimport { shell } from '../shellMode.js';\nimport { componentSlot } from './componentSlot.js';\n\n/** What a value renderer receives: `ValueProps` in packages/mistri/schema/ui.d.ts. */\ninterface ValueRendererProps {\n value: unknown;\n row?: Record<string, unknown>;\n column: { name: string; resource: string };\n context: 'grid' | 'record' | 'card';\n compact: boolean;\n /** The tone the column's display rule gives this value, and the word it says it as (valueModel's ruleSays). */\n tone?: string;\n word?: string;\n}\n\nconst Slot = componentSlot<ValueRendererProps>({\n className: 'custom-value',\n load: (id) => shell().components.load(id),\n couldNotLoad: (id, error) => console.error(`the value renderer \"${id}\" could not be loaded; its values are drawn plain.`, error),\n threw: (id, error) => console.error(`the value renderer \"${id}\" threw; its values are drawn plain.`, error),\n});\n\n/** One value, drawn by the renderer `id` once it is here, and by `fallback` until then (or for good, if it cannot be). */\nexport function ValueSlot({ id, fallback, ...props }: ValueRendererProps & { id: string; fallback: ReactNode }) {\n return <Slot id={id} fallback={fallback} props={props} />;\n}\n","/** What Value says, in the record page room (packages/kit/src/client/messages.ts says how the catalog is split). */\nimport { defineMessages } from '../../../messages.js';\n\nexport const say = defineMessages({\n openReference: 'Open {label} ({table} {key})',\n openTableKey: 'Open {table} {key}',\n});\n","/**\n * One value, rendered by what it is — shared by every view that shows fields.\n *\n * `Dressed` is the app's dress when a display rule reaches the value: a\n * currency, a percent with its bar, a toned pill, a relative day. `Value`\n * is the plain rendering by the grid's planner. `RefJump` is a foreign key\n * as the walk it is: the value, the table it points at, a hover that shows\n * the row, a click that goes there.\n */\nimport { Fragment, type ReactNode } from 'react';\nimport { api, columnDisplay, emptyWord, findTable, openRecord, refsFrom, state } from '../core.js';\nimport { opensRecord } from '../recordIntent.js';\nimport type { ColumnMeta, TableMeta } from '@mistriwork/engine/shared/schema.js';\nimport { dressFor, linkFor, maskedText, ruleSays, type DisplayRule } from './valueModel.js';\nimport { rowCurrency } from '@mistriwork/engine/shared/money.js';\nimport { dueOpen } from './dueOpen.js';\nimport { JsonValue } from './JsonValue.js';\nimport { jsonValueOf, previewOf } from './jsonModel.js';\nimport { TAGS_TYPE, tagChips } from '@mistriwork/engine/shared/tagLists.js';\nimport { AvatarText, Dressed, Said } from './Dressed.js';\nimport { ValueSlot } from './valueRenderers.js';\nimport { say } from '../copy/record/components/Value.js';\nimport { shellBody } from '../shellHost.js';\n\n/* Drawn here and in the grid; the rules that draw them read no global (Dressed.tsx). */\nexport { AvatarText, Dressed };\n\n/** A value that is a link: mail, a call, or a web page, which opens beside the App rather than in place of it. */\nfunction ValueLink({ link }: { link: NonNullable<ReturnType<typeof linkFor>> }) {\n const text = breakable(link.text);\n /* The break points are not words: the link is named by its text whole. */\n const named = { title: link.text, ...(typeof text === 'string' ? {} : { 'aria-label': link.text }) };\n return link.kind === 'url' ? (\n <a className=\"value-link\" href={link.href} target=\"_blank\" rel=\"noopener noreferrer\" {...named}>\n {text}\n </a>\n ) : (\n <a className=\"value-link\" href={link.href} {...named}>\n {text}\n </a>\n );\n}\n\n/* An address has no spaces, so where a value wraps it would break mid-word.\n It may break after an @ or a slash and before a dot, a hyphen or a query's\n marks — where a reader sees the parts — and nowhere else unless one part\n alone is wider than its column (overflow-wrap). The text is unchanged. */\nfunction breakable(text: string): ReactNode {\n const parts = text.split(/(?<=[@/])|(?=[.\\-_?#&=])/);\n if (parts.length < 2) return text;\n return parts.map((part, index) => (\n <Fragment key={index}>\n {index > 0 && <wbr />}\n {part}\n </Fragment>\n ));\n}\n\ninterface ValueProps {\n col: ColumnMeta | undefined;\n value: unknown;\n /** The table the value belongs to, for the app's dress. Absent in the workbench's raw readings. */\n tableId?: string;\n /** Keep long text inline in constrained previews; full fields retain their prose layout. */\n compact?: boolean;\n /** Whether an address, a number or a page may be a link. Not where the value\n stands inside a target of its own — a card, a row that opens — since a\n link inside a button is neither; a compact value is one of those unless\n its caller says. */\n links?: boolean;\n /** Formatted text drawn whole even where the value is compact: a conversation's message is read, not glanced at. */\n wholeText?: boolean;\n /** The record the value is of, where a money rule reads its currency from another of its columns (money.ts). */\n row?: Readonly<Record<string, unknown>>;\n}\n\n/** A value as the record and the page show it: dressed when the app says, plain otherwise. */\nexport function Value(props: ValueProps) {\n const { col, value, tableId, compact = false } = props;\n const rule = tableId === undefined ? null : (columnDisplay(tableId, col?.name ?? '') as DisplayRule | null);\n /* The App's own renderer, where its display rule names one: the value drawn\n the platform's way until it has arrived, and whenever it cannot draw. An\n empty value is the platform's to say, as it is in a grid cell. */\n const renderer = rule?.component?.id;\n if (\n renderer &&\n tableId !== undefined &&\n maskedText(rule, value) === undefined &&\n value !== null &&\n value !== undefined &&\n shellBody().classList.contains('app-mode')\n ) {\n const { component: _component, ...rest } = rule!;\n return (\n <ValueSlot\n id={renderer}\n value={value}\n column={{ name: col?.name ?? '', resource: tableId }}\n context=\"record\"\n compact={compact}\n {...ruleSays(rest, value)}\n fallback={<PlatformValue {...props} />}\n />\n );\n }\n /* A rule's `face` sets the column's values in that face; the wrapper exists only then. */\n return rule?.face ? (\n <span className={`face-${rule.face}`}>\n <PlatformValue {...props} />\n </span>\n ) : (\n <PlatformValue {...props} />\n );\n}\n\nfunction PlatformValue({ col, value, tableId, compact = false, links = !compact, wholeText = false, row }: ValueProps) {\n if (value === null || value === undefined)\n return (\n <span className=\"null\" title=\"null\">\n {emptyWord()}\n </span>\n );\n /* A record's tags (tagLists.ts) are chips wherever a value is drawn: a phone's row cards said Thread's as the\n JSON the database answered. */\n if (col?.type === TAGS_TYPE) {\n const chips = tagChips(value);\n if (!chips.length)\n return (\n <span className=\"null\" title=\"null\">\n {emptyWord()}\n </span>\n );\n return (\n <span className=\"value-tags\">\n {chips.map((chip) => (\n <span key={chip.label} className={`record-tag tone tone-${chip.tone ?? 'neutral'}`}>\n {chip.label}\n </span>\n ))}\n </span>\n );\n }\n const json = jsonValueOf(col, value);\n if (json) return compact ? <span className=\"json-preview-text\">{previewOf(json.value)}</span> : <JsonValue value={json.value} />;\n const declared = tableId === undefined ? null : (columnDisplay(tableId, col?.name ?? '') as DisplayRule | null);\n /* A money column whose currency is the record's own: the code its row holds. */\n const owned =\n declared?.currencyColumn && row\n ? { ...declared, currency: rowCurrency(declared, row, declared.currency ?? '') || undefined }\n : declared;\n /* A due date passed on a row still open is drawn in the warning tone (dueOpen.ts). */\n const rule = owned?.format === 'relative' && dueOpen(tableId, col?.name ?? '', row) ? { ...owned, open: true } : owned;\n /* An address, a number or a page is something to act on: in an App it is\n a link (by its rule, or by a column named for it); the Workbench shows\n the data as it is. */\n /* A masked value is the placeholder before it is anything else: not a link to the value, not the author's renderer. */\n const mask = tableId === undefined ? undefined : maskedText(rule, value);\n if (mask !== undefined) return <Dressed dress={{ kind: 'masked', text: mask }} compact={compact} />;\n const link = tableId === undefined || !links ? null : linkFor(col?.name, value, rule, shellBody().classList.contains('app-mode'));\n if (link) return <ValueLink link={link} />;\n const dress = tableId === undefined ? null : dressFor(rule, value);\n if (dress) return <Dressed dress={dress} compact={compact && !(wholeText && dress.kind === 'richText')} />;\n /* In an App a vocabulary's value is a word, as its chip says it (\"On hold\"\n for `on_hold`); the Workbench shows the data exactly. */\n return <Said col={col} value={value} compact={compact} app={shellBody().classList.contains('app-mode')} />;\n}\n\ninterface Fk {\n from: { table: string; columns: string[] };\n to: { table: string; columns: string[] };\n}\n\n/**\n * The whole key a composite reference names, read off the row it sits in:\n * a chip that opened with only its own column carried half a key.\n */\nfunction referenceKey(\n table: TableMeta,\n columnName: string,\n row: Record<string, unknown>,\n targetTable: string,\n): Record<string, unknown> | null {\n const fk = ((state as { schema?: unknown }).schema ? (refsFrom(table.id) as Fk[]) : []).find(\n (f) => f.to.table === targetTable && f.from.columns.length > 1 && f.from.columns.includes(columnName),\n );\n if (!fk) return null;\n const values = fk.from.columns.map((c) => row[c]);\n if (values.some((v) => v === null || v === undefined)) return null;\n return Object.fromEntries(fk.to.columns.map((c, i) => [c, values[i]]));\n}\n\n/**\n * The record a reference names, by the key its address is made of. A real\n * foreign key names the primary key already; an App's declared reference\n * (a soft key, `product_sku` → `product.sku`) names another unique column,\n * so the primary key is read once, through the reader's own grants. A value\n * nothing matches opens nothing, as a dangling key would.\n */\nasync function byPrimaryKey(target: TableMeta, column: string, value: unknown): Promise<Record<string, unknown> | null> {\n const keys = target.columns.filter((item) => item.primaryKey).map((item) => item.name);\n if (!keys.length || (keys.length === 1 && keys[0] === column)) return { [column]: value };\n try {\n const data = (await api('/api/query', {\n table: target.id,\n columns: keys,\n filter: { groups: [[{ column, op: '=', value: value as string | number }]] },\n limit: 1,\n offset: 0,\n })) as { rows?: Array<Record<string, unknown>> };\n const row = data.rows?.[0];\n return row ? Object.fromEntries(keys.map((name) => [name, row[name]])) : null;\n } catch {\n return null;\n }\n}\n\ninterface RefJumpProps {\n references: { table: string; column: string };\n value: unknown;\n /** The referenced record's name, when the page fetched it; the id stays in the tooltip. */\n label?: unknown;\n table?: TableMeta;\n column?: string;\n row?: Record<string, unknown>;\n /** A card's title or its \"View dealer\" foot: the same jump, said and dressed as the card needs. */\n className?: string;\n text?: string;\n}\n\n/* A signature points at the file row its picture is kept in: the record shows the picture, not a link to the file. */\nexport function RefJump(props: RefJumpProps) {\n const { table, column, value } = props;\n const rule = table && column ? (columnDisplay(table.id, column) as DisplayRule | null) : null;\n if (rule?.signature && typeof rule.signature === 'object' && value !== null && value !== undefined && value !== '')\n return <Value col={{ name: column } as ColumnMeta} value={value} tableId={table!.id} />;\n return <RefJumpLink {...props} />;\n}\n\nfunction RefJumpLink({ references, value, label, table, column, row, className, text }: RefJumpProps) {\n const target = findTable(references.table) as TableMeta | undefined;\n const key = table && column && row ? referenceKey(table, column, row, references.table) : null;\n const named = label !== undefined && label !== null && String(label) !== '';\n const peek =\n value !== null && value !== undefined && value !== ''\n ? { 'data-ref-table': references.table, 'data-ref-column': references.column, 'data-ref-value': String(value) }\n : {};\n return (\n <button\n type=\"button\"\n className={className ? `ref-jump ${className}` : 'ref-jump'}\n title={\n named\n ? say('openReference', { label: String(label), table: references.table, key: String(value) })\n : say('openTableKey', { table: references.table, key: String(value) })\n }\n {...peek}\n data-opens={target && key ? opensRecord(target.id, key) : undefined}\n onClick={() => {\n if (!target) return;\n /* In the view the walk is already in: a reference followed from a page\n opens the referenced record as a page. */\n const title = `${references.table} ${String(value)}`;\n if (key) {\n void openRecord(target.id, key, title);\n return;\n }\n void byPrimaryKey(target, references.column, value).then((found) => {\n if (found) void openRecord(target.id, found, title);\n });\n }}\n >\n <span className=\"ref-jump-value\">{text ?? (named ? String(label) : String(value))}</span>\n {/* The pill says what a bare id is an id *of*; a chip already showing\n the record's name does not need \"Australia\" explained as a country. */}\n {!named && text === undefined && <span className=\"ref-jump-table\">{references.table}</span>}\n </button>\n );\n}\n","/**\n * The per-field half of a refused write, as a form may show it.\n *\n * A write the server refuses on the application's rules answers\n * `{ errors: [{ message, field?, fields?: [{ field, message }] }], outcome:\n * 'rejected' }`. The names and messages are untrusted response text that ends\n * up as an element's association and an announced message, so they are held\n * to a shape here — once, for the New form and the record page alike — and\n * anything else is dropped rather than shown: a name with whitespace, a\n * control character or a dot (but the one a row-defined field has,\n * `specs.capacity`), a message that is empty or long, a field named twice.\n * What a form cannot place stays in the refusal's summary.\n */\nexport interface FieldError {\n field: string;\n message: string;\n}\n\ninterface FieldErrorEnvelope {\n message: string;\n field?: string;\n fields?: readonly { field: string; message: string }[];\n}\n\nexport function safeFieldErrors(errors: readonly FieldErrorEnvelope[]): FieldError[] {\n const seen = new Set<string>();\n return errors\n .flatMap((error) => [\n ...(typeof error?.field === 'string' ? [{ field: error.field, message: error.message }] : []),\n ...(Array.isArray(error?.fields) ? error.fields : []),\n ])\n .flatMap((error) => {\n if (\n typeof error?.field !== 'string' ||\n // eslint-disable-next-line no-control-regex -- Reject control characters in untrusted response field names.\n !/^[^\\s.\\x00-\\x1f\\x7f]{1,256}(?:\\.[A-Za-z_][A-Za-z0-9_]{0,127})?$/u.test(error.field) ||\n typeof error.message !== 'string' ||\n !error.message.trim() ||\n error.message.length > 256 ||\n seen.has(error.field)\n )\n return [];\n seen.add(error.field);\n return [{ field: error.field, message: error.message }];\n });\n}\n","/** What updateAttempts says, in the shell room (packages/kit/src/client/messages.ts says how the catalog is split). */\nimport { defineMessages } from '../../messages.js';\n\nexport const say = defineMessages({\n updateNotConfirmedTheRecord: 'Update not confirmed. The record may already have changed. Check the stored values before editing again.',\n anUpdateIsAlready: 'An update is already pending for this record.',\n theRequestMayStill: 'The request may still complete.',\n theServerDidNotAcknowledge: 'The server did not acknowledge exactly the requested fields on one record.',\n});\n","import { sessionIdentity, subscribeSessionIdentity } from './sessionIdentity.js';\nimport { historyToken, type HistoryToken } from './historyToken.js';\nimport { shell } from './shellMode.js';\nimport { safeFieldErrors, type FieldError } from './fieldErrors.js';\nimport { say } from './copy/shell/updateAttempts.js';\nimport { addHostListener } from './shellHost.js';\n\nexport interface UpdateOwner {\n connection: string | null;\n table: string;\n key: Record<string, unknown>;\n}\ntype Values = Record<string, string | number | boolean | null>;\nexport interface UpdateAttempt {\n phase: 'pending' | 'uncertain';\n values: Values;\n message: string;\n detail?: string;\n}\n/** A refusal may name the fields it is about — shape-checked, never trusted. */\ntype UpdateOutcome =\n | { kind: 'applied'; applied: Values; undoId?: HistoryToken }\n | { kind: 'rejected'; message: string; fields?: FieldError[] }\n | { kind: 'uncertain' | 'blocked'; message: string };\n\nconst UNCONFIRMED = say('updateNotConfirmedTheRecord');\nexport const updateOwnerKey = (owner: UpdateOwner): string =>\n JSON.stringify([\n owner.connection,\n owner.table,\n Object.keys(owner.key)\n .sort()\n .map((key) => [key, String(owner.key[key])]),\n ]);\nconst object = (value: unknown): value is Record<string, unknown> => Boolean(value) && typeof value === 'object' && !Array.isArray(value);\n\nfunction acknowledgement(result: unknown, requested: Values): Values | undefined {\n if (!object(result) || result.affected !== 1 || !object(result.applied)) return;\n if (result.outcome !== undefined && result.outcome !== 'applied') return;\n const applied = result.applied;\n /* Every column asked for, written. The server may write more of its own in the same row — a state's stamp as\n the record enters it (`approved_at` beside `approved`), a machine's `since` — and says so in `applied`; those\n are the write's, not a different one's. */\n if (!Object.keys(requested).every((column) => Object.hasOwn(applied, column))) return;\n if (\n !Object.values(applied).every(\n (value) =>\n value === null || typeof value === 'string' || typeof value === 'boolean' || (typeof value === 'number' && Number.isFinite(value)),\n )\n )\n return;\n return applied as Values;\n}\n\n/** Tab-local attempt ownership outlives a record component, never the browser session. */\nexport function createUpdateAttempts(tenant = () => false) {\n const attempts = new Map<string, UpdateAttempt>();\n const listeners = new Set<() => void>();\n let version = 0;\n let generation = 0;\n const tell = () => {\n version++;\n for (const listener of listeners) listener();\n };\n const get = (owner: UpdateOwner) => attempts.get(updateOwnerKey(owner));\n const run = async (owner: UpdateOwner, values: Values, send: () => Promise<unknown>): Promise<UpdateOutcome> => {\n const started = generation;\n const tenantAttempt = tenant();\n const key = updateOwnerKey(owner);\n if (attempts.has(key)) return { kind: 'blocked', message: get(owner)!.message || say('anUpdateIsAlready') };\n const proposed = { ...values };\n const tracked = tenantAttempt ? shell().mutations.start('update') : undefined;\n attempts.set(key, { phase: 'pending', values: proposed, message: '' });\n tell();\n const uncertain = (detail: string): UpdateOutcome => {\n shell().mutations.unknown(tracked);\n const message = UNCONFIRMED;\n if (started === generation) {\n attempts.set(key, { phase: 'uncertain', values: proposed, message, detail });\n tell();\n }\n return { kind: 'uncertain', message };\n };\n const rejected = (message: string, fields: FieldError[] = []): UpdateOutcome => {\n shell().mutations.settle(tracked);\n if (started === generation) {\n attempts.delete(key);\n tell();\n }\n return { kind: 'rejected', message, ...(fields.length ? { fields } : {}) };\n };\n const timer = setTimeout(() => uncertain(say('theRequestMayStill')), 30_000);\n let result: unknown;\n try {\n result = await send();\n } catch (error) {\n const status = object(error) ? error.status : undefined;\n const outcome = object(error) ? error.outcome : undefined;\n const message = error instanceof Error ? error.message : String(error);\n return outcome !== 'unknown' &&\n (outcome === 'rejected' ||\n outcome === 'not_applied' ||\n (!tenantAttempt && typeof status === 'number' && [400, 401, 403, 404, 409, 422, 501].includes(status)))\n ? rejected(message)\n : uncertain(message);\n } finally {\n clearTimeout(timer);\n }\n if (object(result) && Array.isArray(result.errors)) {\n const message = object(result.errors[0]) && typeof result.errors[0].message === 'string' ? result.errors[0].message : '';\n return message && result.outcome === 'rejected'\n ? rejected(message, safeFieldErrors(result.errors.filter(object) as unknown as Parameters<typeof safeFieldErrors>[0]))\n : uncertain(message);\n }\n const applied = acknowledgement(result, proposed);\n if (!applied) return uncertain(say('theServerDidNotAcknowledge'));\n shell().mutations.settle(tracked);\n if (started === generation) {\n attempts.delete(key);\n tell();\n }\n const undoId = object(result) ? historyToken(result.undoId, tenantAttempt) : undefined;\n return { kind: 'applied', applied, ...(undoId === undefined ? {} : { undoId }) };\n };\n return {\n get,\n run,\n reset: () => {\n generation++;\n attempts.clear();\n tell();\n },\n hasUnresolved: () => attempts.size > 0,\n version: () => version,\n subscribe: (listener: () => void) => {\n listeners.add(listener);\n return () => {\n listeners.delete(listener);\n };\n },\n };\n}\n\nexport const updateAttempts = createUpdateAttempts(() => sessionIdentity().tenantRequired === true);\nsubscribeSessionIdentity(() => updateAttempts.reset());\naddHostListener(window, 'beforeunload', (event) => {\n if (!updateAttempts.hasUnresolved()) return;\n event.preventDefault();\n event.returnValue = '';\n});\n","/** What bulkActions says, in the lists and grid room (packages/kit/src/client/messages.ts says how the catalog is split). */\nimport { defineMessages } from '../../messages.js';\n\nexport const say = defineMessages({\n notWrittenTheList: 'Not written: the list is no longer current.',\n selectBetween1And: 'Select between 1 and {max} records.',\n theSelectedRecordsCould: 'The selected records could not be prepared.',\n alreadyPending: '{blocked} already pending',\n notWritten: '{skipped} not written',\n applied: '{applied} applied',\n rejected: '{rejected} rejected',\n unconfirmed: '{uncertain} unconfirmed',\n labelApplied: '{label}: {count} applied.',\n labelRefused: '{label}: refused, so none of the {records} was written.',\n});\n","/**\n * A fixed update applied to a selection, one record at a time.\n *\n * The contract, in one place so every list that offers it says the same\n * thing: a selection is the exact keys of loaded records, never \"everything\n * matching\"; each record is written through the ordinary update route, gate\n * and journal on its own, so a rejection or a lost acknowledgement on one\n * record neither undoes nor stops the others; and the answer is per record.\n * There is deliberately no whole-selection transaction for a fixed update.\n *\n * The other half, a command declared `targets: 'many'`, is the atomic one:\n * the same exact selection goes in one request, and every record commits or\n * none does. Prepare reads each record's revision and whether it matches the\n * action's `when`; because one ineligible record would refuse the whole\n * request, the form lists those and asks for them to be deselected first.\n * Its answer is one outcome for the group, not one per record.\n */\nimport { ownedBy } from './requestIdentity.js';\nimport { api, primaryKey, quote } from './core.js';\nimport { andQuery } from '@mistriwork/engine/shared/query.js';\nimport { BULK_LIMIT, commandKeyText } from '@mistriwork/engine/shared/commandWire.js';\nimport type { AppCommandAction } from '@mistriwork/engine/schema/model.js';\nimport type { TableMeta } from '@mistriwork/engine/shared/schema.js';\nimport { recordKey } from './resourceRequests.js';\nimport { updateAttempts, type UpdateOwner } from './updateAttempts.js';\nimport { plural } from './locale.js';\nimport { say } from './copy/lists/bulkActions.js';\n\n/** A selection larger than one loaded page is a filter, not a selection; the server caps a command's key list at the same number. */\nexport { BULK_LIMIT };\n\ntype BulkValues = Record<string, string | number | boolean | null>;\n/** One record to write: its key, what the list calls it, and, where the list read them, the values it expects the written columns to still hold (expectedValues). */\nexport interface BulkTarget {\n key: Record<string, unknown>;\n label: string;\n expected?: BulkValues;\n}\ntype BulkOutcomeKind = 'applied' | 'rejected' | 'uncertain' | 'blocked' | 'skipped';\nexport interface BulkRecordOutcome extends BulkTarget {\n kind: BulkOutcomeKind;\n message: string;\n}\nexport interface BulkResult {\n outcomes: BulkRecordOutcome[];\n counts: Record<BulkOutcomeKind, number>;\n /** The list stopped being current part-way; the remaining records were skipped, not written. */\n stopped: boolean;\n}\n\n/** The opaque, order-stable text of a key: the selection's own word for a record. */\nexport const bulkKey = (table: TableMeta, key: Record<string, unknown>): string =>\n JSON.stringify((primaryKey(table) as string[]).map((column) => [column, String(key[column])]));\n\nconst keyText = (table: TableMeta, key: Record<string, unknown>) =>\n (primaryKey(table) as string[]).map((column) => `${column} = ${quote(String(key[column]))}`).join(' and ');\n\n/**\n * Which of these records satisfy `when` right now, judged by the server in\n * one read. No `when` means all of them. A read that fails matches nothing:\n * an action the server could not vouch for is not offered.\n */\nexport async function matchingKeys(\n table: TableMeta,\n keys: Record<string, unknown>[],\n when: string | undefined,\n connection?: string | null,\n): Promise<Set<string>> {\n if (!keys.length) return new Set();\n if (!when) return new Set(keys.map((key) => bulkKey(table, key)));\n const pk = primaryKey(table) as string[];\n /* The query language takes at most 64 OR branches (a board of four lanes of twenty cards is past it), so the keys\n are asked in runs that fit, at once; a run that fails vouches for none of its keys. */\n const runs: Record<string, unknown>[][] = [];\n for (let at = 0; at < keys.length; at += MATCH_RUN) runs.push(keys.slice(at, at + MATCH_RUN));\n const answers = await Promise.all(\n runs.map(async (run) => {\n const anyOf = run.map((key) => `(${keyText(table, key)})`).join(' or ');\n try {\n const data = await api('/api/run', {\n q: `${table.id} ${andQuery(anyOf, when)} show ${pk.join(', ')}`,\n limit: run.length,\n offset: 0,\n count: 'none',\n ...(connection ? ownedBy(connection) : {}),\n });\n if (!Array.isArray(data.rows) || data.errors?.length) return [];\n return (data.rows as Array<Record<string, unknown>>).map((row) => bulkKey(table, row));\n } catch {\n return [];\n }\n }),\n );\n return new Set(answers.flat());\n}\n/** Keys asked about in one question: under the query language's 64 OR branches, with room for the condition's own. */\nconst MATCH_RUN = 48;\n\n/**\n * Apply `values` to each target in order. `isCurrent` is asked before every\n * write: once the list, connection or session has moved on, the rest are\n * skipped and said so — a write nobody is looking at is not a write to make.\n */\nexport async function applyBulk(\n owner: Pick<UpdateOwner, 'connection' | 'table'>,\n values: BulkValues,\n targets: BulkTarget[],\n isCurrent: () => boolean,\n onProgress?: (done: number, total: number) => void,\n): Promise<BulkResult> {\n const outcomes: BulkRecordOutcome[] = [];\n let stopped = false;\n for (const target of targets) {\n if (stopped || !isCurrent()) {\n stopped = true;\n outcomes.push({ ...target, kind: 'skipped', message: say('notWrittenTheList') });\n continue;\n }\n const record: UpdateOwner = { connection: owner.connection, table: owner.table, key: { ...target.key } };\n let key;\n try {\n key = recordKey(record.key);\n } catch (error) {\n outcomes.push({ ...target, kind: 'rejected', message: (error as Error).message });\n continue;\n }\n const outcome = await updateAttempts.run(record, values, () =>\n api('/api/update', {\n ...ownedBy(record.connection),\n table: record.table,\n key,\n values,\n ...(target.expected ? { expected: target.expected } : {}),\n }),\n );\n outcomes.push({ ...target, kind: outcome.kind, message: outcome.kind === 'applied' ? '' : outcome.message });\n onProgress?.(outcomes.length, targets.length);\n }\n const counts: BulkResult['counts'] = { applied: 0, rejected: 0, uncertain: 0, blocked: 0, skipped: 0 };\n for (const outcome of outcomes) counts[outcome.kind]++;\n return { outcomes, counts, stopped };\n}\n\n/** One selected record as a bulk command's prepare saw it. */\nexport interface PreparedTarget {\n key: Record<string, string | number>;\n /** Null when the record is gone or out of this account's reach. */\n expectedVersion: number | null;\n /** Present and matching the action's `when` right now. */\n eligible: boolean;\n}\n\n/**\n * Prepare a `targets: 'many'` command for exactly these keys, in this order.\n * The answer is aligned with the request; anything else is refused rather\n * than guessed at, because the versions it carries go into the envelope.\n */\nexport async function prepareBulkCommand(\n connection: string,\n action: AppCommandAction,\n keys: Array<Record<string, string | number>>,\n): Promise<PreparedTarget[]> {\n if (!keys.length || keys.length > BULK_LIMIT) throw new Error(say('selectBetween1And', { max: BULK_LIMIT }));\n const result = await api('/api/commands/prepare', {\n ...ownedBy(connection),\n command: action.command.id,\n commandVersion: action.command.version,\n keys,\n });\n const targets = (result as { targets?: unknown } | null)?.targets;\n if (!Array.isArray(targets) || targets.length !== keys.length) throw new Error(say('theSelectedRecordsCould'));\n return targets.map((raw, index) => {\n const target = raw as { key?: unknown; expectedVersion?: unknown; eligible?: unknown } | null;\n const version = target?.expectedVersion;\n if (\n commandKeyText(target?.key) !== commandKeyText(keys[index]) ||\n (version !== null && !(typeof version === 'number' && Number.isSafeInteger(version) && version >= 0))\n ) {\n throw new Error(say('theSelectedRecordsCould'));\n }\n return { key: keys[index], expectedVersion: version as number | null, eligible: target?.eligible === true && version !== null };\n });\n}\n\n/**\n * An action's label said for the records it will take: \"Approve timesheet\"\n * over two is \"Approve 2 timesheets\". Only a label that names the record —\n * the resource's noun, one or many, at its end — is counted; any other\n * (\"Send reminder\") stays as written, beside the count the bar already says.\n */\nexport function countedLabel(label: string, count: number, noun: { one: string; many: string }): string {\n if (count === 1) return label;\n for (const said of [noun.one, noun.many]) {\n const at = label.length - said.length;\n if (at > 0 && label[at - 1] === ' ' && label.slice(at).toLowerCase() === said.toLowerCase()) {\n return `${label.slice(0, at)}${plural(count, { one: noun.one, other: noun.many })}`;\n }\n }\n return label;\n}\n\n/** A bulk command's one outcome, for the whole group: it applied to all, or to none. */\nexport function bulkCommandSummary(label: string, count: number, kind: 'applied' | 'rejected', message = ''): string {\n const records = say('common.records2', { count });\n return kind === 'applied'\n ? say('labelApplied', { label, count })\n : `${say('labelRefused', { label, records })}${message ? ` ${message}` : ''}`;\n}\n\n/** One sentence for the result region: what happened, in the order a reader checks it. */\nexport function bulkSummary(label: string, result: BulkResult): string {\n const { counts } = result;\n const parts = [say('applied', { applied: counts.applied })];\n if (counts.rejected) parts.push(say('rejected', { rejected: counts.rejected }));\n if (counts.uncertain) parts.push(say('unconfirmed', { uncertain: counts.uncertain }));\n if (counts.blocked) parts.push(say('alreadyPending', { blocked: counts.blocked }));\n if (counts.skipped) parts.push(say('notWritten', { skipped: counts.skipped }));\n return `${label}: ${parts.join(', ')}.`;\n}\n"],"mappings":";;;;;;;;;;;;;;;AAKA,SAAgB,YAAY,SAA6B,KAAkC;CACzF,IAAI,CAAC,WAAW,CAAC,OAAO,OAAO,QAA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UAAU,MAAM,KAAK,IAAI,YAAY,EAAE,UAAU,OAAO,SAAS,CAAC,CAAC;CAC9E,IAAI,OAAO,WAAW,MAAM,KAAK,IAAI,eAAe,EAAE,WAAW,OAAO,UAAU,CAAC,CAAC;CACpF,IAAI,OAAO,SAAS,MAAM,KAAK,IAAI,kBAAkB,EAAE,SAAS,OAAO,QAAQ,CAAC,CAAC;CACjF,IAAI,OAAO,SAAS,MAAM,KAAK,IAAI,cAAc,EAAE,SAAS,OAAO,QAAQ,CAAC,CAAC;CAC7E,OAAO,GAAG,MAAM,IAAI,MAAM,KAAK,IAAI,EAAE;AACvC"}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { l as computedReads, nt as Button } from "./shared-poc11xxo.js";
|
|
2
2
|
import { A as isFlagColumn, D as columnKind, F as primaryKey, J as rowCurrency, Jt as formatNumber, K as minorFigure, Kt as formatLocale, R as tableNamed, Rt as defaultCurrency, W as currencyDigits, d as dressFor, gt as defineMessages, qt as formatMoney, ut as humanName } from "./shared-DJZjSi3J.js";
|
|
3
|
-
import { L as DropItem, R as DropMenu, ut as useQueries } from "./shared-
|
|
4
|
-
import { L as state, T as recordLabel, c as columnLabel, d as findTable, i as api, m as labelPath, s as columnDisplay, st as ownedBy } from "./shared-
|
|
3
|
+
import { L as DropItem, R as DropMenu, ut as useQueries } from "./shared-BHsjawAG.js";
|
|
4
|
+
import { L as state, T as recordLabel, c as columnLabel, d as findTable, i as api, m as labelPath, s as columnDisplay, st as ownedBy } from "./shared-BoLbc2WD.js";
|
|
5
5
|
import { r as isIsoDate } from "./shared-Du2YAQk4.js";
|
|
6
6
|
import { t as usePointerDrag } from "./shared-Ba8y5h2K.js";
|
|
7
|
-
import { i as useAvatarPhotos } from "./shared-
|
|
8
|
-
import { n as singleReference } from "./shared-
|
|
9
|
-
import { t as booleanChoices } from "./shared-
|
|
10
|
-
import { n as columnInput, r as RecordPicker } from "./shared-
|
|
7
|
+
import { i as useAvatarPhotos } from "./shared-BOe4W2FI.js";
|
|
8
|
+
import { n as singleReference } from "./shared-y-6_ZDts.js";
|
|
9
|
+
import { t as booleanChoices } from "./shared-BHCQ60yN.js";
|
|
10
|
+
import { n as columnInput, r as RecordPicker } from "./shared-C2RU1qjv.js";
|
|
11
11
|
import { t as evaluateComputed } from "./shared-DtWgKxbD.js";
|
|
12
12
|
import { t as MinorMoneyInput } from "./shared-BfvaTcUD.js";
|
|
13
|
-
import { n as ValueControl } from "./shared-
|
|
14
|
-
import { D as typedValue, g as isoInstant } from "./shared-
|
|
13
|
+
import { n as ValueControl } from "./shared-1gMnOu9J.js";
|
|
14
|
+
import { D as typedValue, g as isoInstant } from "./shared-CL3RLKDA.js";
|
|
15
15
|
import { useEffect, useMemo, useRef, useState } from "react";
|
|
16
16
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
17
17
|
// packages/mistri/src/shared/commandLineCell.ts
|
|
@@ -901,4 +901,4 @@ function CommandLines({ field, path, rows, problems, disabled, onChange }) {
|
|
|
901
901
|
}
|
|
902
902
|
export { CommandLines, lineAt, lineCellOf };
|
|
903
903
|
|
|
904
|
-
//# sourceMappingURL=shared-
|
|
904
|
+
//# sourceMappingURL=shared-Ci16s2rN.js.map
|