@arbidocs/blocks 0.5.195 → 0.5.197
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/dist/{ConnectedCallDock-L2ER6N2P.cjs → ConnectedCallDock-CJTL2FDV.cjs} +22 -22
- package/dist/{ConnectedCallDock-L2ER6N2P.cjs.map → ConnectedCallDock-CJTL2FDV.cjs.map} +1 -1
- package/dist/{ConnectedCallRoom-R6SHBOKX.cjs → ConnectedCallRoom-DXUZXFZX.cjs} +14 -14
- package/dist/{ConnectedCallRoom-R6SHBOKX.cjs.map → ConnectedCallRoom-DXUZXFZX.cjs.map} +1 -1
- package/dist/ConnectedMailInviteCard-NWVQNVR6.cjs +22 -0
- package/dist/{ConnectedMailInviteCard-DDGB4LLC.cjs.map → ConnectedMailInviteCard-NWVQNVR6.cjs.map} +1 -1
- package/dist/{ConnectedNativeDocxComparison-JNOAKSPK.cjs → ConnectedNativeDocxComparison-FDBAVRFO.cjs} +19 -19
- package/dist/{ConnectedNativeDocxComparison-JNOAKSPK.cjs.map → ConnectedNativeDocxComparison-FDBAVRFO.cjs.map} +1 -1
- package/dist/{ConnectedPresentation-ZSB7454J.cjs → ConnectedPresentation-VGWCLJKM.cjs} +19 -19
- package/dist/{ConnectedPresentation-ZSB7454J.cjs.map → ConnectedPresentation-VGWCLJKM.cjs.map} +1 -1
- package/dist/{ConnectedProductionSetDialog-SHDI7KP6.cjs → ConnectedProductionSetDialog-R7FVJ4X7.cjs} +9 -9
- package/dist/{ConnectedProductionSetDialog-SHDI7KP6.cjs.map → ConnectedProductionSetDialog-R7FVJ4X7.cjs.map} +1 -1
- package/dist/{ConnectedSlidesTab-LCA3ZX5W.cjs → ConnectedSlidesTab-PCJTMD3W.cjs} +18 -18
- package/dist/{ConnectedSlidesTab-LCA3ZX5W.cjs.map → ConnectedSlidesTab-PCJTMD3W.cjs.map} +1 -1
- package/dist/{ConnectedStreamedWordArtifact-J5HVQMUS.cjs → ConnectedStreamedWordArtifact-JET44WCX.cjs} +19 -19
- package/dist/{ConnectedStreamedWordArtifact-J5HVQMUS.cjs.map → ConnectedStreamedWordArtifact-JET44WCX.cjs.map} +1 -1
- package/dist/{DocumentReviewCard-Q3NKJLSM.cjs → DocumentReviewCard-CJHMIMSM.cjs} +22 -22
- package/dist/{DocumentReviewCard-Q3NKJLSM.cjs.map → DocumentReviewCard-CJHMIMSM.cjs.map} +1 -1
- package/dist/{FilesViewerDialog-O3ZTKELI.cjs → FilesViewerDialog-COHCOFKX.cjs} +47 -45
- package/dist/FilesViewerDialog-COHCOFKX.cjs.map +1 -0
- package/dist/{NativeDocxEditor-JJQJEYQD.cjs → NativeDocxEditor-4ZFDUQIU.cjs} +8 -8
- package/dist/{NativeDocxEditor-JJQJEYQD.cjs.map → NativeDocxEditor-4ZFDUQIU.cjs.map} +1 -1
- package/dist/{WorkspaceTableView-QT63XYII.cjs → WorkspaceTableView-XK7L4MU6.cjs} +9 -9
- package/dist/{WorkspaceTableView-QT63XYII.cjs.map → WorkspaceTableView-XK7L4MU6.cjs.map} +1 -1
- package/dist/agents/index.cjs +201 -201
- package/dist/{ai-I7QIW5OA.cjs → ai-RIR36YJR.cjs} +25 -25
- package/dist/ai-RIR36YJR.cjs.map +1 -0
- package/dist/calls/index.cjs +119 -119
- package/dist/chat/index.cjs +30 -30
- package/dist/{chunk-YPSCG6ZW.cjs → chunk-2FB2TP2R.cjs} +59 -59
- package/dist/{chunk-YPSCG6ZW.cjs.map → chunk-2FB2TP2R.cjs.map} +1 -1
- package/dist/chunk-2JSXBOG2.cjs +199 -0
- package/dist/chunk-2JSXBOG2.cjs.map +1 -0
- package/dist/{chunk-KHT2YJ5N.cjs → chunk-2VHTB6A4.cjs} +11 -11
- package/dist/{chunk-KHT2YJ5N.cjs.map → chunk-2VHTB6A4.cjs.map} +1 -1
- package/dist/{chunk-D4SJT3NG.cjs → chunk-37RTQFWM.cjs} +8 -8
- package/dist/{chunk-D4SJT3NG.cjs.map → chunk-37RTQFWM.cjs.map} +1 -1
- package/dist/{chunk-WHHBEV4G.cjs → chunk-3LPHCJPB.cjs} +4 -4
- package/dist/{chunk-WHHBEV4G.cjs.map → chunk-3LPHCJPB.cjs.map} +1 -1
- package/dist/{chunk-VJNJ4G6Y.cjs → chunk-3VVLI5RM.cjs} +4 -4
- package/dist/{chunk-VJNJ4G6Y.cjs.map → chunk-3VVLI5RM.cjs.map} +1 -1
- package/dist/{chunk-HGQGXY5Q.cjs → chunk-5I2KMQ7A.cjs} +4 -4
- package/dist/{chunk-HGQGXY5Q.cjs.map → chunk-5I2KMQ7A.cjs.map} +1 -1
- package/dist/{chunk-L3MYUPSH.cjs → chunk-5ISSFIVO.cjs} +5 -5
- package/dist/{chunk-L3MYUPSH.cjs.map → chunk-5ISSFIVO.cjs.map} +1 -1
- package/dist/{chunk-7NJKDJVO.cjs → chunk-62HKBJNH.cjs} +6 -6
- package/dist/{chunk-7NJKDJVO.cjs.map → chunk-62HKBJNH.cjs.map} +1 -1
- package/dist/{chunk-C25KF2TM.cjs → chunk-67HUC56R.cjs} +4 -4
- package/dist/{chunk-C25KF2TM.cjs.map → chunk-67HUC56R.cjs.map} +1 -1
- package/dist/{chunk-3GI3UM2T.cjs → chunk-74YFLEIZ.cjs} +72 -72
- package/dist/chunk-74YFLEIZ.cjs.map +1 -0
- package/dist/{chunk-YYK2CCMC.cjs → chunk-75UNBJVM.cjs} +21 -21
- package/dist/{chunk-YYK2CCMC.cjs.map → chunk-75UNBJVM.cjs.map} +1 -1
- package/dist/{chunk-6CXTLIGJ.cjs → chunk-7QFMDMWA.cjs} +6 -6
- package/dist/{chunk-6CXTLIGJ.cjs.map → chunk-7QFMDMWA.cjs.map} +1 -1
- package/dist/{chunk-OO452QD5.cjs → chunk-A27BVBKQ.cjs} +4 -4
- package/dist/{chunk-OO452QD5.cjs.map → chunk-A27BVBKQ.cjs.map} +1 -1
- package/dist/{chunk-J37DOAGN.cjs → chunk-ADJEWEHZ.cjs} +7 -7
- package/dist/{chunk-J37DOAGN.cjs.map → chunk-ADJEWEHZ.cjs.map} +1 -1
- package/dist/{chunk-V5VFRRLL.cjs → chunk-AX26HWDZ.cjs} +26 -26
- package/dist/{chunk-V5VFRRLL.cjs.map → chunk-AX26HWDZ.cjs.map} +1 -1
- package/dist/chunk-CEBEDIP7.cjs +25 -0
- package/dist/chunk-CEBEDIP7.cjs.map +1 -0
- package/dist/{chunk-5WCQ5Y77.cjs → chunk-CJEFHB7M.cjs} +4 -4
- package/dist/{chunk-5WCQ5Y77.cjs.map → chunk-CJEFHB7M.cjs.map} +1 -1
- package/dist/{chunk-ELN3YOXF.cjs → chunk-CV2YOGBW.cjs} +28 -28
- package/dist/{chunk-ELN3YOXF.cjs.map → chunk-CV2YOGBW.cjs.map} +1 -1
- package/dist/{chunk-633ZCYVN.cjs → chunk-DEL7BS25.cjs} +44 -44
- package/dist/{chunk-633ZCYVN.cjs.map → chunk-DEL7BS25.cjs.map} +1 -1
- package/dist/{chunk-HJAI3QNK.cjs → chunk-DHDIFLU4.cjs} +15 -15
- package/dist/{chunk-HJAI3QNK.cjs.map → chunk-DHDIFLU4.cjs.map} +1 -1
- package/dist/{chunk-HHZDURXN.cjs → chunk-E3WRSQ3J.cjs} +4 -4
- package/dist/{chunk-HHZDURXN.cjs.map → chunk-E3WRSQ3J.cjs.map} +1 -1
- package/dist/{chunk-VWSOHZK2.cjs → chunk-EEDKECR7.cjs} +13 -18
- package/dist/chunk-EEDKECR7.cjs.map +1 -0
- package/dist/{chunk-UXGIMOIN.cjs → chunk-EYBLJWR3.cjs} +4 -4
- package/dist/{chunk-UXGIMOIN.cjs.map → chunk-EYBLJWR3.cjs.map} +1 -1
- package/dist/{chunk-ZQQVXRYZ.cjs → chunk-FEM56BGP.cjs} +4 -4
- package/dist/{chunk-ZQQVXRYZ.cjs.map → chunk-FEM56BGP.cjs.map} +1 -1
- package/dist/{chunk-5K6XHSAM.cjs → chunk-FISPQ67U.cjs} +4 -4
- package/dist/{chunk-5K6XHSAM.cjs.map → chunk-FISPQ67U.cjs.map} +1 -1
- package/dist/{chunk-6LNTU7DA.cjs → chunk-G7JESVKJ.cjs} +4 -4
- package/dist/{chunk-6LNTU7DA.cjs.map → chunk-G7JESVKJ.cjs.map} +1 -1
- package/dist/{chunk-6EATJW7T.cjs → chunk-GHEKXPES.cjs} +14 -14
- package/dist/{chunk-6EATJW7T.cjs.map → chunk-GHEKXPES.cjs.map} +1 -1
- package/dist/chunk-GKEZUE4F.cjs +58 -0
- package/dist/chunk-GKEZUE4F.cjs.map +1 -0
- package/dist/{chunk-LNYICHFJ.cjs → chunk-ITOIO24T.cjs} +5 -5
- package/dist/{chunk-LNYICHFJ.cjs.map → chunk-ITOIO24T.cjs.map} +1 -1
- package/dist/{chunk-SYUVP52B.cjs → chunk-JMMDTIWM.cjs} +102 -102
- package/dist/chunk-JMMDTIWM.cjs.map +1 -0
- package/dist/{chunk-SDID4WK7.cjs → chunk-KLEH67QD.cjs} +76 -76
- package/dist/{chunk-SDID4WK7.cjs.map → chunk-KLEH67QD.cjs.map} +1 -1
- package/dist/{chunk-H4ZKASMT.cjs → chunk-L35JYXOP.cjs} +6 -6
- package/dist/{chunk-H4ZKASMT.cjs.map → chunk-L35JYXOP.cjs.map} +1 -1
- package/dist/{chunk-VD3HI5RF.cjs → chunk-L5JY75DC.cjs} +4 -4
- package/dist/{chunk-VD3HI5RF.cjs.map → chunk-L5JY75DC.cjs.map} +1 -1
- package/dist/{chunk-ZON25DCD.cjs → chunk-LONVRLCN.cjs} +5 -5
- package/dist/{chunk-ZON25DCD.cjs.map → chunk-LONVRLCN.cjs.map} +1 -1
- package/dist/{chunk-7VUO4QZH.cjs → chunk-LP2WMB2N.cjs} +4 -4
- package/dist/{chunk-7VUO4QZH.cjs.map → chunk-LP2WMB2N.cjs.map} +1 -1
- package/dist/{chunk-32W2S6DE.cjs → chunk-MAZCQPEE.cjs} +4 -4
- package/dist/{chunk-32W2S6DE.cjs.map → chunk-MAZCQPEE.cjs.map} +1 -1
- package/dist/{chunk-X3SUQFY7.cjs → chunk-N5ILLODM.cjs} +62 -62
- package/dist/{chunk-X3SUQFY7.cjs.map → chunk-N5ILLODM.cjs.map} +1 -1
- package/dist/{chunk-CVPV4I7Z.cjs → chunk-NAVFMFWM.cjs} +3 -2
- package/dist/chunk-NAVFMFWM.cjs.map +1 -0
- package/dist/{chunk-KQJUY2OE.cjs → chunk-NZBPVCQ5.cjs} +10 -10
- package/dist/{chunk-KQJUY2OE.cjs.map → chunk-NZBPVCQ5.cjs.map} +1 -1
- package/dist/{chunk-TNVCTYZI.cjs → chunk-OUBWZM3L.cjs} +6 -6
- package/dist/{chunk-TNVCTYZI.cjs.map → chunk-OUBWZM3L.cjs.map} +1 -1
- package/dist/{chunk-AZUPMHZI.cjs → chunk-PIM7D4BJ.cjs} +4 -4
- package/dist/{chunk-AZUPMHZI.cjs.map → chunk-PIM7D4BJ.cjs.map} +1 -1
- package/dist/{chunk-UNSZLNA4.cjs → chunk-PQQG62C6.cjs} +12 -12
- package/dist/{chunk-UNSZLNA4.cjs.map → chunk-PQQG62C6.cjs.map} +1 -1
- package/dist/{chunk-7D3OMWIZ.cjs → chunk-Q36QKE6K.cjs} +4 -4
- package/dist/{chunk-7D3OMWIZ.cjs.map → chunk-Q36QKE6K.cjs.map} +1 -1
- package/dist/{chunk-QXIWLWR2.cjs → chunk-QPSLGOIH.cjs} +6 -6
- package/dist/{chunk-QXIWLWR2.cjs.map → chunk-QPSLGOIH.cjs.map} +1 -1
- package/dist/{chunk-VDHBLDQC.cjs → chunk-QTNIFFBJ.cjs} +4 -4
- package/dist/{chunk-VDHBLDQC.cjs.map → chunk-QTNIFFBJ.cjs.map} +1 -1
- package/dist/{chunk-LYDSETR7.cjs → chunk-RIGCKOUY.cjs} +23 -240
- package/dist/chunk-RIGCKOUY.cjs.map +1 -0
- package/dist/{chunk-TBDQGSFI.cjs → chunk-RJUQ4PHS.cjs} +4 -4
- package/dist/{chunk-TBDQGSFI.cjs.map → chunk-RJUQ4PHS.cjs.map} +1 -1
- package/dist/{chunk-P5DNNAUY.cjs → chunk-S2QM6AHI.cjs} +74 -74
- package/dist/{chunk-P5DNNAUY.cjs.map → chunk-S2QM6AHI.cjs.map} +1 -1
- package/dist/{chunk-V4XARTJ4.cjs → chunk-SAQ7ZAMK.cjs} +12 -12
- package/dist/{chunk-V4XARTJ4.cjs.map → chunk-SAQ7ZAMK.cjs.map} +1 -1
- package/dist/{chunk-NSL5BCGH.cjs → chunk-SI3YRTW4.cjs} +7 -7
- package/dist/{chunk-NSL5BCGH.cjs.map → chunk-SI3YRTW4.cjs.map} +1 -1
- package/dist/{chunk-SXC4ZIN4.cjs → chunk-SOVYCUML.cjs} +28 -28
- package/dist/{chunk-SXC4ZIN4.cjs.map → chunk-SOVYCUML.cjs.map} +1 -1
- package/dist/{chunk-TLIZD6DV.cjs → chunk-SZF4CR4O.cjs} +6 -6
- package/dist/{chunk-TLIZD6DV.cjs.map → chunk-SZF4CR4O.cjs.map} +1 -1
- package/dist/{chunk-KC3HRFSO.cjs → chunk-T44BYZNJ.cjs} +8 -8
- package/dist/{chunk-KC3HRFSO.cjs.map → chunk-T44BYZNJ.cjs.map} +1 -1
- package/dist/{chunk-VDT7TEAH.cjs → chunk-T6KYE3TR.cjs} +6 -6
- package/dist/{chunk-VDT7TEAH.cjs.map → chunk-T6KYE3TR.cjs.map} +1 -1
- package/dist/{chunk-HN56WWBR.cjs → chunk-UCMUGS6F.cjs} +7 -7
- package/dist/{chunk-HN56WWBR.cjs.map → chunk-UCMUGS6F.cjs.map} +1 -1
- package/dist/{chunk-JTBWI74K.cjs → chunk-ULS5DQTO.cjs} +7 -7
- package/dist/{chunk-JTBWI74K.cjs.map → chunk-ULS5DQTO.cjs.map} +1 -1
- package/dist/{chunk-A7MGQMOV.cjs → chunk-UO2IJNYC.cjs} +11 -11
- package/dist/{chunk-A7MGQMOV.cjs.map → chunk-UO2IJNYC.cjs.map} +1 -1
- package/dist/{chunk-Z574BY3H.cjs → chunk-UXLEHCOW.cjs} +7 -7
- package/dist/{chunk-Z574BY3H.cjs.map → chunk-UXLEHCOW.cjs.map} +1 -1
- package/dist/{chunk-IXCWZ4HC.cjs → chunk-V27N2PTV.cjs} +5 -5
- package/dist/{chunk-IXCWZ4HC.cjs.map → chunk-V27N2PTV.cjs.map} +1 -1
- package/dist/{chunk-EAH7LFJN.cjs → chunk-V4362YKU.cjs} +25 -25
- package/dist/{chunk-EAH7LFJN.cjs.map → chunk-V4362YKU.cjs.map} +1 -1
- package/dist/{chunk-K67VMSOX.cjs → chunk-VJKUADA3.cjs} +7 -7
- package/dist/{chunk-K67VMSOX.cjs.map → chunk-VJKUADA3.cjs.map} +1 -1
- package/dist/{chunk-HQ6SK34T.cjs → chunk-VXCZOQ5R.cjs} +3 -3
- package/dist/{chunk-HQ6SK34T.cjs.map → chunk-VXCZOQ5R.cjs.map} +1 -1
- package/dist/{chunk-J5CBCUQE.cjs → chunk-WDAO4MPC.cjs} +8 -8
- package/dist/{chunk-J5CBCUQE.cjs.map → chunk-WDAO4MPC.cjs.map} +1 -1
- package/dist/chunk-WRYNJNC6.cjs +18 -0
- package/dist/{chunk-HBY5PEMC.cjs.map → chunk-WRYNJNC6.cjs.map} +1 -1
- package/dist/{chunk-3RAW2ZH5.cjs → chunk-XCQDQSZL.cjs} +8 -8
- package/dist/{chunk-3RAW2ZH5.cjs.map → chunk-XCQDQSZL.cjs.map} +1 -1
- package/dist/{chunk-LYJFE37D.cjs → chunk-XE3PKEBU.cjs} +21 -21
- package/dist/{chunk-LYJFE37D.cjs.map → chunk-XE3PKEBU.cjs.map} +1 -1
- package/dist/{chunk-GD5OYIOV.cjs → chunk-XFNBHLVW.cjs} +6 -6
- package/dist/{chunk-GD5OYIOV.cjs.map → chunk-XFNBHLVW.cjs.map} +1 -1
- package/dist/{chunk-XQPJWPWE.cjs → chunk-XKKY2RF2.cjs} +4 -4
- package/dist/{chunk-XQPJWPWE.cjs.map → chunk-XKKY2RF2.cjs.map} +1 -1
- package/dist/{chunk-XYN3RP5W.cjs → chunk-XTRE3X4I.cjs} +36 -18
- package/dist/chunk-XTRE3X4I.cjs.map +1 -0
- package/dist/chunk-XU7SIV2P.cjs +394 -0
- package/dist/chunk-XU7SIV2P.cjs.map +1 -0
- package/dist/{chunk-NYNHFDVW.cjs → chunk-YI26A7SN.cjs} +5 -5
- package/dist/{chunk-NYNHFDVW.cjs.map → chunk-YI26A7SN.cjs.map} +1 -1
- package/dist/{chunk-ZTR3SUN4.cjs → chunk-YKEI4XPI.cjs} +14 -14
- package/dist/{chunk-ZTR3SUN4.cjs.map → chunk-YKEI4XPI.cjs.map} +1 -1
- package/dist/{chunk-SOT7NPIB.cjs → chunk-Z4MZZBTR.cjs} +4 -4
- package/dist/{chunk-SOT7NPIB.cjs.map → chunk-Z4MZZBTR.cjs.map} +1 -1
- package/dist/{chunk-HGH5FLYS.cjs → chunk-ZGT6M5C5.cjs} +14 -14
- package/dist/{chunk-HGH5FLYS.cjs.map → chunk-ZGT6M5C5.cjs.map} +1 -1
- package/dist/{chunk-EFV52SZ6.cjs → chunk-ZINJWTUD.cjs} +4 -4
- package/dist/{chunk-EFV52SZ6.cjs.map → chunk-ZINJWTUD.cjs.map} +1 -1
- package/dist/{chunk-ZLMWMAID.cjs → chunk-ZMGPE43A.cjs} +4 -4
- package/dist/{chunk-ZLMWMAID.cjs.map → chunk-ZMGPE43A.cjs.map} +1 -1
- package/dist/citations/index.cjs +10 -10
- package/dist/collaboration/index.cjs +70 -70
- package/dist/connect/docx.cjs +23 -23
- package/dist/connect/index.cjs +1661 -1653
- package/dist/connect/index.cjs.map +1 -1
- package/dist/connect/viewer.cjs +33 -31
- package/dist/connection/ConnectedSignDocumentDialog.d.ts +8 -0
- package/dist/connection/ConnectedSignDocumentDialog.js +14 -0
- package/dist/connection/ConnectedSignDocumentDialog.js.map +7 -0
- package/dist/connection/ConnectionProvider.js +7 -12
- package/dist/connection/ConnectionProvider.js.map +2 -2
- package/dist/connection/WorkflowRunnerDialogs.js +2 -2
- package/dist/connection/WorkflowRunnerDialogs.js.map +2 -2
- package/dist/connection/types.d.ts +2 -2
- package/dist/connection/useSigningIdentity.d.ts +10 -0
- package/dist/connection/useSigningIdentity.js +15 -0
- package/dist/connection/useSigningIdentity.js.map +7 -0
- package/dist/connection/viewer/ConnectedDocumentViewer.js +2 -2
- package/dist/connection/viewer/ConnectedDocumentViewer.js.map +2 -2
- package/dist/connection/viewer/ConnectedSharedFileDialog.js +4 -0
- package/dist/connection/viewer/ConnectedSharedFileDialog.js.map +2 -2
- package/dist/connection/viewer/ConnectedSharedFilesPage.js +4 -0
- package/dist/connection/viewer/ConnectedSharedFilesPage.js.map +2 -2
- package/dist/dashboards/index.cjs +20 -20
- package/dist/document-tools/SignDocumentDialog.d.ts +10 -1
- package/dist/document-tools/SignDocumentDialog.js +116 -93
- package/dist/document-tools/SignDocumentDialog.js.map +2 -2
- package/dist/document-tools/index.cjs +28 -27
- package/dist/document-tools/useIdentityGate.d.ts +26 -0
- package/dist/document-tools/useIdentityGate.js +55 -0
- package/dist/document-tools/useIdentityGate.js.map +7 -0
- package/dist/document-tools/viewer/GuidedSigningViewer.d.ts +9 -1
- package/dist/document-tools/viewer/GuidedSigningViewer.js +19 -5
- package/dist/document-tools/viewer/GuidedSigningViewer.js.map +2 -2
- package/dist/document-tools/viewer/SharedFileView.d.ts +5 -1
- package/dist/document-tools/viewer/SharedFileView.js +5 -1
- package/dist/document-tools/viewer/SharedFileView.js.map +2 -2
- package/dist/document-tools/viewer/index.cjs +13 -11
- package/dist/document-tools/viewer/index.cjs.map +1 -1
- package/dist/docx/index.cjs +40 -40
- package/dist/embed/index.cjs +34 -34
- package/dist/facts/index.cjs +42 -42
- package/dist/files/index.cjs +223 -223
- package/dist/home/index.cjs +27 -27
- package/dist/index.cjs +429 -429
- package/dist/pages/index.cjs +42 -42
- package/dist/retrieval/index.cjs +6 -6
- package/dist/settings/IdentityVerification.d.ts +4 -0
- package/dist/settings/IdentityVerification.js +12 -8
- package/dist/settings/IdentityVerification.js.map +2 -2
- package/dist/settings/ModalScaffold.js +1 -0
- package/dist/settings/ModalScaffold.js.map +2 -2
- package/dist/settings/index.cjs +161 -161
- package/dist/shell/index.cjs +42 -42
- package/dist/studio/index.cjs +33 -33
- package/dist/workflow-canvas/index.cjs +54 -52
- package/dist/workflow-canvas/index.cjs.map +1 -1
- package/dist/workspaces/index.cjs +27 -27
- package/node_modules/@arbidocs/coedit/package.json +1 -1
- package/package.json +5 -5
- package/dist/ConnectedMailInviteCard-DDGB4LLC.cjs +0 -22
- package/dist/FilesViewerDialog-O3ZTKELI.cjs.map +0 -1
- package/dist/ai-I7QIW5OA.cjs.map +0 -1
- package/dist/chunk-3GI3UM2T.cjs.map +0 -1
- package/dist/chunk-CVPV4I7Z.cjs.map +0 -1
- package/dist/chunk-HBY5PEMC.cjs +0 -18
- package/dist/chunk-LYDSETR7.cjs.map +0 -1
- package/dist/chunk-OUYBYZ7Y.cjs +0 -176
- package/dist/chunk-OUYBYZ7Y.cjs.map +0 -1
- package/dist/chunk-QQMMCXBP.cjs +0 -173
- package/dist/chunk-QQMMCXBP.cjs.map +0 -1
- package/dist/chunk-SYUVP52B.cjs.map +0 -1
- package/dist/chunk-VWSOHZK2.cjs.map +0 -1
- package/dist/chunk-XYN3RP5W.cjs.map +0 -1
package/dist/pages/index.cjs
CHANGED
|
@@ -2,23 +2,23 @@
|
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
4
|
var chunkK5F2VNCX_cjs = require('../chunk-K5F2VNCX.cjs');
|
|
5
|
-
var
|
|
5
|
+
var chunk2FB2TP2R_cjs = require('../chunk-2FB2TP2R.cjs');
|
|
6
6
|
require('../chunk-DWRUGOTQ.cjs');
|
|
7
7
|
require('../chunk-KD66CBYO.cjs');
|
|
8
|
-
require('../chunk-
|
|
9
|
-
require('../chunk-
|
|
10
|
-
require('../chunk-
|
|
11
|
-
var
|
|
8
|
+
require('../chunk-YKEI4XPI.cjs');
|
|
9
|
+
require('../chunk-G7JESVKJ.cjs');
|
|
10
|
+
require('../chunk-PQQG62C6.cjs');
|
|
11
|
+
var chunkWDAO4MPC_cjs = require('../chunk-WDAO4MPC.cjs');
|
|
12
12
|
require('../chunk-JWCVA4LC.cjs');
|
|
13
|
-
var
|
|
13
|
+
var chunkV4362YKU_cjs = require('../chunk-V4362YKU.cjs');
|
|
14
14
|
require('../chunk-223D4727.cjs');
|
|
15
15
|
require('../chunk-DTMBAFIL.cjs');
|
|
16
|
-
require('../chunk-
|
|
17
|
-
require('../chunk-
|
|
16
|
+
require('../chunk-Z4MZZBTR.cjs');
|
|
17
|
+
require('../chunk-ZGT6M5C5.cjs');
|
|
18
18
|
require('../chunk-76S6WTEC.cjs');
|
|
19
|
-
var
|
|
19
|
+
var chunkITOIO24T_cjs = require('../chunk-ITOIO24T.cjs');
|
|
20
20
|
var chunkYSAUOJA7_cjs = require('../chunk-YSAUOJA7.cjs');
|
|
21
|
-
var
|
|
21
|
+
var chunkADJEWEHZ_cjs = require('../chunk-ADJEWEHZ.cjs');
|
|
22
22
|
require('../chunk-QEMGGJB6.cjs');
|
|
23
23
|
var chunkR6HGMPF4_cjs = require('../chunk-R6HGMPF4.cjs');
|
|
24
24
|
require('../chunk-HUAABZ2C.cjs');
|
|
@@ -31,23 +31,23 @@ require('../chunk-7G2LJMUG.cjs');
|
|
|
31
31
|
require('../chunk-WRTEKOQP.cjs');
|
|
32
32
|
require('../chunk-SK6HQ46Q.cjs');
|
|
33
33
|
require('../chunk-HME72RFP.cjs');
|
|
34
|
-
require('../chunk-
|
|
34
|
+
require('../chunk-67HUC56R.cjs');
|
|
35
35
|
require('../chunk-ZU2B2RZK.cjs');
|
|
36
36
|
require('../chunk-U46OGRCO.cjs');
|
|
37
37
|
require('../chunk-66IOCKWS.cjs');
|
|
38
|
-
require('../chunk-
|
|
38
|
+
require('../chunk-ZMGPE43A.cjs');
|
|
39
39
|
require('../chunk-QFSFTO7I.cjs');
|
|
40
40
|
require('../chunk-EVZH6Z5O.cjs');
|
|
41
41
|
require('../chunk-S237ORM3.cjs');
|
|
42
42
|
require('../chunk-II2OEXHW.cjs');
|
|
43
|
-
require('../chunk-
|
|
43
|
+
require('../chunk-T44BYZNJ.cjs');
|
|
44
44
|
require('../chunk-AHDJXIUB.cjs');
|
|
45
|
+
require('../chunk-V27N2PTV.cjs');
|
|
45
46
|
require('../chunk-S3GVFAFB.cjs');
|
|
46
|
-
require('../chunk-IXCWZ4HC.cjs');
|
|
47
47
|
require('../chunk-VOGIYFNN.cjs');
|
|
48
48
|
require('../chunk-UDSHVNU3.cjs');
|
|
49
49
|
require('../chunk-DKY67DA6.cjs');
|
|
50
|
-
require('../chunk-
|
|
50
|
+
require('../chunk-FEM56BGP.cjs');
|
|
51
51
|
require('../chunk-IPSHAMO2.cjs');
|
|
52
52
|
require('../chunk-6UZC4XVV.cjs');
|
|
53
53
|
require('../chunk-ZVEW3JBT.cjs');
|
|
@@ -59,15 +59,15 @@ require('../chunk-FUGQ7YQW.cjs');
|
|
|
59
59
|
require('../chunk-QUMUAJ2P.cjs');
|
|
60
60
|
require('../chunk-DNHZYLPK.cjs');
|
|
61
61
|
require('../chunk-VZOOGA47.cjs');
|
|
62
|
-
require('../chunk-
|
|
63
|
-
require('../chunk-
|
|
64
|
-
require('../chunk-
|
|
62
|
+
require('../chunk-ULS5DQTO.cjs');
|
|
63
|
+
require('../chunk-XFNBHLVW.cjs');
|
|
64
|
+
require('../chunk-EEDKECR7.cjs');
|
|
65
65
|
require('../chunk-TMX7YFVM.cjs');
|
|
66
66
|
require('../chunk-3YZKDCWY.cjs');
|
|
67
67
|
var chunkZW6FPIFC_cjs = require('../chunk-ZW6FPIFC.cjs');
|
|
68
|
-
var
|
|
69
|
-
require('../chunk-
|
|
70
|
-
require('../chunk-
|
|
68
|
+
var chunkUCMUGS6F_cjs = require('../chunk-UCMUGS6F.cjs');
|
|
69
|
+
require('../chunk-VJKUADA3.cjs');
|
|
70
|
+
require('../chunk-NAVFMFWM.cjs');
|
|
71
71
|
require('../chunk-PPCATBOY.cjs');
|
|
72
72
|
require('../chunk-PLIF5CUV.cjs');
|
|
73
73
|
var react$1 = require('react');
|
|
@@ -80,7 +80,7 @@ var documentTools = require('@arbidocs/react/document-tools');
|
|
|
80
80
|
var viewers = require('@arbidocs/react/viewers');
|
|
81
81
|
|
|
82
82
|
var PAGE_TEMPLATES = [
|
|
83
|
-
|
|
83
|
+
chunk2FB2TP2R_cjs.WORKSPACE_DASHBOARD_PAGE,
|
|
84
84
|
...chunkYSAUOJA7_cjs.DASHBOARD_TEMPLATES
|
|
85
85
|
];
|
|
86
86
|
function pageOfTemplate(template) {
|
|
@@ -452,7 +452,7 @@ function BlockEditor({
|
|
|
452
452
|
] }),
|
|
453
453
|
value && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
|
|
454
454
|
(value.kind === "chart" || value.kind === "metric") && /* @__PURE__ */ jsxRuntime.jsx(
|
|
455
|
-
|
|
455
|
+
chunkITOIO24T_cjs.PanelEditor,
|
|
456
456
|
{
|
|
457
457
|
value: react.panelOfBlock(value),
|
|
458
458
|
onChange: setPanel,
|
|
@@ -1181,7 +1181,7 @@ var toRowView = (r) => ({
|
|
|
1181
1181
|
});
|
|
1182
1182
|
var toColumnView = (c) => ({
|
|
1183
1183
|
...c,
|
|
1184
|
-
type:
|
|
1184
|
+
type: chunk2FB2TP2R_cjs.kitTypeOf(c.type) ?? "text"
|
|
1185
1185
|
});
|
|
1186
1186
|
function TableViewBlock({
|
|
1187
1187
|
viewId,
|
|
@@ -1259,7 +1259,7 @@ function WithNewFileMenu({ children }) {
|
|
|
1259
1259
|
const [open, setOpen] = react$1.useState(false);
|
|
1260
1260
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
1261
1261
|
children(() => setOpen(true)),
|
|
1262
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1262
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunk2FB2TP2R_cjs.ConnectedNewFileMenu, { open, onOpenChange: setOpen })
|
|
1263
1263
|
] });
|
|
1264
1264
|
}
|
|
1265
1265
|
function PageBlockView({
|
|
@@ -1275,7 +1275,7 @@ function PageBlockView({
|
|
|
1275
1275
|
case "chart":
|
|
1276
1276
|
case "metric":
|
|
1277
1277
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1278
|
-
|
|
1278
|
+
chunkADJEWEHZ_cjs.DashboardPanel,
|
|
1279
1279
|
{
|
|
1280
1280
|
panel: react.panelOfBlock(block),
|
|
1281
1281
|
actions,
|
|
@@ -1317,7 +1317,7 @@ function PageBlockView({
|
|
|
1317
1317
|
}
|
|
1318
1318
|
);
|
|
1319
1319
|
case "document":
|
|
1320
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1320
|
+
return /* @__PURE__ */ jsxRuntime.jsx(chunkWDAO4MPC_cjs.ConnectedDocumentToolsProvider, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1321
1321
|
DocumentBlockView,
|
|
1322
1322
|
{
|
|
1323
1323
|
documentId: block.config.document,
|
|
@@ -1328,7 +1328,7 @@ function PageBlockView({
|
|
|
1328
1328
|
}
|
|
1329
1329
|
) });
|
|
1330
1330
|
case "gallery":
|
|
1331
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1331
|
+
return /* @__PURE__ */ jsxRuntime.jsx(chunkWDAO4MPC_cjs.ConnectedDocumentToolsProvider, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1332
1332
|
GalleryBlockView,
|
|
1333
1333
|
{
|
|
1334
1334
|
documentIds: block.config.documents,
|
|
@@ -1340,18 +1340,18 @@ function PageBlockView({
|
|
|
1340
1340
|
) });
|
|
1341
1341
|
case "list":
|
|
1342
1342
|
return /* @__PURE__ */ jsxRuntime.jsx(LiveBlockCard, { actions, className, testId, children: block.config.source === "documents" ? /* @__PURE__ */ jsxRuntime.jsx(WithNewFileMenu, { children: (onCreateNew) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1343
|
-
|
|
1343
|
+
chunk2FB2TP2R_cjs.ConnectedListBlock,
|
|
1344
1344
|
{
|
|
1345
1345
|
config: block.config,
|
|
1346
1346
|
onCreateNew,
|
|
1347
1347
|
testId: testId && `${testId}-list`
|
|
1348
1348
|
}
|
|
1349
|
-
) }) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
1349
|
+
) }) : /* @__PURE__ */ jsxRuntime.jsx(chunk2FB2TP2R_cjs.ConnectedListBlock, { config: block.config, testId: testId && `${testId}-list` }) });
|
|
1350
1350
|
case "carousel":
|
|
1351
|
-
return /* @__PURE__ */ jsxRuntime.jsx(LiveBlockCard, { actions, className, testId, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1351
|
+
return /* @__PURE__ */ jsxRuntime.jsx(LiveBlockCard, { actions, className, testId, children: /* @__PURE__ */ jsxRuntime.jsx(chunk2FB2TP2R_cjs.ConnectedCarouselBlock, { config: block.config, testId: testId && `${testId}-carousel` }) });
|
|
1352
1352
|
case "agenda":
|
|
1353
1353
|
return /* @__PURE__ */ jsxRuntime.jsx(LiveBlockCard, { actions, className, testId, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1354
|
-
|
|
1354
|
+
chunk2FB2TP2R_cjs.ConnectedAgendaBlock,
|
|
1355
1355
|
{
|
|
1356
1356
|
config: block.config,
|
|
1357
1357
|
className: "border-0 p-0",
|
|
@@ -1359,7 +1359,7 @@ function PageBlockView({
|
|
|
1359
1359
|
}
|
|
1360
1360
|
) });
|
|
1361
1361
|
case "start":
|
|
1362
|
-
return /* @__PURE__ */ jsxRuntime.jsx(LiveBlockCard, { actions, className, testId, children: /* @__PURE__ */ jsxRuntime.jsx(WithNewFileMenu, { children: (onCreateNew) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1362
|
+
return /* @__PURE__ */ jsxRuntime.jsx(LiveBlockCard, { actions, className, testId, children: /* @__PURE__ */ jsxRuntime.jsx(WithNewFileMenu, { children: (onCreateNew) => /* @__PURE__ */ jsxRuntime.jsx(chunk2FB2TP2R_cjs.ConnectedStartBlock, { onCreateNew }) }) });
|
|
1363
1363
|
}
|
|
1364
1364
|
}
|
|
1365
1365
|
function NewPageButton({
|
|
@@ -1614,9 +1614,9 @@ function OpenPageTransferDialog({
|
|
|
1614
1614
|
testId = "page-transfer"
|
|
1615
1615
|
}) {
|
|
1616
1616
|
const l = { ...DEFAULT_PAGE_TRANSFER_LABELS, ...labels };
|
|
1617
|
-
const { notify } =
|
|
1618
|
-
const { options, nameOf } =
|
|
1619
|
-
const trackTransfer =
|
|
1617
|
+
const { notify } = chunkUCMUGS6F_cjs.useBlocksEnvironment();
|
|
1618
|
+
const { options, nameOf } = chunk2FB2TP2R_cjs.useTransferTargets();
|
|
1619
|
+
const trackTransfer = chunk2FB2TP2R_cjs.useExportStore((state) => state.trackTransfer);
|
|
1620
1620
|
const [targetId, setTargetId] = react$1.useState(null);
|
|
1621
1621
|
const [references, setReferences] = react$1.useState("link");
|
|
1622
1622
|
const [jobId, setJobId] = react$1.useState(null);
|
|
@@ -1628,7 +1628,7 @@ function OpenPageTransferDialog({
|
|
|
1628
1628
|
isFetching: isPlanning,
|
|
1629
1629
|
refetch: refetchPlan
|
|
1630
1630
|
} = react.usePlanWorkspaceTransfer(scope, mode, { enabled: !jobId });
|
|
1631
|
-
const failure =
|
|
1631
|
+
const failure = chunk2FB2TP2R_cjs.planFailure(planError);
|
|
1632
1632
|
const start = react.useStartWorkspaceTransfer();
|
|
1633
1633
|
const cancel = react.useCancelWorkspaceTransfer();
|
|
1634
1634
|
const switchToPages = react.useSwitchToWorkspacePages();
|
|
@@ -1673,7 +1673,7 @@ function OpenPageTransferDialog({
|
|
|
1673
1673
|
if (!jobId) {
|
|
1674
1674
|
body = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
|
|
1675
1675
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1676
|
-
|
|
1676
|
+
chunkV4362YKU_cjs.ExportWorkspacePicker,
|
|
1677
1677
|
{
|
|
1678
1678
|
workspaces: options,
|
|
1679
1679
|
selectedId: targetId,
|
|
@@ -1682,7 +1682,7 @@ function OpenPageTransferDialog({
|
|
|
1682
1682
|
}
|
|
1683
1683
|
),
|
|
1684
1684
|
documents > 0 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1685
|
-
|
|
1685
|
+
chunkV4362YKU_cjs.TransferReferencesChooser,
|
|
1686
1686
|
{
|
|
1687
1687
|
value: references,
|
|
1688
1688
|
onChange: setReferences,
|
|
@@ -1696,7 +1696,7 @@ function OpenPageTransferDialog({
|
|
|
1696
1696
|
),
|
|
1697
1697
|
views > 0 && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "pt-2 text-sm text-muted-foreground", "data-testid": `${testId}-views`, children: l.viewsStay(views) }),
|
|
1698
1698
|
failure && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "pt-2", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1699
|
-
|
|
1699
|
+
chunkV4362YKU_cjs.TransferPlanError,
|
|
1700
1700
|
{
|
|
1701
1701
|
detail: typeof failure === "string" ? failure : void 0,
|
|
1702
1702
|
onRetry: () => void refetchPlan(),
|
|
@@ -1730,7 +1730,7 @@ function OpenPageTransferDialog({
|
|
|
1730
1730
|
] });
|
|
1731
1731
|
} else if (!finished || !items) {
|
|
1732
1732
|
body = job ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
1733
|
-
|
|
1733
|
+
chunkV4362YKU_cjs.TransferProgressView,
|
|
1734
1734
|
{
|
|
1735
1735
|
title: l.progress(mode, target),
|
|
1736
1736
|
processed: job.processed ?? 0,
|
|
@@ -1905,7 +1905,7 @@ function ConnectedPagesPage({
|
|
|
1905
1905
|
testId = "pages"
|
|
1906
1906
|
}) {
|
|
1907
1907
|
const l = { ...DEFAULT_PAGES_PAGE_LABELS, ...labels };
|
|
1908
|
-
const { confirm, notify } =
|
|
1908
|
+
const { confirm, notify } = chunkUCMUGS6F_cjs.useBlocksEnvironment();
|
|
1909
1909
|
const arbi = react.useArbi();
|
|
1910
1910
|
const me = arbi.isLoggedIn ? arbi.user.identity()?.externalId ?? null : null;
|
|
1911
1911
|
const workflowsOn = react.useFeature("workflows");
|
package/dist/retrieval/index.cjs
CHANGED
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
|
|
4
4
|
var chunkSRTSMA5K_cjs = require('../chunk-SRTSMA5K.cjs');
|
|
5
5
|
var chunkNX56DIG3_cjs = require('../chunk-NX56DIG3.cjs');
|
|
6
|
-
var
|
|
7
|
-
require('../chunk-
|
|
8
|
-
require('../chunk-
|
|
9
|
-
require('../chunk-
|
|
6
|
+
var chunkFISPQ67U_cjs = require('../chunk-FISPQ67U.cjs');
|
|
7
|
+
require('../chunk-UCMUGS6F.cjs');
|
|
8
|
+
require('../chunk-VJKUADA3.cjs');
|
|
9
|
+
require('../chunk-NAVFMFWM.cjs');
|
|
10
10
|
require('../chunk-PLIF5CUV.cjs');
|
|
11
11
|
|
|
12
12
|
|
|
@@ -181,11 +181,11 @@ Object.defineProperty(exports, "stripMarkdownLinks", {
|
|
|
181
181
|
});
|
|
182
182
|
Object.defineProperty(exports, "DEFAULT_SEARCH_HIT_LABELS", {
|
|
183
183
|
enumerable: true,
|
|
184
|
-
get: function () { return
|
|
184
|
+
get: function () { return chunkFISPQ67U_cjs.DEFAULT_SEARCH_HIT_LABELS; }
|
|
185
185
|
});
|
|
186
186
|
Object.defineProperty(exports, "SearchHit", {
|
|
187
187
|
enumerable: true,
|
|
188
|
-
get: function () { return
|
|
188
|
+
get: function () { return chunkFISPQ67U_cjs.SearchHit; }
|
|
189
189
|
});
|
|
190
190
|
//# sourceMappingURL=index.cjs.map
|
|
191
191
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -5,6 +5,8 @@ export interface IdentityVerificationLabels {
|
|
|
5
5
|
intro: string;
|
|
6
6
|
/** "£5.00 incl. VAT · 3 attempts" (`price` comes formatted, VAT note included). */
|
|
7
7
|
priceLine: (price: string, attempts: number) => string;
|
|
8
|
+
/** Shown in place of the price where the check is free. */
|
|
9
|
+
free: string;
|
|
8
10
|
proOnly: string;
|
|
9
11
|
seePlans: string;
|
|
10
12
|
manageBilling: string;
|
|
@@ -28,6 +30,8 @@ export interface IdentityVerificationLabels {
|
|
|
28
30
|
checkResult: string;
|
|
29
31
|
resultVerified: string;
|
|
30
32
|
resultDeclined: (attemptsLeft: number) => string;
|
|
33
|
+
/** Declined where the check is free: trying again costs nothing. */
|
|
34
|
+
resultDeclinedFree: string;
|
|
31
35
|
tryAgain: string;
|
|
32
36
|
resultInReview: string;
|
|
33
37
|
nameMismatchTitle: string;
|
|
@@ -9,6 +9,7 @@ const DEFAULT_IDENTITY_VERIFICATION_LABELS = {
|
|
|
9
9
|
title: "Identity verification",
|
|
10
10
|
intro: "Check your ID once to get a verified tick next to your name.",
|
|
11
11
|
priceLine: (price, attempts) => `${price} \xB7 ${attempts} attempts`,
|
|
12
|
+
free: "Free",
|
|
12
13
|
proOnly: "Available on Pro subscriptions.",
|
|
13
14
|
seePlans: "See subscriptions",
|
|
14
15
|
manageBilling: "Manage billing",
|
|
@@ -32,14 +33,15 @@ const DEFAULT_IDENTITY_VERIFICATION_LABELS = {
|
|
|
32
33
|
checkResult: "I\u2019ve finished",
|
|
33
34
|
resultVerified: "You\u2019re verified. The tick now shows next to your name.",
|
|
34
35
|
resultDeclined: (n) => n > 0 ? `We couldn\u2019t verify your ID. You have ${n} attempt${n === 1 ? "" : "s"} left.` : "We couldn\u2019t verify your ID and no attempts are left.",
|
|
36
|
+
resultDeclinedFree: "We couldn\u2019t verify your ID. You can try again.",
|
|
35
37
|
tryAgain: "Try again",
|
|
36
38
|
resultInReview: "Your check needs a manual review. We\u2019ll show the result here when it\u2019s done.",
|
|
37
39
|
nameMismatchTitle: "Your ID was verified",
|
|
38
|
-
nameMismatchBody: "The name on your ID differs from your account name.
|
|
40
|
+
nameMismatchBody: "The name on your ID differs from your account name. Change your name to match your ID to finish, or cancel the verification.",
|
|
39
41
|
documentName: "Name on your ID",
|
|
40
42
|
accountName: "Account name",
|
|
41
43
|
useDocumentName: (name) => `Change my name to ${name}`,
|
|
42
|
-
keepName: "
|
|
44
|
+
keepName: "Cancel verification",
|
|
43
45
|
close: "Close"
|
|
44
46
|
};
|
|
45
47
|
function useLabels(labels) {
|
|
@@ -85,7 +87,7 @@ function IdentityVerificationCard({
|
|
|
85
87
|
] })
|
|
86
88
|
] });
|
|
87
89
|
action = /* @__PURE__ */ jsx(Button, { size: "sm", variant: "ghost", onClick: flow.remove, disabled: busy, children: l.remove });
|
|
88
|
-
} else if (!status.eligible) {
|
|
90
|
+
} else if (!status.eligible && !status.free) {
|
|
89
91
|
description = `${l.intro} ${l.proOnly}`;
|
|
90
92
|
action = onManageBilling ? /* @__PURE__ */ jsx(Button, { size: "sm", variant: "outline", onClick: onManageBilling, children: l.seePlans }) : null;
|
|
91
93
|
} else if (status.state === "in_review") {
|
|
@@ -95,14 +97,15 @@ function IdentityVerificationCard({
|
|
|
95
97
|
action = /* @__PURE__ */ jsx(Button, { size: "sm", onClick: flow.open, children: l.finish });
|
|
96
98
|
} else {
|
|
97
99
|
const resuming = status.attempts_left > 0 || status.state === "in_progress";
|
|
100
|
+
const detail = status.free ? l.free : resuming ? l.attemptsLeft(status.attempts_left) : l.priceLine(flow.price ?? "", status.attempts_per_fee);
|
|
98
101
|
description = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
99
102
|
l.intro,
|
|
100
103
|
" ",
|
|
101
|
-
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children:
|
|
104
|
+
detail && /* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: detail })
|
|
102
105
|
] });
|
|
103
106
|
action = /* @__PURE__ */ jsxs(Button, { size: "sm", onClick: flow.open, disabled: busy, children: [
|
|
104
107
|
/* @__PURE__ */ jsx(ShieldCheck, { className: "mr-1 h-4 w-4" }),
|
|
105
|
-
resuming ? l.continue : l.verify
|
|
108
|
+
resuming && !status.free ? l.continue : l.verify
|
|
106
109
|
] });
|
|
107
110
|
}
|
|
108
111
|
const card = /* @__PURE__ */ jsxs(SettingsCard, { padding: "sm", "data-testid": "identity-verification-card", children: [
|
|
@@ -162,6 +165,7 @@ function IdentityVerificationDialog({
|
|
|
162
165
|
/* @__PURE__ */ jsx(ExternalLink, { className: "mr-1 h-4 w-4" }),
|
|
163
166
|
l.openInNewTab
|
|
164
167
|
] }),
|
|
168
|
+
status?.free && flow.problem && flow.busy === null && /* @__PURE__ */ jsx(Button, { onClick: flow.retry, "data-testid": "identity-start-retry", children: l.tryAgain }),
|
|
165
169
|
/* @__PURE__ */ jsxs(Button, { variant: "ghost", onClick: flow.checkResult, disabled: flow.busy !== null, children: [
|
|
166
170
|
flow.busy === "refresh" && spinner,
|
|
167
171
|
l.checkResult
|
|
@@ -195,8 +199,8 @@ function IdentityVerificationDialog({
|
|
|
195
199
|
footer = /* @__PURE__ */ jsx(Button, { onClick: flow.close, children: l.close });
|
|
196
200
|
} else {
|
|
197
201
|
const left = status?.attempts_left ?? 0;
|
|
198
|
-
body = /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: l.resultDeclined(left) });
|
|
199
|
-
footer = left > 0 ? /* @__PURE__ */ jsx(Button, { onClick: flow.retry, disabled: flow.busy !== null, children: l.tryAgain }) : /* @__PURE__ */ jsx(Button, { onClick: flow.close, children: l.close });
|
|
202
|
+
body = /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: status?.free ? l.resultDeclinedFree : l.resultDeclined(left) });
|
|
203
|
+
footer = left > 0 || status?.free ? /* @__PURE__ */ jsx(Button, { onClick: flow.retry, disabled: flow.busy !== null, children: l.tryAgain }) : /* @__PURE__ */ jsx(Button, { onClick: flow.close, children: l.close });
|
|
200
204
|
}
|
|
201
205
|
const title = status?.state === "name_mismatch" && flow.step === "result" ? l.nameMismatchTitle : flow.step === "verify" ? l.verifyTitle : l.payTitle;
|
|
202
206
|
return /* @__PURE__ */ jsxs(
|
|
@@ -207,7 +211,7 @@ function IdentityVerificationDialog({
|
|
|
207
211
|
title,
|
|
208
212
|
icon: /* @__PURE__ */ jsx(ShieldCheck, { className: "h-5 w-5" }),
|
|
209
213
|
size: flow.step === "verify" ? "lg" : "md",
|
|
210
|
-
dismissible,
|
|
214
|
+
dismissible: dismissible && !(status?.state === "name_mismatch" && flow.step === "result"),
|
|
211
215
|
testId: "identity-verification-dialog",
|
|
212
216
|
children: [
|
|
213
217
|
/* @__PURE__ */ jsxs(ModalScaffold.Body, { children: [
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/settings/IdentityVerification.tsx"],
|
|
4
|
-
"sourcesContent": ["/**\n * Identity verification blocks: the settings card, the dialog (pay \u2192 verify in Didit's frame \u2192\n * result) and a gate for deployments that require it. All take the `IdentityVerificationFlow` from\n * `@arbidocs/react` (`useIdentityVerification` with a provider, or `useIdentityVerificationFlow`\n * bound to a host's own API), so they work the same inside ARBI and on a customer's site.\n */\nimport { useMemo, type ReactNode } from 'react'\nimport { ExternalLink, Loader2, ShieldCheck } from 'lucide-react'\nimport { Button, VerifiedBadge, type IdentityVerificationFlow } from '@arbidocs/react/ui'\nimport { ModalScaffold } from './ModalScaffold'\nimport { SettingsCard, SettingsDisclosure, SettingsRow } from './SettingsPanel'\n\n/** Every fixed string of the identity verification blocks. */\nexport interface IdentityVerificationLabels {\n title: string\n intro: string\n /** \"\u00A35.00 incl. VAT \u00B7 3 attempts\" (`price` comes formatted, VAT note included). */\n priceLine: (price: string, attempts: number) => string\n proOnly: string\n seePlans: string\n manageBilling: string\n verify: string\n continue: string\n attemptsLeft: (n: number) => string\n verified: string\n verifiedDetail: (country: string) => string\n inReview: string\n finishName: string\n finish: string\n remove: string\n payTitle: string\n payBody: (price: string, attempts: number) => string\n pay: string\n confirmPayment: string\n paymentConfirmed: string\n verifyTitle: string\n embedFailed: string\n openInNewTab: string\n checkResult: string\n resultVerified: string\n resultDeclined: (attemptsLeft: number) => string\n tryAgain: string\n resultInReview: string\n nameMismatchTitle: string\n nameMismatchBody: string\n documentName: string\n accountName: string\n useDocumentName: (name: string) => string\n keepName: string\n close: string\n}\n\nexport const DEFAULT_IDENTITY_VERIFICATION_LABELS: IdentityVerificationLabels = {\n title: 'Identity verification',\n intro: 'Check your ID once to get a verified tick next to your name.',\n priceLine: (price, attempts) => `${price} \u00B7 ${attempts} attempts`,\n proOnly: 'Available on Pro subscriptions.',\n seePlans: 'See subscriptions',\n manageBilling: 'Manage billing',\n verify: 'Verify identity',\n continue: 'Continue',\n attemptsLeft: (n) => `${n} attempt${n === 1 ? '' : 's'} left`,\n verified: 'Verified',\n verifiedDetail: (country) => `ID issued in ${country}`,\n inReview: 'Your check is being reviewed. We\u2019ll update this when it\u2019s done.',\n finishName: 'Your ID was verified. Confirm your name to get the tick.',\n finish: 'Finish',\n remove: 'Remove',\n payTitle: 'Verify your identity',\n payBody: (price, attempts) =>\n `A one-time fee of ${price} is charged to the card on your Pro subscription. It covers up to ${attempts} attempts. Your ID is checked by our provider, Didit; ARBI does not keep your document.`,\n pay: 'Pay and continue',\n confirmPayment: 'Confirm payment with your bank',\n paymentConfirmed: 'I\u2019ve confirmed it',\n verifyTitle: 'Scan your ID',\n embedFailed: 'Your camera isn\u2019t available here. Continue in a new tab, then come back.',\n openInNewTab: 'Open in a new tab',\n checkResult: 'I\u2019ve finished',\n resultVerified: 'You\u2019re verified. The tick now shows next to your name.',\n resultDeclined: (n) =>\n n > 0\n ? `We couldn\u2019t verify your ID. You have ${n} attempt${n === 1 ? '' : 's'} left.`\n : 'We couldn\u2019t verify your ID and no attempts are left.',\n tryAgain: 'Try again',\n resultInReview: 'Your check needs a manual review. We\u2019ll show the result here when it\u2019s done.',\n nameMismatchTitle: 'Your ID was verified',\n nameMismatchBody:\n 'The name on your ID differs from your account name. The tick shows only with the name on your ID.',\n documentName: 'Name on your ID',\n accountName: 'Account name',\n useDocumentName: (name) => `Change my name to ${name}`,\n keepName: 'Keep my name',\n close: 'Close',\n}\n\nfunction useLabels(labels?: Partial<IdentityVerificationLabels>) {\n return useMemo(() => ({ ...DEFAULT_IDENTITY_VERIFICATION_LABELS, ...labels }), [labels])\n}\n\n/** Refusals the user fixes in billing (plan, card, address). */\nconst BILLING_CODES = [\n 'PRO_REQUIRED',\n 'PAYMENT_METHOD_REQUIRED',\n 'BILLING_ADDRESS_REQUIRED',\n 'PAYMENT_DECLINED',\n]\n\nfunction Problem({\n flow,\n onManageBilling,\n label,\n}: {\n flow: IdentityVerificationFlow\n onManageBilling?: () => void\n label: string\n}) {\n if (!flow.problem) return null\n const billing = onManageBilling && BILLING_CODES.includes(flow.problem.code ?? '')\n return (\n <div className=\"flex flex-wrap items-center gap-2\" data-testid=\"identity-problem\">\n <p role=\"alert\" className=\"text-sm text-destructive\">\n {flow.problem.message}\n </p>\n {billing && (\n <Button size=\"sm\" variant=\"outline\" onClick={onManageBilling}>\n {label}\n </Button>\n )}\n </div>\n )\n}\n\n// \u2500\u2500 Card \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\nexport interface IdentityVerificationCardProps {\n /** Secondary account settings start closed; payment and verification remain explicit actions. */\n collapsible?: boolean\n flow: IdentityVerificationFlow\n /** Open the host's plans / billing (upgrade to Pro, fix the card or address). */\n onManageBilling?: () => void\n labels?: Partial<IdentityVerificationLabels>\n}\n\n/** Settings row for the ID check: offer, progress, or the tick. Renders nothing when not offered. */\nexport function IdentityVerificationCard({\n collapsible = false,\n flow,\n onManageBilling,\n labels,\n}: IdentityVerificationCardProps) {\n const l = useLabels(labels)\n const { status } = flow\n if (!status?.enabled) return null\n const busy = flow.busy !== null\n\n let description: ReactNode\n let action: ReactNode = null\n if (status.verified) {\n description = (\n <span className=\"inline-flex items-center gap-1.5\">\n <VerifiedBadge />\n {l.verified}\n {status.document_country && (\n <span className=\"text-muted-foreground\">\n {' \u00B7 '}\n {l.verifiedDetail(status.document_country)}\n </span>\n )}\n </span>\n )\n action = (\n <Button size=\"sm\" variant=\"ghost\" onClick={flow.remove} disabled={busy}>\n {l.remove}\n </Button>\n )\n } else if (!status.eligible) {\n description = `${l.intro} ${l.proOnly}`\n action = onManageBilling ? (\n <Button size=\"sm\" variant=\"outline\" onClick={onManageBilling}>\n {l.seePlans}\n </Button>\n ) : null\n } else if (status.state === 'in_review') {\n description = l.inReview\n } else if (status.state === 'name_mismatch') {\n description = l.finishName\n action = (\n <Button size=\"sm\" onClick={flow.open}>\n {l.finish}\n </Button>\n )\n } else {\n const resuming = status.attempts_left > 0 || status.state === 'in_progress'\n description = (\n <>\n {l.intro}{' '}\n <span className=\"text-muted-foreground\">\n {resuming\n ? l.attemptsLeft(status.attempts_left)\n : l.priceLine(flow.price ?? '', status.attempts_per_fee)}\n </span>\n </>\n )\n action = (\n <Button size=\"sm\" onClick={flow.open} disabled={busy}>\n <ShieldCheck className=\"mr-1 h-4 w-4\" />\n {resuming ? l.continue : l.verify}\n </Button>\n )\n }\n\n const card = (\n <SettingsCard padding=\"sm\" data-testid=\"identity-verification-card\">\n <SettingsRow label={collapsible ? null : l.title} description={description}>\n {action}\n </SettingsRow>\n {!flow.isOpen && (\n <Problem flow={flow} onManageBilling={onManageBilling} label={l.manageBilling} />\n )}\n </SettingsCard>\n )\n return collapsible ? (\n <SettingsDisclosure title={l.title} testId=\"identity-verification-settings\">\n {card}\n </SettingsDisclosure>\n ) : (\n card\n )\n}\n\n// \u2500\u2500 Dialog \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\nexport interface IdentityVerificationDialogProps {\n flow: IdentityVerificationFlow\n /** The account name as shown, compared with the name on the document. */\n accountName: string\n /** Allow closing; false blocks it. Default true. */\n dismissible?: boolean\n /** Open the host's billing to fix a refused payment (plan, card, address). */\n onManageBilling?: () => void\n labels?: Partial<IdentityVerificationLabels>\n}\n\n/** The verification dialog: pay the fee, verify in Didit's embedded frame, then the result. */\nexport function IdentityVerificationDialog({\n flow,\n accountName,\n dismissible = true,\n onManageBilling,\n labels,\n}: IdentityVerificationDialogProps) {\n const l = useLabels(labels)\n const { status } = flow\n const attempts = status?.attempts_per_fee ?? 0\n const docName = [status?.document_given_name, status?.document_family_name]\n .filter(Boolean)\n .join(' ')\n const spinner = <Loader2 className=\"mr-1 h-4 w-4 animate-spin\" />\n\n let body: ReactNode\n let footer: ReactNode = null\n if (flow.step === 'pay') {\n body = flow.paymentUrl ? (\n <a\n href={flow.paymentUrl}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className=\"inline-flex items-center gap-1 text-sm font-medium text-primary hover:underline\"\n >\n {l.confirmPayment}\n <ExternalLink className=\"h-3.5 w-3.5\" />\n </a>\n ) : (\n <p className=\"text-sm text-muted-foreground\">{l.payBody(flow.price ?? '', attempts)}</p>\n )\n footer = flow.paymentUrl ? (\n <Button onClick={flow.recheckPayment} disabled={flow.busy !== null}>\n {flow.busy === 'start' && spinner}\n {l.paymentConfirmed}\n </Button>\n ) : (\n <Button onClick={flow.pay} disabled={flow.busy !== null} data-testid=\"identity-pay\">\n {flow.busy === 'pay' && spinner}\n {l.pay}\n </Button>\n )\n } else if (flow.step === 'verify') {\n body = (\n <div className=\"space-y-3\">\n {flow.embedFailed ? (\n <p className=\"text-sm text-muted-foreground\">{l.embedFailed}</p>\n ) : (\n <div\n id={flow.verifyContainerId}\n ref={flow.verifyContainerRef}\n className=\"h-[560px] w-full overflow-hidden rounded-md bg-muted\"\n data-testid=\"identity-didit-frame\"\n >\n {flow.busy === 'start' && (\n <div className=\"flex h-full items-center justify-center\">\n <Loader2 className=\"h-6 w-6 animate-spin text-muted-foreground\" />\n </div>\n )}\n </div>\n )}\n </div>\n )\n footer = (\n <>\n {flow.embedFailed && (\n <Button variant=\"outline\" onClick={flow.openInNewTab}>\n <ExternalLink className=\"mr-1 h-4 w-4\" />\n {l.openInNewTab}\n </Button>\n )}\n <Button variant=\"ghost\" onClick={flow.checkResult} disabled={flow.busy !== null}>\n {flow.busy === 'refresh' && spinner}\n {l.checkResult}\n </Button>\n </>\n )\n } else if (status?.state === 'name_mismatch') {\n body = (\n <div className=\"space-y-3\" data-testid=\"identity-name-mismatch\">\n <p className=\"text-sm text-muted-foreground\">{l.nameMismatchBody}</p>\n <dl className=\"grid grid-cols-[auto_1fr] gap-x-4 gap-y-1 text-sm\">\n <dt className=\"text-muted-foreground\">{l.documentName}</dt>\n <dd className=\"font-medium\">{docName}</dd>\n <dt className=\"text-muted-foreground\">{l.accountName}</dt>\n <dd>{accountName}</dd>\n </dl>\n </div>\n )\n footer = (\n <>\n <Button variant=\"ghost\" onClick={flow.keepName} disabled={flow.busy !== null}>\n {l.keepName}\n </Button>\n <Button onClick={flow.acceptName} disabled={flow.busy !== null || !docName}>\n {flow.busy === 'accept' && spinner}\n {l.useDocumentName(docName)}\n </Button>\n </>\n )\n } else if (status?.verified) {\n body = (\n <p className=\"flex items-center gap-2 text-sm\">\n <VerifiedBadge className=\"h-4 w-4\" />\n {l.resultVerified}\n </p>\n )\n footer = <Button onClick={flow.close}>{l.close}</Button>\n } else if (status?.state === 'in_review') {\n body = <p className=\"text-sm text-muted-foreground\">{l.resultInReview}</p>\n footer = <Button onClick={flow.close}>{l.close}</Button>\n } else {\n const left = status?.attempts_left ?? 0\n body = <p className=\"text-sm text-muted-foreground\">{l.resultDeclined(left)}</p>\n footer =\n left > 0 ? (\n <Button onClick={flow.retry} disabled={flow.busy !== null}>\n {l.tryAgain}\n </Button>\n ) : (\n <Button onClick={flow.close}>{l.close}</Button>\n )\n }\n\n const title =\n status?.state === 'name_mismatch' && flow.step === 'result'\n ? l.nameMismatchTitle\n : flow.step === 'verify'\n ? l.verifyTitle\n : l.payTitle\n return (\n <ModalScaffold\n open={flow.isOpen}\n onOpenChange={(open) => (open ? flow.open() : flow.close())}\n title={title}\n icon={<ShieldCheck className=\"h-5 w-5\" />}\n size={flow.step === 'verify' ? 'lg' : 'md'}\n dismissible={dismissible}\n testId=\"identity-verification-dialog\"\n >\n <ModalScaffold.Body>\n {body}\n <Problem flow={flow} onManageBilling={onManageBilling} label={l.manageBilling} />\n </ModalScaffold.Body>\n <ModalScaffold.Footer>{footer}</ModalScaffold.Footer>\n </ModalScaffold>\n )\n}\n"],
|
|
5
|
-
"mappings": ";
|
|
4
|
+
"sourcesContent": ["/**\n * Identity verification blocks: the settings card, the dialog (pay \u2192 verify in Didit's frame \u2192\n * result) and a gate for deployments that require it. All take the `IdentityVerificationFlow` from\n * `@arbidocs/react` (`useIdentityVerification` with a provider, or `useIdentityVerificationFlow`\n * bound to a host's own API), so they work the same inside ARBI and on a customer's site.\n */\nimport { useMemo, type ReactNode } from 'react'\nimport { ExternalLink, Loader2, ShieldCheck } from 'lucide-react'\nimport { Button, VerifiedBadge, type IdentityVerificationFlow } from '@arbidocs/react/ui'\nimport { ModalScaffold } from './ModalScaffold'\nimport { SettingsCard, SettingsDisclosure, SettingsRow } from './SettingsPanel'\n\n/** Every fixed string of the identity verification blocks. */\nexport interface IdentityVerificationLabels {\n title: string\n intro: string\n /** \"\u00A35.00 incl. VAT \u00B7 3 attempts\" (`price` comes formatted, VAT note included). */\n priceLine: (price: string, attempts: number) => string\n /** Shown in place of the price where the check is free. */\n free: string\n proOnly: string\n seePlans: string\n manageBilling: string\n verify: string\n continue: string\n attemptsLeft: (n: number) => string\n verified: string\n verifiedDetail: (country: string) => string\n inReview: string\n finishName: string\n finish: string\n remove: string\n payTitle: string\n payBody: (price: string, attempts: number) => string\n pay: string\n confirmPayment: string\n paymentConfirmed: string\n verifyTitle: string\n embedFailed: string\n openInNewTab: string\n checkResult: string\n resultVerified: string\n resultDeclined: (attemptsLeft: number) => string\n /** Declined where the check is free: trying again costs nothing. */\n resultDeclinedFree: string\n tryAgain: string\n resultInReview: string\n nameMismatchTitle: string\n nameMismatchBody: string\n documentName: string\n accountName: string\n useDocumentName: (name: string) => string\n keepName: string\n close: string\n}\n\nexport const DEFAULT_IDENTITY_VERIFICATION_LABELS: IdentityVerificationLabels = {\n title: 'Identity verification',\n intro: 'Check your ID once to get a verified tick next to your name.',\n priceLine: (price, attempts) => `${price} \u00B7 ${attempts} attempts`,\n free: 'Free',\n proOnly: 'Available on Pro subscriptions.',\n seePlans: 'See subscriptions',\n manageBilling: 'Manage billing',\n verify: 'Verify identity',\n continue: 'Continue',\n attemptsLeft: (n) => `${n} attempt${n === 1 ? '' : 's'} left`,\n verified: 'Verified',\n verifiedDetail: (country) => `ID issued in ${country}`,\n inReview: 'Your check is being reviewed. We\u2019ll update this when it\u2019s done.',\n finishName: 'Your ID was verified. Confirm your name to get the tick.',\n finish: 'Finish',\n remove: 'Remove',\n payTitle: 'Verify your identity',\n payBody: (price, attempts) =>\n `A one-time fee of ${price} is charged to the card on your Pro subscription. It covers up to ${attempts} attempts. Your ID is checked by our provider, Didit; ARBI does not keep your document.`,\n pay: 'Pay and continue',\n confirmPayment: 'Confirm payment with your bank',\n paymentConfirmed: 'I\u2019ve confirmed it',\n verifyTitle: 'Scan your ID',\n embedFailed: 'Your camera isn\u2019t available here. Continue in a new tab, then come back.',\n openInNewTab: 'Open in a new tab',\n checkResult: 'I\u2019ve finished',\n resultVerified: 'You\u2019re verified. The tick now shows next to your name.',\n resultDeclined: (n) =>\n n > 0\n ? `We couldn\u2019t verify your ID. You have ${n} attempt${n === 1 ? '' : 's'} left.`\n : 'We couldn\u2019t verify your ID and no attempts are left.',\n resultDeclinedFree: 'We couldn\u2019t verify your ID. You can try again.',\n tryAgain: 'Try again',\n resultInReview: 'Your check needs a manual review. We\u2019ll show the result here when it\u2019s done.',\n nameMismatchTitle: 'Your ID was verified',\n nameMismatchBody:\n 'The name on your ID differs from your account name. Change your name to match your ID to finish, or cancel the verification.',\n documentName: 'Name on your ID',\n accountName: 'Account name',\n useDocumentName: (name) => `Change my name to ${name}`,\n keepName: 'Cancel verification',\n close: 'Close',\n}\n\nfunction useLabels(labels?: Partial<IdentityVerificationLabels>) {\n return useMemo(() => ({ ...DEFAULT_IDENTITY_VERIFICATION_LABELS, ...labels }), [labels])\n}\n\n/** Refusals the user fixes in billing (plan, card, address). */\nconst BILLING_CODES = [\n 'PRO_REQUIRED',\n 'PAYMENT_METHOD_REQUIRED',\n 'BILLING_ADDRESS_REQUIRED',\n 'PAYMENT_DECLINED',\n]\n\nfunction Problem({\n flow,\n onManageBilling,\n label,\n}: {\n flow: IdentityVerificationFlow\n onManageBilling?: () => void\n label: string\n}) {\n if (!flow.problem) return null\n const billing = onManageBilling && BILLING_CODES.includes(flow.problem.code ?? '')\n return (\n <div className=\"flex flex-wrap items-center gap-2\" data-testid=\"identity-problem\">\n <p role=\"alert\" className=\"text-sm text-destructive\">\n {flow.problem.message}\n </p>\n {billing && (\n <Button size=\"sm\" variant=\"outline\" onClick={onManageBilling}>\n {label}\n </Button>\n )}\n </div>\n )\n}\n\n// \u2500\u2500 Card \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\nexport interface IdentityVerificationCardProps {\n /** Secondary account settings start closed; payment and verification remain explicit actions. */\n collapsible?: boolean\n flow: IdentityVerificationFlow\n /** Open the host's plans / billing (upgrade to Pro, fix the card or address). */\n onManageBilling?: () => void\n labels?: Partial<IdentityVerificationLabels>\n}\n\n/** Settings row for the ID check: offer, progress, or the tick. Renders nothing when not offered. */\nexport function IdentityVerificationCard({\n collapsible = false,\n flow,\n onManageBilling,\n labels,\n}: IdentityVerificationCardProps) {\n const l = useLabels(labels)\n const { status } = flow\n if (!status?.enabled) return null\n const busy = flow.busy !== null\n\n let description: ReactNode\n let action: ReactNode = null\n if (status.verified) {\n description = (\n <span className=\"inline-flex items-center gap-1.5\">\n <VerifiedBadge />\n {l.verified}\n {status.document_country && (\n <span className=\"text-muted-foreground\">\n {' \u00B7 '}\n {l.verifiedDetail(status.document_country)}\n </span>\n )}\n </span>\n )\n action = (\n <Button size=\"sm\" variant=\"ghost\" onClick={flow.remove} disabled={busy}>\n {l.remove}\n </Button>\n )\n } else if (!status.eligible && !status.free) {\n description = `${l.intro} ${l.proOnly}`\n action = onManageBilling ? (\n <Button size=\"sm\" variant=\"outline\" onClick={onManageBilling}>\n {l.seePlans}\n </Button>\n ) : null\n } else if (status.state === 'in_review') {\n description = l.inReview\n } else if (status.state === 'name_mismatch') {\n description = l.finishName\n action = (\n <Button size=\"sm\" onClick={flow.open}>\n {l.finish}\n </Button>\n )\n } else {\n const resuming = status.attempts_left > 0 || status.state === 'in_progress'\n // Where the check is free there is no fee and no attempt count to show.\n const detail = status.free\n ? l.free\n : resuming\n ? l.attemptsLeft(status.attempts_left)\n : l.priceLine(flow.price ?? '', status.attempts_per_fee)\n description = (\n <>\n {l.intro} {detail && <span className=\"text-muted-foreground\">{detail}</span>}\n </>\n )\n action = (\n <Button size=\"sm\" onClick={flow.open} disabled={busy}>\n <ShieldCheck className=\"mr-1 h-4 w-4\" />\n {resuming && !status.free ? l.continue : l.verify}\n </Button>\n )\n }\n\n const card = (\n <SettingsCard padding=\"sm\" data-testid=\"identity-verification-card\">\n <SettingsRow label={collapsible ? null : l.title} description={description}>\n {action}\n </SettingsRow>\n {!flow.isOpen && (\n <Problem flow={flow} onManageBilling={onManageBilling} label={l.manageBilling} />\n )}\n </SettingsCard>\n )\n return collapsible ? (\n <SettingsDisclosure title={l.title} testId=\"identity-verification-settings\">\n {card}\n </SettingsDisclosure>\n ) : (\n card\n )\n}\n\n// \u2500\u2500 Dialog \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\nexport interface IdentityVerificationDialogProps {\n flow: IdentityVerificationFlow\n /** The account name as shown, compared with the name on the document. */\n accountName: string\n /** Allow closing; false blocks it. Default true. */\n dismissible?: boolean\n /** Open the host's billing to fix a refused payment (plan, card, address). */\n onManageBilling?: () => void\n labels?: Partial<IdentityVerificationLabels>\n}\n\n/** The verification dialog: pay the fee, verify in Didit's embedded frame, then the result. */\nexport function IdentityVerificationDialog({\n flow,\n accountName,\n dismissible = true,\n onManageBilling,\n labels,\n}: IdentityVerificationDialogProps) {\n const l = useLabels(labels)\n const { status } = flow\n const attempts = status?.attempts_per_fee ?? 0\n const docName = [status?.document_given_name, status?.document_family_name]\n .filter(Boolean)\n .join(' ')\n const spinner = <Loader2 className=\"mr-1 h-4 w-4 animate-spin\" />\n\n let body: ReactNode\n let footer: ReactNode = null\n if (flow.step === 'pay') {\n body = flow.paymentUrl ? (\n <a\n href={flow.paymentUrl}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className=\"inline-flex items-center gap-1 text-sm font-medium text-primary hover:underline\"\n >\n {l.confirmPayment}\n <ExternalLink className=\"h-3.5 w-3.5\" />\n </a>\n ) : (\n <p className=\"text-sm text-muted-foreground\">{l.payBody(flow.price ?? '', attempts)}</p>\n )\n footer = flow.paymentUrl ? (\n <Button onClick={flow.recheckPayment} disabled={flow.busy !== null}>\n {flow.busy === 'start' && spinner}\n {l.paymentConfirmed}\n </Button>\n ) : (\n <Button onClick={flow.pay} disabled={flow.busy !== null} data-testid=\"identity-pay\">\n {flow.busy === 'pay' && spinner}\n {l.pay}\n </Button>\n )\n } else if (flow.step === 'verify') {\n body = (\n <div className=\"space-y-3\">\n {flow.embedFailed ? (\n <p className=\"text-sm text-muted-foreground\">{l.embedFailed}</p>\n ) : (\n <div\n id={flow.verifyContainerId}\n ref={flow.verifyContainerRef}\n className=\"h-[560px] w-full overflow-hidden rounded-md bg-muted\"\n data-testid=\"identity-didit-frame\"\n >\n {flow.busy === 'start' && (\n <div className=\"flex h-full items-center justify-center\">\n <Loader2 className=\"h-6 w-6 animate-spin text-muted-foreground\" />\n </div>\n )}\n </div>\n )}\n </div>\n )\n footer = (\n <>\n {flow.embedFailed && (\n <Button variant=\"outline\" onClick={flow.openInNewTab}>\n <ExternalLink className=\"mr-1 h-4 w-4\" />\n {l.openInNewTab}\n </Button>\n )}\n {status?.free && flow.problem && flow.busy === null && (\n <Button onClick={flow.retry} data-testid=\"identity-start-retry\">\n {l.tryAgain}\n </Button>\n )}\n <Button variant=\"ghost\" onClick={flow.checkResult} disabled={flow.busy !== null}>\n {flow.busy === 'refresh' && spinner}\n {l.checkResult}\n </Button>\n </>\n )\n } else if (status?.state === 'name_mismatch') {\n body = (\n <div className=\"space-y-3\" data-testid=\"identity-name-mismatch\">\n <p className=\"text-sm text-muted-foreground\">{l.nameMismatchBody}</p>\n <dl className=\"grid grid-cols-[auto_1fr] gap-x-4 gap-y-1 text-sm\">\n <dt className=\"text-muted-foreground\">{l.documentName}</dt>\n <dd className=\"font-medium\">{docName}</dd>\n <dt className=\"text-muted-foreground\">{l.accountName}</dt>\n <dd>{accountName}</dd>\n </dl>\n </div>\n )\n footer = (\n <>\n <Button variant=\"ghost\" onClick={flow.keepName} disabled={flow.busy !== null}>\n {l.keepName}\n </Button>\n <Button onClick={flow.acceptName} disabled={flow.busy !== null || !docName}>\n {flow.busy === 'accept' && spinner}\n {l.useDocumentName(docName)}\n </Button>\n </>\n )\n } else if (status?.verified) {\n body = (\n <p className=\"flex items-center gap-2 text-sm\">\n <VerifiedBadge className=\"h-4 w-4\" />\n {l.resultVerified}\n </p>\n )\n footer = <Button onClick={flow.close}>{l.close}</Button>\n } else if (status?.state === 'in_review') {\n body = <p className=\"text-sm text-muted-foreground\">{l.resultInReview}</p>\n footer = <Button onClick={flow.close}>{l.close}</Button>\n } else {\n const left = status?.attempts_left ?? 0\n body = (\n <p className=\"text-sm text-muted-foreground\">\n {status?.free ? l.resultDeclinedFree : l.resultDeclined(left)}\n </p>\n )\n footer =\n left > 0 || status?.free ? (\n <Button onClick={flow.retry} disabled={flow.busy !== null}>\n {l.tryAgain}\n </Button>\n ) : (\n <Button onClick={flow.close}>{l.close}</Button>\n )\n }\n\n const title =\n status?.state === 'name_mismatch' && flow.step === 'result'\n ? l.nameMismatchTitle\n : flow.step === 'verify'\n ? l.verifyTitle\n : l.payTitle\n return (\n <ModalScaffold\n open={flow.isOpen}\n onOpenChange={(open) => (open ? flow.open() : flow.close())}\n title={title}\n icon={<ShieldCheck className=\"h-5 w-5\" />}\n size={flow.step === 'verify' ? 'lg' : 'md'}\n // A name that differs from the ID must be changed or the verification cancelled: no closing it half done.\n dismissible={dismissible && !(status?.state === 'name_mismatch' && flow.step === 'result')}\n testId=\"identity-verification-dialog\"\n >\n <ModalScaffold.Body>\n {body}\n <Problem flow={flow} onManageBilling={onManageBilling} label={l.manageBilling} />\n </ModalScaffold.Body>\n <ModalScaffold.Footer>{footer}</ModalScaffold.Footer>\n </ModalScaffold>\n )\n}\n"],
|
|
5
|
+
"mappings": ";AA6HI,SAiFE,UAhFA,KADF;AAvHJ,SAAS,eAA+B;AACxC,SAAS,cAAc,SAAS,mBAAmB;AACnD,SAAS,QAAQ,qBAAoD;AACrE,SAAS,qBAAqB;AAC9B,SAAS,cAAc,oBAAoB,mBAAmB;AA8CvD,MAAM,uCAAmE;AAAA,EAC9E,OAAO;AAAA,EACP,OAAO;AAAA,EACP,WAAW,CAAC,OAAO,aAAa,GAAG,KAAK,SAAM,QAAQ;AAAA,EACtD,MAAM;AAAA,EACN,SAAS;AAAA,EACT,UAAU;AAAA,EACV,eAAe;AAAA,EACf,QAAQ;AAAA,EACR,UAAU;AAAA,EACV,cAAc,CAAC,MAAM,GAAG,CAAC,WAAW,MAAM,IAAI,KAAK,GAAG;AAAA,EACtD,UAAU;AAAA,EACV,gBAAgB,CAAC,YAAY,gBAAgB,OAAO;AAAA,EACpD,UAAU;AAAA,EACV,YAAY;AAAA,EACZ,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,UAAU;AAAA,EACV,SAAS,CAAC,OAAO,aACf,qBAAqB,KAAK,qEAAqE,QAAQ;AAAA,EACzG,KAAK;AAAA,EACL,gBAAgB;AAAA,EAChB,kBAAkB;AAAA,EAClB,aAAa;AAAA,EACb,aAAa;AAAA,EACb,cAAc;AAAA,EACd,aAAa;AAAA,EACb,gBAAgB;AAAA,EAChB,gBAAgB,CAAC,MACf,IAAI,IACA,6CAAwC,CAAC,WAAW,MAAM,IAAI,KAAK,GAAG,WACtE;AAAA,EACN,oBAAoB;AAAA,EACpB,UAAU;AAAA,EACV,gBAAgB;AAAA,EAChB,mBAAmB;AAAA,EACnB,kBACE;AAAA,EACF,cAAc;AAAA,EACd,aA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AiC,YAAE,gBAAe;AACtE,aAAS,oBAAC,UAAO,SAAS,KAAK,OAAQ,YAAE,OAAM;AAAA,EACjD,OAAO;AACL,UAAM,OAAO,QAAQ,iBAAiB;AACtC,WACE,oBAAC,OAAE,WAAU,iCACV,kBAAQ,OAAO,EAAE,qBAAqB,EAAE,eAAe,IAAI,GAC9D;AAEF,aACE,OAAO,KAAK,QAAQ,OAClB,oBAAC,UAAO,SAAS,KAAK,OAAO,UAAU,KAAK,SAAS,MAClD,YAAE,UACL,IAEA,oBAAC,UAAO,SAAS,KAAK,OAAQ,YAAE,OAAM;AAAA,EAE5C;AAEA,QAAM,QACJ,QAAQ,UAAU,mBAAmB,KAAK,SAAS,WAC/C,EAAE,oBACF,KAAK,SAAS,WACZ,EAAE,cACF,EAAE;AACV,SACE;AAAA,IAAC;AAAA;AAAA,MACC,MAAM,KAAK;AAAA,MACX,cAAc,CAAC,SAAU,OAAO,KAAK,KAAK,IAAI,KAAK,MAAM;AAAA,MACzD;AAAA,MACA,MAAM,oBAAC,eAAY,WAAU,WAAU;AAAA,MACvC,MAAM,KAAK,SAAS,WAAW,OAAO;AAAA,MAEtC,aAAa,eAAe,EAAE,QAAQ,UAAU,mBAAmB,KAAK,SAAS;AAAA,MACjF,QAAO;AAAA,MAEP;AAAA,6BAAC,cAAc,MAAd,EACE;AAAA;AAAA,UACD,oBAAC,WAAQ,MAAY,iBAAkC,OAAO,EAAE,eAAe;AAAA,WACjF;AAAA,QACA,oBAAC,cAAc,QAAd,EAAsB,kBAAO;AAAA;AAAA;AAAA,EAChC;AAEJ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -83,6 +83,7 @@ function ModalScaffold({
|
|
|
83
83
|
presentation: presentation ?? (size === "lg" || size === "xl" ? "sheet" : "center"),
|
|
84
84
|
className: cn(SIZE_CLASS[size], "flex flex-col gap-0 overflow-hidden p-0", className),
|
|
85
85
|
"data-testid": testId,
|
|
86
|
+
hideCloseButton: !dismissible,
|
|
86
87
|
onInteractOutside: (e) => {
|
|
87
88
|
if (role === "alertdialog" || !dismissible) e.preventDefault();
|
|
88
89
|
onInteractOutside?.(e);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/settings/ModalScaffold.tsx"],
|
|
4
|
-
"sourcesContent": ["import type { ComponentProps, ReactNode, RefObject } from 'react'\nimport {\n cn,\n Dialog,\n DialogContent,\n DialogDescription,\n DialogFooter,\n DialogHeader,\n DialogTitle,\n type DialogPresentation,\n} from '@arbidocs/react/ui'\nimport { useRestoreFocus } from '../lib/useRestoreFocus'\n\n/** Tailwind classes for a modal section heading (also usable on a `Label`). */\nexport const MODAL_SECTION_TITLE_CLASS =\n 'mb-2 flex items-center gap-1 text-sm font-medium text-muted-foreground'\n\n/** Header of a hand-assembled modal: no tinted band, just space. */\nexport function ModalHeader({ className, ...props }: ComponentProps<typeof DialogHeader>) {\n return (\n <DialogHeader\n data-slot=\"modal-header\"\n className={cn('flex-shrink-0 rounded-t-lg bg-transparent p-6 pb-3 pr-12', className)}\n {...props}\n />\n )\n}\n\n/** A padded group inside a modal body. */\nexport function ModalSection({ className, ...props }: ComponentProps<'div'>) {\n return <div data-slot=\"modal-section\" className={cn('pt-4', className)} {...props} />\n}\n\n/** Muted label above the content of a {@link ModalSection}. */\nexport function ModalSectionTitle({ className, ...props }: ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"modal-section-title\"\n className={cn(MODAL_SECTION_TITLE_CLASS, className)}\n {...props}\n />\n )\n}\n\nexport type ModalSize = 'sm' | 'md' | 'lg' | 'xl'\n\nconst SIZE_CLASS: Record<ModalSize, string> = {\n sm: 'sm:max-w-sm',\n md: 'sm:max-w-md',\n lg: 'sm:max-w-2xl',\n xl: 'sm:max-w-4xl',\n}\n\nexport interface ModalScaffoldProps {\n open: boolean\n onOpenChange: (open: boolean) => void\n title: ReactNode\n /** Accessible description; visually hidden unless `showDescription`. */\n description?: ReactNode\n showDescription?: boolean\n /** Retain the accessible title without a visible header block. */\n hideHeader?: boolean\n /** Icon shown before the title. */\n icon?: ReactNode\n size?: ModalSize\n /** Phone presentation; defaults to a bottom sheet for `lg`/`xl`, a centred box otherwise. */\n presentation?: DialogPresentation\n className?: string\n testId?: string\n /**\n * `alertdialog` for a destructive or blocking confirmation: announced as an alert, dismissed\n * only through its own buttons or Escape (not by clicking outside).\n */\n role?: 'dialog' | 'alertdialog'\n /**\n * Block dismissal by outside click AND Escape; only the dialog's own buttons close it. For a\n * dialog that shows a secret once (a new API key). Default false. An `alertdialog` already\n * ignores outside clicks.\n */\n dismissible?: boolean\n /** Called on a pointer/focus interaction outside; `preventDefault()` keeps the dialog open. */\n onInteractOutside?: (event: Event) => void\n /** Called on Escape; `preventDefault()` keeps the dialog open. */\n onEscapeKeyDown?: (event: KeyboardEvent) => void\n /** Element that receives focus when the dialog opens (an alert dialog focuses its safe action). */\n initialFocusRef?: RefObject<HTMLElement | null>\n children?: ReactNode\n}\n\nfunction ModalBody({ className, ...props }: ComponentProps<'div'>) {\n return <div data-slot=\"modal-body\" className={cn('space-y-4', className)} {...props} />\n}\n\n/**\n * Action row. Stacked full-width on phones (primary action on top), right-aligned on wider\n * screens. Sticks to the bottom of the scrolling dialog body so the actions stay reachable.\n */\nfunction ModalFooter({ className, ...props }: ComponentProps<typeof DialogFooter>) {\n return (\n <DialogFooter\n data-slot=\"modal-footer\"\n className={cn(\n 'sticky bottom-0 -mx-6 -mb-6 mt-4 border-t border-border bg-background px-6 py-3',\n className\n )}\n {...props}\n />\n )\n}\n\n/**\n * Standard dialog: icon + title + description header, then the compound\n * `ModalScaffold.Body` / `ModalScaffold.Footer` slots.\n */\nexport function ModalScaffold({\n open,\n onOpenChange,\n title,\n description,\n showDescription = false,\n hideHeader = false,\n icon,\n size = 'md',\n presentation,\n className,\n testId,\n role = 'dialog',\n initialFocusRef,\n dismissible = true,\n onInteractOutside,\n onEscapeKeyDown,\n children,\n}: ModalScaffoldProps) {\n const restoreFocus = useRestoreFocus()\n return (\n <Dialog open={open} onOpenChange={onOpenChange}>\n <DialogContent\n role={role}\n presentation={presentation ?? (size === 'lg' || size === 'xl' ? 'sheet' : 'center')}\n className={cn(SIZE_CLASS[size], 'flex flex-col gap-0 overflow-hidden p-0', className)}\n data-testid={testId}\n onInteractOutside={(e) => {\n if (role === 'alertdialog' || !dismissible) e.preventDefault()\n onInteractOutside?.(e)\n }}\n onEscapeKeyDown={(e) => {\n if (!dismissible) e.preventDefault()\n onEscapeKeyDown?.(e)\n }}\n onOpenAutoFocus={(e) => {\n restoreFocus.onOpenAutoFocus(e)\n if (initialFocusRef?.current) {\n e.preventDefault()\n initialFocusRef.current.focus()\n }\n }}\n onCloseAutoFocus={restoreFocus.onCloseAutoFocus}\n >\n <ModalHeader className={hideHeader ? 'sr-only !p-0' : undefined}>\n <DialogTitle className=\"flex items-center gap-2\">\n {icon}\n {title}\n </DialogTitle>\n <DialogDescription className={showDescription ? undefined : 'sr-only'}>\n {description ?? title}\n </DialogDescription>\n </ModalHeader>\n <div\n data-slot=\"modal-scroll\"\n className=\"min-h-0 flex-1 space-y-4 overflow-y-auto overscroll-contain px-6 pb-6\"\n >\n {children}\n </div>\n </DialogContent>\n </Dialog>\n )\n}\n\nModalScaffold.Body = ModalBody\nModalScaffold.Footer = ModalFooter\n"],
|
|
5
|
-
"mappings": ";AAoBI,
|
|
4
|
+
"sourcesContent": ["import type { ComponentProps, ReactNode, RefObject } from 'react'\nimport {\n cn,\n Dialog,\n DialogContent,\n DialogDescription,\n DialogFooter,\n DialogHeader,\n DialogTitle,\n type DialogPresentation,\n} from '@arbidocs/react/ui'\nimport { useRestoreFocus } from '../lib/useRestoreFocus'\n\n/** Tailwind classes for a modal section heading (also usable on a `Label`). */\nexport const MODAL_SECTION_TITLE_CLASS =\n 'mb-2 flex items-center gap-1 text-sm font-medium text-muted-foreground'\n\n/** Header of a hand-assembled modal: no tinted band, just space. */\nexport function ModalHeader({ className, ...props }: ComponentProps<typeof DialogHeader>) {\n return (\n <DialogHeader\n data-slot=\"modal-header\"\n className={cn('flex-shrink-0 rounded-t-lg bg-transparent p-6 pb-3 pr-12', className)}\n {...props}\n />\n )\n}\n\n/** A padded group inside a modal body. */\nexport function ModalSection({ className, ...props }: ComponentProps<'div'>) {\n return <div data-slot=\"modal-section\" className={cn('pt-4', className)} {...props} />\n}\n\n/** Muted label above the content of a {@link ModalSection}. */\nexport function ModalSectionTitle({ className, ...props }: ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"modal-section-title\"\n className={cn(MODAL_SECTION_TITLE_CLASS, className)}\n {...props}\n />\n )\n}\n\nexport type ModalSize = 'sm' | 'md' | 'lg' | 'xl'\n\nconst SIZE_CLASS: Record<ModalSize, string> = {\n sm: 'sm:max-w-sm',\n md: 'sm:max-w-md',\n lg: 'sm:max-w-2xl',\n xl: 'sm:max-w-4xl',\n}\n\nexport interface ModalScaffoldProps {\n open: boolean\n onOpenChange: (open: boolean) => void\n title: ReactNode\n /** Accessible description; visually hidden unless `showDescription`. */\n description?: ReactNode\n showDescription?: boolean\n /** Retain the accessible title without a visible header block. */\n hideHeader?: boolean\n /** Icon shown before the title. */\n icon?: ReactNode\n size?: ModalSize\n /** Phone presentation; defaults to a bottom sheet for `lg`/`xl`, a centred box otherwise. */\n presentation?: DialogPresentation\n className?: string\n testId?: string\n /**\n * `alertdialog` for a destructive or blocking confirmation: announced as an alert, dismissed\n * only through its own buttons or Escape (not by clicking outside).\n */\n role?: 'dialog' | 'alertdialog'\n /**\n * Block dismissal by outside click AND Escape; only the dialog's own buttons close it. For a\n * dialog that shows a secret once (a new API key). Default false. An `alertdialog` already\n * ignores outside clicks.\n */\n dismissible?: boolean\n /** Called on a pointer/focus interaction outside; `preventDefault()` keeps the dialog open. */\n onInteractOutside?: (event: Event) => void\n /** Called on Escape; `preventDefault()` keeps the dialog open. */\n onEscapeKeyDown?: (event: KeyboardEvent) => void\n /** Element that receives focus when the dialog opens (an alert dialog focuses its safe action). */\n initialFocusRef?: RefObject<HTMLElement | null>\n children?: ReactNode\n}\n\nfunction ModalBody({ className, ...props }: ComponentProps<'div'>) {\n return <div data-slot=\"modal-body\" className={cn('space-y-4', className)} {...props} />\n}\n\n/**\n * Action row. Stacked full-width on phones (primary action on top), right-aligned on wider\n * screens. Sticks to the bottom of the scrolling dialog body so the actions stay reachable.\n */\nfunction ModalFooter({ className, ...props }: ComponentProps<typeof DialogFooter>) {\n return (\n <DialogFooter\n data-slot=\"modal-footer\"\n className={cn(\n 'sticky bottom-0 -mx-6 -mb-6 mt-4 border-t border-border bg-background px-6 py-3',\n className\n )}\n {...props}\n />\n )\n}\n\n/**\n * Standard dialog: icon + title + description header, then the compound\n * `ModalScaffold.Body` / `ModalScaffold.Footer` slots.\n */\nexport function ModalScaffold({\n open,\n onOpenChange,\n title,\n description,\n showDescription = false,\n hideHeader = false,\n icon,\n size = 'md',\n presentation,\n className,\n testId,\n role = 'dialog',\n initialFocusRef,\n dismissible = true,\n onInteractOutside,\n onEscapeKeyDown,\n children,\n}: ModalScaffoldProps) {\n const restoreFocus = useRestoreFocus()\n return (\n <Dialog open={open} onOpenChange={onOpenChange}>\n <DialogContent\n role={role}\n presentation={presentation ?? (size === 'lg' || size === 'xl' ? 'sheet' : 'center')}\n className={cn(SIZE_CLASS[size], 'flex flex-col gap-0 overflow-hidden p-0', className)}\n data-testid={testId}\n // A dialog that cannot be dismissed has no close button either, or it would be the way out.\n hideCloseButton={!dismissible}\n onInteractOutside={(e) => {\n if (role === 'alertdialog' || !dismissible) e.preventDefault()\n onInteractOutside?.(e)\n }}\n onEscapeKeyDown={(e) => {\n if (!dismissible) e.preventDefault()\n onEscapeKeyDown?.(e)\n }}\n onOpenAutoFocus={(e) => {\n restoreFocus.onOpenAutoFocus(e)\n if (initialFocusRef?.current) {\n e.preventDefault()\n initialFocusRef.current.focus()\n }\n }}\n onCloseAutoFocus={restoreFocus.onCloseAutoFocus}\n >\n <ModalHeader className={hideHeader ? 'sr-only !p-0' : undefined}>\n <DialogTitle className=\"flex items-center gap-2\">\n {icon}\n {title}\n </DialogTitle>\n <DialogDescription className={showDescription ? undefined : 'sr-only'}>\n {description ?? title}\n </DialogDescription>\n </ModalHeader>\n <div\n data-slot=\"modal-scroll\"\n className=\"min-h-0 flex-1 space-y-4 overflow-y-auto overscroll-contain px-6 pb-6\"\n >\n {children}\n </div>\n </DialogContent>\n </Dialog>\n )\n}\n\nModalScaffold.Body = ModalBody\nModalScaffold.Footer = ModalFooter\n"],
|
|
5
|
+
"mappings": ";AAoBI,cA6IM,YA7IN;AAnBJ;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAEK;AACP,SAAS,uBAAuB;AAGzB,MAAM,4BACX;AAGK,SAAS,YAAY,EAAE,WAAW,GAAG,MAAM,GAAwC;AACxF,SACE;AAAA,IAAC;AAAA;AAAA,MACC,aAAU;AAAA,MACV,WAAW,GAAG,4DAA4D,SAAS;AAAA,MAClF,GAAG;AAAA;AAAA,EACN;AAEJ;AAGO,SAAS,aAAa,EAAE,WAAW,GAAG,MAAM,GAA0B;AAC3E,SAAO,oBAAC,SAAI,aAAU,iBAAgB,WAAW,GAAG,QAAQ,SAAS,GAAI,GAAG,OAAO;AACrF;AAGO,SAAS,kBAAkB,EAAE,WAAW,GAAG,MAAM,GAA0B;AAChF,SACE;AAAA,IAAC;AAAA;AAAA,MACC,aAAU;AAAA,MACV,WAAW,GAAG,2BAA2B,SAAS;AAAA,MACjD,GAAG;AAAA;AAAA,EACN;AAEJ;AAIA,MAAM,aAAwC;AAAA,EAC5C,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AACN;AAsCA,SAAS,UAAU,EAAE,WAAW,GAAG,MAAM,GAA0B;AACjE,SAAO,oBAAC,SAAI,aAAU,cAAa,WAAW,GAAG,aAAa,SAAS,GAAI,GAAG,OAAO;AACvF;AAMA,SAAS,YA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