uigraph 1.0.0 → 1.0.1
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/bin.mjs +134 -56911
- package/dist/viewer/assets/abnfDiagram-VCTEODGH-D7zWJuPJ.js +1 -0
- package/dist/viewer/assets/actor-avatar-Bu-mKKXB.js +1 -0
- package/dist/viewer/assets/{api-adapters-CnQpLiWI.js → api-adapters-tfr51BsS.js} +1 -1
- package/dist/viewer/assets/{api-endpoints-DCA5GNpC.js → api-endpoints-D-Whnnwd.js} +9 -9
- package/dist/viewer/assets/{api-group-endpoints-page-Di42W69y.js → api-group-endpoints-page-B9R1EI4i.js} +9 -9
- package/dist/viewer/assets/{arc-Cn8owoDw.js → arc-DauzQXFu.js} +1 -1
- package/dist/viewer/assets/architectureDiagram-5GKGNRK7-CXzgHd-c.js +36 -0
- package/dist/viewer/assets/{arrow-left-DWcMgM2U.js → arrow-left-DpQqmf17.js} +1 -1
- package/dist/viewer/assets/avatar-DAFUyk1i.js +43 -0
- package/dist/viewer/assets/badge-hR3QvPWv.js +1 -0
- package/dist/viewer/assets/better-delete-confirmation-modal-CGEQ5O4X.js +1 -0
- package/dist/viewer/assets/better-dialog-DcIxFWwk.js +1 -0
- package/dist/viewer/assets/{blockDiagram-I7D4REHJ-CbYzOsL_.js → blockDiagram-I7D4REHJ-CFHWUw4z.js} +2 -2
- package/dist/viewer/assets/{brands-Bd4RklRx.js → brands-DtmA1AhP.js} +1 -1
- package/dist/viewer/assets/button-DZj74qS7.js +1 -0
- package/dist/viewer/assets/{c4Diagram-7LVT6UL2-CLkVbphC.js → c4Diagram-7LVT6UL2-BHSggPKI.js} +6 -6
- package/dist/viewer/assets/{calendar-C0xdI_ag.js → calendar-Bolgc8E5.js} +1 -1
- package/dist/viewer/assets/channel-CNRSofFP.js +1 -0
- package/dist/viewer/assets/{check-XjanpAFg.js → check-BpmCQNbj.js} +1 -1
- package/dist/viewer/assets/checkbox-CFJfXL6R.js +1 -0
- package/dist/viewer/assets/{chevron-down-R7pQzyLD.js → chevron-down-DDsUE_xz.js} +1 -1
- package/dist/viewer/assets/{chevron-up-CRPypfOs.js → chevron-up-DVznKMGv.js} +1 -1
- package/dist/viewer/assets/{chunk-2Q5K7J3B-CcvtugCu.js → chunk-2Q5K7J3B-CNfz5YDQ.js} +1 -1
- package/dist/viewer/assets/{chunk-5VM5RSS4-CpZHHr12.js → chunk-5VM5RSS4-CwIhjvMe.js} +1 -1
- package/dist/viewer/assets/{chunk-F27PBJKO-DeAl4iOc.js → chunk-F27PBJKO-YFexFJof.js} +1 -1
- package/dist/viewer/assets/{chunk-IMKFNOWR-BfrPe7pS.js → chunk-IMKFNOWR-GY2yrvuo.js} +1 -1
- package/dist/viewer/assets/{chunk-JWPE2WC7-DDjyvUmZ.js → chunk-JWPE2WC7-xd0JGvne.js} +1 -1
- package/dist/viewer/assets/chunk-OB3PAWPO-DJIP1M4r.js +12 -0
- package/dist/viewer/assets/{chunk-POPQ4Y6H-DkDb0mzz.js → chunk-POPQ4Y6H-Bh6rizEy.js} +1 -1
- package/dist/viewer/assets/{chunk-SVP7TREG-D-K2XIGs.js → chunk-SVP7TREG-DtNrjvpq.js} +1 -1
- package/dist/viewer/assets/{chunk-TICWLB2K-DWMQQx6z.js → chunk-TICWLB2K-DrERwtw8.js} +1 -1
- package/dist/viewer/assets/{chunk-XXDRQBXY-DfkljAyM.js → chunk-XXDRQBXY-fYo04iwY.js} +1 -1
- package/dist/viewer/assets/{circle-alert-pm13M-Ef.js → circle-alert-Bl7DXYD_.js} +1 -1
- package/dist/viewer/assets/classDiagram-ZZMXUADV-D7PO-ME9.js +1 -0
- package/dist/viewer/assets/classDiagram-v2-VYDZK3BY-D7PO-ME9.js +1 -0
- package/dist/viewer/assets/color-input-ClkkG_kZ.js +11 -0
- package/dist/viewer/assets/{common-Y7ySZBdh.js → common-DLCsGQ-t.js} +1 -1
- package/dist/viewer/assets/{component-icons-D1BDAuEt.js → component-icons-MJ61E9nt.js} +2 -2
- package/dist/viewer/assets/{copy-CN4K2f_R.js → copy-DMJJonQF.js} +1 -1
- package/dist/viewer/assets/cose-bilkent-JH36ORCC-Dplz8nVT.js +1 -0
- package/dist/viewer/assets/cross-button-D5qst1tj.js +1 -0
- package/dist/viewer/assets/{cynefin-OW5HDTMX-yz-uw9Kz.js → cynefin-OW5HDTMX-DiBs4CI8.js} +1 -1
- package/dist/viewer/assets/cynefinDiagram-5FMLGOSQ-COXS8-dI.js +62 -0
- package/dist/viewer/assets/{dagre-GXQ25YYZ-zjZDwXOe.js → dagre-GXQ25YYZ-K8qvfG8D.js} +2 -2
- package/dist/viewer/assets/dashboard-diagrams-page-Cb0xNr4W.js +2 -0
- package/dist/viewer/assets/dashboard-diagrams-page-inner-CD--zr5q.js +1 -0
- package/dist/viewer/assets/dashboard-docs-page-BfWR9Ai9.js +2 -0
- package/dist/viewer/assets/dashboard-docs-page-inner-BLbX-YwF.js +67 -0
- package/dist/viewer/assets/dashboard-layout-sTeeHNsZ.js +1 -0
- package/dist/viewer/assets/dashboard-lens-layout-D-tu_4kn.js +1 -0
- package/dist/viewer/assets/dashboard-map-frame-page-7pDmbTSe.js +1 -0
- package/dist/viewer/assets/dashboard-plans-page-CfwOZ34A.js +1 -0
- package/dist/viewer/assets/dashboard-service-apis-k93fjW51.js +1 -0
- package/dist/viewer/assets/{dashboard-service-diagrams-CIjk95Jk.js → dashboard-service-diagrams-BIWUxX-Y.js} +3 -3
- package/dist/viewer/assets/dashboard-service-docs-CnniTD6Q.js +1 -0
- package/dist/viewer/assets/{dashboard-service-overview-CzePVPjl.js → dashboard-service-overview-CGBu4omY.js} +5 -5
- package/dist/viewer/assets/dashboard-services-DEscIO2O.js +1 -0
- package/dist/viewer/assets/{db-type-badge-DOgu1Pyc.js → db-type-badge-UbPgpwQf.js} +2 -2
- package/dist/viewer/assets/debounce-Cp8eREM4-D7o-Pzb-.js +2 -0
- package/dist/viewer/assets/{dependencies-CYdEztHw.js → dependencies-DK2GDlhQ.js} +1 -1
- package/dist/viewer/assets/{dependency-graph-DbyfN-rC.js → dependency-graph-xBEnCS0J.js} +3 -3
- package/dist/viewer/assets/{diagram-S7CK7UJ4-q-NHkUCx.js → diagram-S7CK7UJ4-D-liadVe.js} +2 -2
- package/dist/viewer/assets/diagram-UQ7AKVKN-CnA8mgXp.js +41 -0
- package/dist/viewer/assets/{diagram-VSXAHHWV-DZc1kHGx.js → diagram-VSXAHHWV-Ck7dgRFR.js} +2 -2
- package/dist/viewer/assets/diagram-VX7I27RA-Cm1LHbu3.js +24 -0
- package/dist/viewer/assets/diagram-Z3DM3KII-DV3yBUCB.js +24 -0
- package/dist/viewer/assets/diagram-live-preview-DzJ7Nxp1.js +2 -0
- package/dist/viewer/assets/{diagram-portal-page-CWxuok9E.js → diagram-portal-page-gguGLULH.js} +24 -24
- package/dist/viewer/assets/{diagrams-C1xkRPqT.js → diagrams-BqBSv2eb.js} +4 -4
- package/dist/viewer/assets/dialog-D7wzTt0L.js +6 -0
- package/dist/viewer/assets/{doc-file-content-B06roi8L.js → doc-file-content-Be0au9Vo.js} +4 -4
- package/dist/viewer/assets/{download-CLdCXVsO.js → download-DhyZ3g4F.js} +1 -1
- package/dist/viewer/assets/ebnfDiagram-PWID7BFC-BXbHVQvG.js +1 -0
- package/dist/viewer/assets/{editor-vqK4qAnB.js → editor-F9o4zoeB.js} +2 -2
- package/dist/viewer/assets/{erDiagram-RLTQ6QDP-BWuA-aqV.js → erDiagram-RLTQ6QDP-DMfiWput.js} +2 -2
- package/dist/viewer/assets/{file-text-BvszilVL.js → file-text-BFqJQ67P.js} +1 -1
- package/dist/viewer/assets/flow-diagram-preview-B83UU1n_.js +1 -0
- package/dist/viewer/assets/{flowDiagram-HODETNUW-Db0QtNj4.js → flowDiagram-HODETNUW-BNFS2Mkr.js} +1 -1
- package/dist/viewer/assets/ganttDiagram-EL5Y4UJY-DFDsYJNp.js +292 -0
- package/dist/viewer/assets/gitGraphDiagram-WWUBYQGX-BVHabPDp.js +106 -0
- package/dist/viewer/assets/global-loader-XJO9_e0l.js +1 -0
- package/dist/viewer/assets/{globe-Jl6eIZmG.js → globe-CJ35KsQW.js} +1 -1
- package/dist/viewer/assets/gql-FFIj8zdp.js +1 -0
- package/dist/viewer/assets/{grid-scroll-body-CPqSxU6-.js → grid-scroll-body-DC5pYDPJ.js} +2 -2
- package/dist/viewer/assets/iconBase-DtqdW2XR.js +1 -0
- package/dist/viewer/assets/index-B6MxYIzs.js +1 -0
- package/dist/viewer/assets/index-BC5xdBQU.js +48 -0
- package/dist/viewer/assets/index-BIrx3oY4.js +1 -0
- package/dist/viewer/assets/{index-jm22RWpY.js → index-BZGsDmUx.js} +5 -5
- package/dist/viewer/assets/{index-Poftp9f1.js → index-BZXhpoWr.js} +4 -4
- package/dist/viewer/assets/index-Bn2bqqMd.js +1 -0
- package/dist/viewer/assets/{index-HU5pz3kj.js → index-BpCVYTvP.js} +36 -36
- package/dist/viewer/assets/{index-Bt2YHgxl.js → index-CBOYhBKJ.js} +1 -1
- package/dist/viewer/assets/index-CH7cEAxj.js +17 -0
- package/dist/viewer/assets/index-CIf0GId3.js +74 -0
- package/dist/viewer/assets/{index-D7MEHpJf.js → index-Ck66Ic_p.js} +4 -4
- package/dist/viewer/assets/index-Cp9mIQ8F.js +1 -0
- package/dist/viewer/assets/{index-c6Bxcoqm.js → index-DDmBuMKI.js} +1 -1
- package/dist/viewer/assets/{index-BSyJbFDG.js → index-DY3BFyb6.js} +1 -1
- package/dist/viewer/assets/{index-BS94XVnd.js → index-DkzZ-ZvR.js} +1 -1
- package/dist/viewer/assets/{index-C_43VC19.js → index-PglMbhys.js} +1 -1
- package/dist/viewer/assets/infoDiagram-27XIBGKW-CG-wwxBf.js +2 -0
- package/dist/viewer/assets/input--C59pq6j.js +1 -0
- package/dist/viewer/assets/{ishikawaDiagram-5VMMS53U-C4PzFnZ4.js → ishikawaDiagram-5VMMS53U-BlgV7ceJ.js} +2 -2
- package/dist/viewer/assets/{journeyDiagram-3NMN7TZE-Dpn3bBNo.js → journeyDiagram-3NMN7TZE-Cn03_Xl6.js} +2 -2
- package/dist/viewer/assets/{kanban-definition-UXKFOSKX-CJ99H4G6.js → kanban-definition-UXKFOSKX-CJogvDPY.js} +6 -6
- package/dist/viewer/assets/{layout-Bfvxt_D5.js → layout-B26eC4yQ.js} +1 -1
- package/dist/viewer/assets/{lens-run-page-DZneics-.js → lens-run-page-Ba1ppzJt.js} +3 -3
- package/dist/viewer/assets/lens-runs-page-BnUS57LM.js +1 -0
- package/dist/viewer/assets/{link-2-C75goIOt.js → link-2-D1e0xznG.js} +1 -1
- package/dist/viewer/assets/linked-project-dot-BY1gEES9.js +543 -0
- package/dist/viewer/assets/{loader-circle-C5jZoM7X.js → loader-circle-CiqyoJF7.js} +1 -1
- package/dist/viewer/assets/{merge-Cy7YkrN7.js → merge-BhOMvhW1.js} +1 -1
- package/dist/viewer/assets/mermaid.core-BDgZg3kW.js +312 -0
- package/dist/viewer/assets/method-badge-DErZP7y5.js +1 -0
- package/dist/viewer/assets/{mindmap-definition-YA3MSWOX-yQCKA-K4.js → mindmap-definition-YA3MSWOX-DFkLu0ac.js} +2 -2
- package/dist/viewer/assets/nav-links-DZWMpwMR.js +61 -0
- package/dist/viewer/assets/{network-COWNXGMM.js → network-B1apzT1s.js} +1 -1
- package/dist/viewer/assets/{nosql-editor-modal-DTiWkc_r.js → nosql-editor-modal-CvH0SWAi.js} +5 -5
- package/dist/viewer/assets/not-found-page-C-fn8QeM.js +1 -0
- package/dist/viewer/assets/organization-dependency-graph-page-BryP-iJL.js +1 -0
- package/dist/viewer/assets/pegDiagram-XKGWAZYB-g1cM14-L.js +1 -0
- package/dist/viewer/assets/{pieDiagram-E7YTZNPT-DqnkpCX4.js → pieDiagram-E7YTZNPT-WEnDsMY3.js} +2 -2
- package/dist/viewer/assets/{plus-DQakmTjA.js → plus-DbyuOgKB.js} +1 -1
- package/dist/viewer/assets/popover-476u3TN0.js +1 -0
- package/dist/viewer/assets/preload-helper-BlTxHScW.js +1 -0
- package/dist/viewer/assets/{quadrantDiagram-AXDQQJYC-iQjJfars.js → quadrantDiagram-AXDQQJYC-NdfQCpzF.js} +2 -2
- package/dist/viewer/assets/query-D9oj6LGx.js +50 -0
- package/dist/viewer/assets/{quill-rCHj4fCw.js → quill-Cde5JMRD.js} +1 -1
- package/dist/viewer/assets/railroadDiagram-O6MQD6OU-BYhlXlMY.js +1 -0
- package/dist/viewer/assets/{react-BNzYaZuG.js → react-Bx48XWN4.js} +1 -1
- package/dist/viewer/assets/react-flow-wrapper-BcbvHgxz.js +277 -0
- package/dist/viewer/assets/{requirementDiagram-BXWQKSXE-Bv-Vh1dW.js → requirementDiagram-BXWQKSXE-C25Bcm2L.js} +2 -2
- package/dist/viewer/assets/{sankeyDiagram-P5KCCOFB-C__uD07f.js → sankeyDiagram-P5KCCOFB-h8LiCsgk.js} +2 -2
- package/dist/viewer/assets/scroll-area-RagrStGj.js +6 -0
- package/dist/viewer/assets/{search-DW-qhXLk.js → search-vw7ucoOs.js} +1 -1
- package/dist/viewer/assets/section-loader-C4hOfhQS.js +1 -0
- package/dist/viewer/assets/section-not-found-BnrXiPog.js +1 -0
- package/dist/viewer/assets/select-D9fbrr7O.js +1 -0
- package/dist/viewer/assets/{sequenceDiagram-WJ2MYXX4-1RbvcHwO.js → sequenceDiagram-WJ2MYXX4-CDRVvD30.js} +2 -2
- package/dist/viewer/assets/{service-context-C17u_Fw9.js → service-context-D5nBtU18.js} +1 -1
- package/dist/viewer/assets/{service-database-list-page-cYuDHIls.js → service-database-list-page-DBjaDLVy.js} +2 -2
- package/dist/viewer/assets/service-database-page-CenNCgwf.js +2 -0
- package/dist/viewer/assets/service-database-page-inner-gS51TQTZ.js +85 -0
- package/dist/viewer/assets/{service-doc-Dir8g83J.js → service-doc-C-jHqT1U.js} +4 -4
- package/dist/viewer/assets/{service-doc-preview-modal-bJ6tJ5YR.js → service-doc-preview-modal-5sX6FOu1.js} +2 -2
- package/dist/viewer/assets/service-layout-Bf0vZBCH.js +1 -0
- package/dist/viewer/assets/service-pages-CFikvX4t.js +1 -0
- package/dist/viewer/assets/{services-Crqkffr5.js → services-Ivav34WC.js} +4 -4
- package/dist/viewer/assets/{share-2-BmYmqN4k.js → share-2-CQEaWbfH.js} +1 -1
- package/dist/viewer/assets/sizeCapture-INFHLROL-BJ6ndnPM.js +1 -0
- package/dist/viewer/assets/stateDiagram-D77RDMKH-B_tNCX3o.js +1 -0
- package/dist/viewer/assets/stateDiagram-v2-MP3YSRHH-Dl9wqdli.js +1 -0
- package/dist/viewer/assets/{style-DgSU0bQl.js → style-BPesJvJr.js} +8 -8
- package/dist/viewer/assets/super-circle-loader-DSkos6uP.js +1 -0
- package/dist/viewer/assets/super-logo-loader-Cxlbn6MB.js +1 -0
- package/dist/viewer/assets/swimlanes-42K2YHIH-CzURzYwf.js +1 -0
- package/dist/viewer/assets/swimlanesDiagram-VR7AAH4N-DrIlwFtk.js +8 -0
- package/dist/viewer/assets/table-B4pFND-o.js +1 -0
- package/dist/viewer/assets/textarea-Clgdv3Oi.js +1 -0
- package/dist/viewer/assets/{timeline-definition-24CTP7MA-C4yuLwUH.js → timeline-definition-24CTP7MA-D0YXQE1U.js} +2 -2
- package/dist/viewer/assets/ui-graph-logo-gHowu5gP.js +1 -0
- package/dist/viewer/assets/{upload-CRsS43j9.js → upload-CYb3nN_5.js} +1 -1
- package/dist/viewer/assets/{uploads-BOQHX9l4.js → uploads-CX2kdXbM.js} +8 -8
- package/dist/viewer/assets/{use-debounced-value-Ba-kkCUY.js → use-debounced-value-BpNFJd3C.js} +1 -1
- package/dist/viewer/assets/{use-localstorage-DIisTx-J.js → use-localstorage-D233xVb0.js} +1 -1
- package/dist/viewer/assets/use-permissions-BvmxJJ5r.js +1 -0
- package/dist/viewer/assets/{use-scoped-storage-C4RzED-E.js → use-scoped-storage-DL1XVp1j.js} +1 -1
- package/dist/viewer/assets/useMutation-D5ZHwHsx.js +1 -0
- package/dist/viewer/assets/useQuery-Dhe6uxrL.js +1 -0
- package/dist/viewer/assets/{vennDiagram-4TSXK5OY-BCtqXZqe.js → vennDiagram-4TSXK5OY-SSjHlqCQ.js} +2 -2
- package/dist/viewer/assets/{wardleyDiagram-VM6X3IG4-D3OtZJoT.js → wardleyDiagram-VM6X3IG4-CZWNdQxH.js} +2 -2
- package/dist/viewer/assets/{xychartDiagram-S5SC5T6Z-DxLL2CHH.js → xychartDiagram-S5SC5T6Z-B2qAGeb0.js} +2 -2
- package/dist/viewer/assets/zod-BMU4UTQt.js +1 -0
- package/dist/viewer/index.html +10 -1
- package/package.json +56 -56
- package/dist/abort-signals-B4fc3ahg.mjs +0 -34
- package/dist/anthropic-messages-KPxCHqBN.mjs +0 -14327
- package/dist/auth-storage-BvNH97p9.mjs +0 -2180
- package/dist/azure-openai-config-BbeCSg4y.mjs +0 -55
- package/dist/azure-openai-responses-BRzy8RfL.mjs +0 -182
- package/dist/classifier-shared-DBUHiTGw.mjs +0 -105
- package/dist/cli-2R6QQFp1.mjs +0 -451
- package/dist/cloudflare-workers-ai-system-one-BfqwmRQf.mjs +0 -44
- package/dist/config-D8DMGzIq.mjs +0 -647
- package/dist/cross-spawn-B2jIQPlu.mjs +0 -404
- package/dist/diagnostics-xdSgQR8t.mjs +0 -131
- package/dist/dist-BRyghrKX.mjs +0 -404
- package/dist/dist-D0EzrblG.mjs +0 -12161
- package/dist/dist-EKhnHWHG.mjs +0 -140221
- package/dist/dist-pQtuusFv.mjs +0 -1243
- package/dist/easter-egg-3d-C9_btlWn.mjs +0 -1225
- package/dist/env-api-keys-uytNub6O.mjs +0 -122
- package/dist/error-body-FhmCtR7m.mjs +0 -101
- package/dist/esm-D5isprgl.mjs +0 -1533
- package/dist/esm-DnqE4pfM.mjs +0 -104876
- package/dist/execute-BoTKl80U.mjs +0 -1715
- package/dist/github-copilot-headers-DWcTgoXr.mjs +0 -22
- package/dist/google-generative-ai-Brs5YpJo.mjs +0 -332
- package/dist/google-shared-2CyYa4VE.mjs +0 -33438
- package/dist/google-vertex-DZDUQPKa.mjs +0 -378
- package/dist/hash-DN7ukSfd.mjs +0 -16
- package/dist/headers-GhQHLk-3.mjs +0 -17
- package/dist/jiti-9kWALm4Y.mjs +0 -5439
- package/dist/jiti-loader-f21DrY1K.mjs +0 -27
- package/dist/jiti-static-loader-BI_w28l7.mjs +0 -41704
- package/dist/json-parse-B2mHg7o7.mjs +0 -381
- package/dist/keybinding-hints-D0nLU3ZH.mjs +0 -17899
- package/dist/lib-Dj1gKQJc.mjs +0 -24379
- package/dist/llama-cpp-classify-C73BoMYd.mjs +0 -344
- package/dist/mistral-conversations-DXVR7znL.mjs +0 -698
- package/dist/models-DBdii9gQ.mjs +0 -1255
- package/dist/multipart-parser-DLw9Z0uJ.mjs +0 -298
- package/dist/node-B0NU8X55.mjs +0 -2479
- package/dist/node-B8gaKm9g.mjs +0 -23
- package/dist/openai-I3_AqKDX.mjs +0 -17357
- package/dist/openai-codex-responses-PcZHDuBD.mjs +0 -1198
- package/dist/openai-completions-a_mH01ii.mjs +0 -994
- package/dist/openai-decisions-Du8y4mQG.mjs +0 -142
- package/dist/openai-prompt-cache-Bc6qNWt0.mjs +0 -8
- package/dist/openai-responses-a9lV_U7O.mjs +0 -270
- package/dist/openai-responses-shared-CDs_PBiH.mjs +0 -598
- package/dist/openrouter-images-D0Zc8Cjs.mjs +0 -125
- package/dist/photon_rs-DCvMOMu0.mjs +0 -4252
- package/dist/pi-messages-B5ietIBq.mjs +0 -306
- package/dist/provider-env-BJhgA66g.mjs +0 -37
- package/dist/provider-retry-DXYM7rVE.mjs +0 -79
- package/dist/runtime-DTkBxiaM.mjs +0 -2822
- package/dist/sanitize-unicode-CqChtoM6.mjs +0 -26
- package/dist/shell-836_JFnI.mjs +0 -162
- package/dist/source-CKPndhKl.mjs +0 -478
- package/dist/src-DNm2QRm3.mjs +0 -5028
- package/dist/system-one-shared-DUAFtNa8.mjs +0 -75
- package/dist/token-DEUkymby.mjs +0 -56
- package/dist/token-util-Cx5S4eKt.mjs +0 -3
- package/dist/tool-DHDYqsyG.mjs +0 -6673
- package/dist/transform-messages-BClk99Vn.mjs +0 -477
- package/dist/typesafe-system-one-D2d8j8hZ.mjs +0 -24
- package/dist/typescript-Br-vsRJV.mjs +0 -6737
- package/dist/uuid-CNCZqNBb.mjs +0 -49
- package/dist/v2-1z8ijsD3.mjs +0 -6120
- package/dist/viewer/assets/abnfDiagram-VCTEODGH-j5YaKnl9.js +0 -1
- package/dist/viewer/assets/actor-avatar-DqmoY8Xc.js +0 -1
- package/dist/viewer/assets/architectureDiagram-5GKGNRK7-D80cJKz_.js +0 -36
- package/dist/viewer/assets/avatar-BI7D-Aia.js +0 -43
- package/dist/viewer/assets/badge-870-A4Y6.js +0 -1
- package/dist/viewer/assets/better-delete-confirmation-modal-Dib31LVb.js +0 -1
- package/dist/viewer/assets/better-dialog-D3AAiahr.js +0 -1
- package/dist/viewer/assets/button-DadqadpO.js +0 -1
- package/dist/viewer/assets/channel-DRkt3LIn.js +0 -1
- package/dist/viewer/assets/checkbox-BXpR079x.js +0 -1
- package/dist/viewer/assets/classDiagram-ZZMXUADV-G5CebNaC.js +0 -1
- package/dist/viewer/assets/classDiagram-v2-VYDZK3BY-G5CebNaC.js +0 -1
- package/dist/viewer/assets/color-input-Efm-lxDy.js +0 -11
- package/dist/viewer/assets/cose-bilkent-JH36ORCC-CrSHFmnp.js +0 -1
- package/dist/viewer/assets/cross-button-5Sr5rWVP.js +0 -1
- package/dist/viewer/assets/cynefinDiagram-5FMLGOSQ-Bdl_eBdu.js +0 -62
- package/dist/viewer/assets/dashboard-diagrams-page-DMupOe1m.js +0 -2
- package/dist/viewer/assets/dashboard-diagrams-page-inner-Dh0yKh2A.js +0 -1
- package/dist/viewer/assets/dashboard-docs-page-DWJ1qOQz.js +0 -2
- package/dist/viewer/assets/dashboard-docs-page-inner-Fs6G3oGo.js +0 -67
- package/dist/viewer/assets/dashboard-layout-D36InAaB.js +0 -1
- package/dist/viewer/assets/dashboard-lens-layout-Cv1Xx3hY.js +0 -1
- package/dist/viewer/assets/dashboard-map-frame-page-CTn61NUO.js +0 -1
- package/dist/viewer/assets/dashboard-plans-page-DxFJkrgK.js +0 -1
- package/dist/viewer/assets/dashboard-service-apis-BHtD9s5z.js +0 -1
- package/dist/viewer/assets/dashboard-service-docs-Uv_1uxxO.js +0 -1
- package/dist/viewer/assets/dashboard-services-CUP-L4Jg.js +0 -1
- package/dist/viewer/assets/diagram-UQ7AKVKN-DhFcurW6.js +0 -41
- package/dist/viewer/assets/diagram-VX7I27RA-DE1nREE8.js +0 -24
- package/dist/viewer/assets/diagram-Z3DM3KII-CSrYcCbc.js +0 -24
- package/dist/viewer/assets/diagram-live-preview-i5doxXLH.js +0 -2
- package/dist/viewer/assets/dialog-D_HtNS17.js +0 -6
- package/dist/viewer/assets/ebnfDiagram-PWID7BFC-BfL8m_sf.js +0 -1
- package/dist/viewer/assets/flow-diagram-preview-T0Z4iMVU.js +0 -1
- package/dist/viewer/assets/ganttDiagram-EL5Y4UJY-CsITpniw.js +0 -292
- package/dist/viewer/assets/gitGraphDiagram-WWUBYQGX-B4eCBGoe.js +0 -106
- package/dist/viewer/assets/iconBase-BoDZfJgC.js +0 -1
- package/dist/viewer/assets/index-5E1tJ7yK.js +0 -125
- package/dist/viewer/assets/index-7XpV2DRw.js +0 -1
- package/dist/viewer/assets/index-C0Rs3s9Z.js +0 -1
- package/dist/viewer/assets/index-CzHjJWeV.js +0 -1
- package/dist/viewer/assets/index-DcEA6SIV.js +0 -74
- package/dist/viewer/assets/infoDiagram-27XIBGKW-lTebN5Ix.js +0 -2
- package/dist/viewer/assets/input-YvHTVS0E.js +0 -1
- package/dist/viewer/assets/lens-runs-page-DoAOObxx.js +0 -1
- package/dist/viewer/assets/linked-project-dot-Ds2uEmJ9.js +0 -543
- package/dist/viewer/assets/mermaid.core-BCRBv8Us.js +0 -312
- package/dist/viewer/assets/method-badge-DMYDKdDZ.js +0 -1
- package/dist/viewer/assets/nav-links-8vT2ixiI.js +0 -61
- package/dist/viewer/assets/not-found-page-CnfLlhS4.js +0 -1
- package/dist/viewer/assets/organization-dependency-graph-page-3xqIxjNx.js +0 -1
- package/dist/viewer/assets/pegDiagram-XKGWAZYB-CMXqeAum.js +0 -1
- package/dist/viewer/assets/popover-CN9ni1N3.js +0 -1
- package/dist/viewer/assets/railroadDiagram-O6MQD6OU-CfqToX3W.js +0 -1
- package/dist/viewer/assets/react-flow-wrapper-BPlRstyO.js +0 -276
- package/dist/viewer/assets/scroll-area-BodE-n7W.js +0 -6
- package/dist/viewer/assets/section-loader-BzpYM_Nx.js +0 -1
- package/dist/viewer/assets/select-DDtnmSET.js +0 -1
- package/dist/viewer/assets/service-database-page-CMi1wF4h.js +0 -2
- package/dist/viewer/assets/service-database-page-inner-CoqAj93L.js +0 -85
- package/dist/viewer/assets/service-layout-0NMm_bKG.js +0 -1
- package/dist/viewer/assets/service-pages-dfnc91SU.js +0 -1
- package/dist/viewer/assets/sizeCapture-INFHLROL-BRJi3gCg.js +0 -1
- package/dist/viewer/assets/stateDiagram-D77RDMKH-DdLsfxgy.js +0 -1
- package/dist/viewer/assets/stateDiagram-v2-MP3YSRHH-DFwg8Qki.js +0 -1
- package/dist/viewer/assets/super-circle-loader-D8MElOMh.js +0 -1
- package/dist/viewer/assets/super-logo-loader-DJYiRbCS.js +0 -1
- package/dist/viewer/assets/swimlanes-42K2YHIH-AuYjrPqh.js +0 -1
- package/dist/viewer/assets/swimlanesDiagram-VR7AAH4N-0nIGA8_4.js +0 -8
- package/dist/viewer/assets/table-Bi4Auk9Z.js +0 -1
- package/dist/viewer/assets/textarea-MgxZ5x6-.js +0 -1
- package/dist/viewer/assets/ui-graph-logo-D4jRhd4z.js +0 -1
- package/dist/viewer/assets/use-permissions-6JVET753.js +0 -1
- package/dist/viewer/assets/useMutation-CmVaR9zz.js +0 -1
- package/dist/viewer/assets/useQuery-B8yYhO0c.js +0 -1
- package/dist/viewer/assets/zod-Dc4H6VVJ.js +0 -1
- package/dist/virtual-modules-DnCx0Gdx.mjs +0 -340
|
@@ -0,0 +1,543 @@
|
|
|
1
|
+
import{j as e,r as p}from"./index-CH7cEAxj.js";import{C as K}from"./cross-button-D5qst1tj.js";import{S as V}from"./super-circle-loader-DSkos6uP.js";import{B as S}from"./button-DZj74qS7.js";import{u as W}from"./use-permissions-BvmxJJ5r.js";import{t as F}from"./index-B6MxYIzs.js";import{I as ae}from"./input--C59pq6j.js";import{L as B}from"./textarea-Clgdv3Oi.js";import{u as ee,S as H,T as qe,U as Ve,a as He,b as Ct,c as Nt,N as Dt,F as Ft,L as $t,D as At,K as Pt,B as St,d as wt,e as Mt,f as kt,g as Et,h as Lt,i as _t,j as Tt,k as Ot,l as Rt,m as Bt}from"./color-input-ClkkG_kZ.js";import{u as O,B as xe}from"./query-D9oj6LGx.js";import{S as We}from"./section-loader-C4hOfhQS.js";import{S as Ye}from"./super-logo-loader-Cxlbn6MB.js";import{u as Ut,b as Gt,c as w}from"./chunk-OB3PAWPO-DJIP1M4r.js";import{c as zt}from"./react-Bx48XWN4.js";import{g as N}from"./gql-FFIj8zdp.js";import{u as M}from"./useQuery-Dhe6uxrL.js";import{u as he}from"./useMutation-D5ZHwHsx.js";import{c as qt,a as Vt,g as Ke,f as Ht,d as Xe,j as Wt,W as Yt,X as Kt,Y as Xt,I as se,N as Qt,T as Qe,v as Je,w as Ze}from"./nav-links-DZWMpwMR.js";import{i as Jt,u as Zt}from"./scroll-area-RagrStGj.js";import{u as ea}from"./iconBase-DtqdW2XR.js";import{c as et,C as ta,a as aa,b as sa,T as oa}from"./index-Cp9mIQ8F.js";import{C as na}from"./chevron-down-DDsUE_xz.js";import{a as $}from"./index-Dj_05fqk.js";import{a as L,B as G}from"./better-dialog-DcIxFWwk.js";import{a as ra,b as ia}from"./index-DDmBuMKI.js";import{u as la,e as ye,f as P,h as tt,C as ca,i as da,j as ma,k as ua}from"./react-flow-wrapper-BcbvHgxz.js";import{M as at}from"./method-badge-DErZP7y5.js";import{a as pa,c as st,f as xa,d as ha}from"./api-adapters-tfr51BsS.js";import{A as fa,a as ga,b as Ia}from"./api-endpoints-D-Whnnwd.js";import{S as Ce}from"./services-Ivav34WC.js";import{u as oe,a as ne,C as ot}from"./zod-BMU4UTQt.js";import{f as Ne,C as E,b as ja}from"./index-BpCVYTvP.js";import{L as U}from"./loader-circle-CiqyoJF7.js";import{o as X,s as T,E as Ee,B as va,_ as ba,b as ya,d as Ca,n as Na}from"./index-CIf0GId3.js";import{d as nt,B as rt}from"./better-delete-confirmation-modal-CGEQ5O4X.js";import{D as it,a as lt,c as De,d as Fe,e as J,f as Z,b as $e}from"./dialog-D7wzTt0L.js";import{D as Da}from"./diagrams-BqBSv2eb.js";import{u as Fa}from"./use-debounced-value-BpNFJd3C.js";import{L as $a}from"./link-2-D1e0xznG.js";import{C as Aa}from"./common-DLCsGQ-t.js";import{D as Pa,c as Sa,d as wa}from"./avatar-DAFUyk1i.js";import{FlowDiagramPreview as Ma}from"./flow-diagram-preview-B83UU1n_.js";import{c as ka,g as Ea,a as La}from"./getRoundingMethod-DC1wW3rl.js";import{e as _a,n as Ta,g as Le,m as _e,a as Te,h as Oe,b as Oa,i as Re}from"./en-US-B1Lg1a1H.js";import{g as Ra}from"./index-Ck66Ic_p.js";import{u as Ba,T as ct}from"./uploads-CX2kdXbM.js";import{D as Ua,Q as Ga}from"./quill-Cde5JMRD.js";import{d as za,c as qa}from"./doc-file-content-Be0au9Vo.js";import{S as Va}from"./service-doc-C-jHqT1U.js";import{C as Ha}from"./grid-scroll-body-DC5pYDPJ.js";/**
|
|
2
|
+
* @license lucide-react v0.514.0 - ISC
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the ISC license.
|
|
5
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/const Wa=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],dt=qt("pencil",Wa);function Ya(s,t,a){const o=Oa(),n=a?.locale??o.locale??_a,r=ka(s,t);if(isNaN(r))throw new RangeError("Invalid time value");const i=Object.assign({},a,{addSuffix:a?.addSuffix,comparison:r}),[l,c]=Ta(a?.in,...r>0?[t,s]:[s,t]),d=Ea(a?.roundingMethod??"round"),m=c.getTime()-l.getTime(),u=m/Re,x=Le(c)-Le(l),j=(m-x)/Re,I=a?.unit;let h;if(I?h=I:u<1?h="second":u<60?h="minute":u<_e?h="hour":j<Te?h="day":j<Oe?h="month":h="year",h==="second"){const v=d(m/1e3);return n.formatDistance("xSeconds",v,i)}else if(h==="minute"){const v=d(u);return n.formatDistance("xMinutes",v,i)}else if(h==="hour"){const v=d(u/60);return n.formatDistance("xHours",v,i)}else if(h==="day"){const v=d(j/_e);return n.formatDistance("xDays",v,i)}else if(h==="month"){const v=d(j/Te);return v===12&&I!=="month"?n.formatDistance("xYears",1,i):n.formatDistance("xMonths",v,i)}else{const v=d(j/Oe);return n.formatDistance("xYears",v,i)}}function mt(s,t){return Ya(s,La(s),t)}function ut({error:s,label:t,required:a,children:o,componentType:n}){const r=la();return e.jsxs("div",{className:"mb-6",children:[e.jsxs("label",{"data-component-type":n,"data-has-error":s?"true":null,className:r.fieldLabel,children:[t," ",a&&e.jsx("span",{className:"text-destructive",children:"*"})]}),e.jsx("div",{className:r.fieldValue,children:o}),s&&e.jsx("p",{className:"text-destructive mt-2 overflow-hidden text-xs",children:s})]})}function Ka(...s){const t=Ut(),[a]=Gt(),o=p.useMemo(()=>{const r={};for(const i of s)r[i]=a.get(i)??null;return r},[s,a]),n=p.useCallback((r,i)=>{const l=new URLSearchParams(a.toString());for(const c in r){const d=c;r[d]==null?l.delete(d):l.set(d,r[d])}i?t(`?${l.toString()}`,{replace:!0}):t(`?${l.toString()}`)},[t,a]);return[o,n]}const ve=N(`
|
|
7
|
+
query FocalPointMeta(
|
|
8
|
+
$orgId: ID!
|
|
9
|
+
$mapId: ID!
|
|
10
|
+
$frameId: ID!
|
|
11
|
+
$focalPointId: ID!
|
|
12
|
+
) {
|
|
13
|
+
focalPointMeta(
|
|
14
|
+
orgId: $orgId
|
|
15
|
+
mapId: $mapId
|
|
16
|
+
frameId: $frameId
|
|
17
|
+
focalPointId: $focalPointId
|
|
18
|
+
) {
|
|
19
|
+
id
|
|
20
|
+
focalPointId
|
|
21
|
+
orgId
|
|
22
|
+
frameId
|
|
23
|
+
componentId
|
|
24
|
+
componentLinkDiagramId
|
|
25
|
+
componentLinkApiEndpointId
|
|
26
|
+
componentLinkTestPackId
|
|
27
|
+
componentLinkServiceDocId
|
|
28
|
+
createdBy
|
|
29
|
+
componentModalFields {
|
|
30
|
+
componentFieldId
|
|
31
|
+
label
|
|
32
|
+
type
|
|
33
|
+
required
|
|
34
|
+
isReadonly
|
|
35
|
+
data
|
|
36
|
+
options
|
|
37
|
+
order
|
|
38
|
+
}
|
|
39
|
+
createdAt
|
|
40
|
+
updatedAt
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
`),Xa=N(`
|
|
44
|
+
mutation CreateFocalPointMeta(
|
|
45
|
+
$orgId: ID!
|
|
46
|
+
$mapId: ID!
|
|
47
|
+
$frameId: ID!
|
|
48
|
+
$focalPointId: ID!
|
|
49
|
+
$input: CreateFocalPointMetaInput!
|
|
50
|
+
) {
|
|
51
|
+
createFocalPointMeta(
|
|
52
|
+
orgId: $orgId
|
|
53
|
+
mapId: $mapId
|
|
54
|
+
frameId: $frameId
|
|
55
|
+
focalPointId: $focalPointId
|
|
56
|
+
input: $input
|
|
57
|
+
) {
|
|
58
|
+
id
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
`),pt=N(`
|
|
62
|
+
mutation UpdateFocalPointMeta(
|
|
63
|
+
$orgId: ID!
|
|
64
|
+
$mapId: ID!
|
|
65
|
+
$frameId: ID!
|
|
66
|
+
$focalPointId: ID!
|
|
67
|
+
$id: ID!
|
|
68
|
+
$input: UpdateFocalPointMetaInput!
|
|
69
|
+
) {
|
|
70
|
+
updateFocalPointMeta(
|
|
71
|
+
orgId: $orgId
|
|
72
|
+
mapId: $mapId
|
|
73
|
+
frameId: $frameId
|
|
74
|
+
focalPointId: $focalPointId
|
|
75
|
+
id: $id
|
|
76
|
+
input: $input
|
|
77
|
+
) {
|
|
78
|
+
id
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
`),xt=N(`
|
|
82
|
+
mutation DeleteFocalPointMeta(
|
|
83
|
+
$orgId: ID!
|
|
84
|
+
$mapId: ID!
|
|
85
|
+
$frameId: ID!
|
|
86
|
+
$focalPointId: ID!
|
|
87
|
+
$id: ID!
|
|
88
|
+
) {
|
|
89
|
+
deleteFocalPointMeta(
|
|
90
|
+
orgId: $orgId
|
|
91
|
+
mapId: $mapId
|
|
92
|
+
frameId: $frameId
|
|
93
|
+
focalPointId: $focalPointId
|
|
94
|
+
id: $id
|
|
95
|
+
)
|
|
96
|
+
}
|
|
97
|
+
`),[on,ht]=zt(({focalPoint:s,mapId:t})=>{const a=O()?.id,o=s.frameId??"",n=s.id,r={orgId:a,mapId:t,frameId:o,focalPointId:n},l=M(ve,{variables:r,skip:!a||!t||!o}),d={awaitRefetchQueries:!0,refetchQueries:[{query:ve,variables:r}]},[m]=he(Xa,d),[u]=he(pt,d),[x]=he(xt,d),j=l.data?.focalPointMeta??[];function I(h,v){return{componentId:h,...v}}return{focalPoint:s,pointMeta:j,pointMetaLoading:l.loading&&!l.data?.focalPointMeta,createPointMeta(h,v){return m({variables:{...r,input:I(h,v)}})},updatePointMeta(h,v,D){return u({variables:{...r,id:h,input:I(v,D)}})},deletePointMeta(h){return x({variables:{...r,id:h}})}}});function ft(){const[s,t]=Ka("point","group");return{focalPoint:s.point,frameGroup:s.group,clearTarget(){t({point:null,group:null})},setTarget(a,o){t({point:null,group:null,[a]:o})}}}function Ae({open:s,onOpenChange:t,children:a,className:o}){return e.jsx(it,{open:s,onOpenChange:t,children:e.jsxs(lt,{showCloseButton:!1,className:w("bg-shading border-stock h-full max-h-full w-full max-w-full grid-rows-[auto_1fr_auto] gap-0 overflow-hidden rounded-none border p-0 sm:h-auto sm:max-h-[95%] sm:max-w-[min(43rem,95%)] sm:rounded-[1rem]",o),children:[e.jsx(De,{asChild:!0,children:e.jsx(K,{className:"absolute top-3 right-3"})}),a]})})}function Qa({children:s,className:t,hasFooter:a,...o}){return e.jsx("div",{...o,className:w("custom-scrollbar max-h-full overflow-auto p-6",a&&"pb-0",t),children:s})}function Ja({title:s,description:t,className:a,...o}){return e.jsxs(Fe,{...o,className:w("border-stock h-[6.1rem] border-b p-6",a),children:[e.jsx(J,{asChild:!0,children:e.jsx("h3",{children:s})}),t&&e.jsx(Z,{asChild:!0,children:e.jsx("p",{className:"text-paragraph mt-2 text-sm",children:t})})]})}function Za({children:s,className:t,...a}){return e.jsx($e,{...a,className:w("border-stock flex-row justify-end p-6 pt-2 pb-3 sm:pb-6",t),children:s})}function nn({title:s,description:t,contentClassName:a,footer:o,children:n,...r}){return e.jsxs(Ae,{...r,children:[e.jsx(Ja,{title:s,description:t}),e.jsx(Qa,{hasFooter:!!o,className:a,children:n}),o&&e.jsx(Za,{children:o})]})}function gt({open:s,onOpenChange:t,onConfirm:a}){const[o,n]=p.useState(!1);return e.jsx(Ae,{open:s,onOpenChange:t,className:"!max-w-[463px]",children:e.jsxs("div",{className:"p-6 text-center",children:[e.jsx("img",{src:nt,alt:"trash",className:"mx-auto mb-4"}),e.jsx(J,{className:"text-textPrimary pt-8 text-[1rem] leading-[1.33] font-semibold",children:"Do you want to delete this focal point meta data?"}),e.jsx(Z,{className:"text-textSecondary pt-4 text-sm leading-[1.33] font-normal",children:"Deleting this focal point meta data is a permanent action and cannot be undone. Please think carefully before proceeding."}),e.jsxs("div",{className:"flex space-x-3 pt-8 *:flex-1",children:[e.jsxs(S,{variant:"outline",className:"h-14 rounded-[13px] border border-[#CD454380] bg-[#CD45434D] text-sm font-normal text-[#E92A19] hover:bg-[#CD4543] hover:text-white",onClick:async()=>{n(!0),await a(),n(!1),t(!1)},children:[o&&e.jsx(V,{}),"Permanently Delete"]}),e.jsx(S,{onClick:()=>t(!1),className:"h-14 rounded-[13px] text-sm font-normal text-white",children:"Cancel"})]})]})})}var es=Object.defineProperty,_=(s,t)=>es(s,"name",{value:t,configurable:!0}),ts={Multiple:"multiple"},Y={Vertical:"vertical",Horizontal:"horizontal"},as={LTR:"ltr"},R="Accordion",ss=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[Pe,{useGetCollection:os,createCollectionScope:ns}]=Jt(R),[re,rn]=Vt(R,[ns,et]),Se=et(),rs=p.forwardRef(_(function(t,a){const{type:o,...n}=t,r=n,i=n;return e.jsx(Pe.Provider,{scope:t.__scopeAccordion,children:o===ts.Multiple?e.jsx(ds,{...i,ref:a}):e.jsx(cs,{...r,ref:a})})},"Accordion")),[It,is]=re(R),[jt,ls]=re(R,{collapsible:!1}),cs=p.forwardRef(_(function(t,a){const{value:o,defaultValue:n,onValueChange:r=_(()=>{},"onValueChange"),collapsible:i=!1,...l}=t,[c,d]=Ke({prop:o,defaultProp:n??"",onChange:r,caller:R});return e.jsx(It,{scope:t.__scopeAccordion,value:p.useMemo(()=>c?[c]:[],[c]),onItemOpen:d,onItemClose:p.useCallback(()=>i&&d(""),[i,d]),children:e.jsx(jt,{scope:t.__scopeAccordion,collapsible:i,children:e.jsx(vt,{...l,ref:a})})})},"AccordionImplSingle")),ds=p.forwardRef(_(function(t,a){const{value:o,defaultValue:n,onValueChange:r=_(()=>{},"onValueChange"),...i}=t,[l,c]=Ke({prop:o,defaultProp:n??[],onChange:r,caller:R}),d=p.useCallback(u=>c((x=[])=>[...x,u]),[c]),m=p.useCallback(u=>c((x=[])=>x.filter(j=>j!==u)),[c]);return e.jsx(It,{scope:t.__scopeAccordion,value:l,onItemOpen:d,onItemClose:m,children:e.jsx(jt,{scope:t.__scopeAccordion,collapsible:!0,children:e.jsx(vt,{...i,ref:a})})})},"AccordionImplMultiple")),[ms,ie]=re(R),vt=p.forwardRef(_(function(t,a){const{__scopeAccordion:o,disabled:n,dir:r,orientation:i=Y.Vertical,...l}=t,c=p.useRef(null),d=ea(c,a),m=os(o),x=Zt(r)===as.LTR,j=Ht(t.onKeyDown,I=>{if(!ss.includes(I.key))return;const h=m(),v=I.target,D=h.filter(([,pe])=>!pe.element.disabled),y=D.findIndex(([,pe])=>pe.element===v),k=D.size;if(y===-1)return;I.preventDefault();let f=y;const C=0,A=k-1,g=_(()=>{f=y+1,f>A&&(f=C)},"moveNext"),b=_(()=>{f=y-1,f<C&&(f=A)},"movePrev");switch(I.key){case"Home":f=C;break;case"End":f=A;break;case"ArrowRight":i===Y.Horizontal&&(x?g():b());break;case"ArrowDown":i===Y.Vertical&&g();break;case"ArrowLeft":i===Y.Horizontal&&(x?b():g());break;case"ArrowUp":i===Y.Vertical&&b();break}const q=f%k;D.at(q)?.element.focus()});return e.jsx(ms,{scope:o,disabled:n,direction:r,orientation:i,children:e.jsx(Pe.Slot,{scope:o,children:e.jsx(Xe.div,{...l,"data-orientation":i,ref:d,onKeyDown:n?void 0:j})})})},"AccordionImpl")),be="AccordionItem",[us,we]=re(be),ps=p.forwardRef(_(function(t,a){const{__scopeAccordion:o,value:n,...r}=t,i=ie(be,o),l=is(be,o),c=Se(o),d=Wt(),m=n&&l.value.includes(n)||!1,u=i.disabled||t.disabled;return e.jsx(us,{scope:o,open:m,disabled:u,triggerId:d,children:e.jsx(ta,{"data-orientation":i.orientation,"data-state":Me(m),...c,...r,ref:a,disabled:u,open:m,onOpenChange:x=>{x?l.onItemOpen(n):l.onItemClose(n)}})})},"AccordionItem")),xs="AccordionHeader",hs=p.forwardRef(_(function(t,a){const{__scopeAccordion:o,...n}=t,r=ie(R,o),i=we(xs,o);return e.jsx(Xe.h3,{"data-orientation":r.orientation,"data-state":Me(i.open),"data-disabled":i.disabled?"":void 0,...n,ref:a})},"AccordionHeader")),Be="AccordionTrigger",fs=p.forwardRef(_(function(t,a){const{__scopeAccordion:o,...n}=t,r=ie(R,o),i=we(Be,o),l=ls(Be,o),c=Se(o);return e.jsx(Pe.ItemSlot,{scope:o,children:e.jsx(aa,{"aria-disabled":i.open&&!l.collapsible||void 0,"data-orientation":r.orientation,id:i.triggerId,...c,...n,ref:a})})},"AccordionTrigger")),gs="AccordionContent",Is=p.forwardRef(_(function(t,a){const{__scopeAccordion:o,...n}=t,r=ie(R,o),i=we(gs,o),l=Se(o);return e.jsx(sa,{role:"region","aria-labelledby":i.triggerId,"data-orientation":r.orientation,...l,...n,ref:a,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...t.style}})},"AccordionContent"));function Me(s){return s?"open":"closed"}_(Me,"getState");function le({...s}){return e.jsx(rs,{"data-slot":"accordion",...s})}function ce({className:s,...t}){return e.jsx(ps,{"data-slot":"accordion-item",className:w("border-b last:border-b-0",s),...t})}function Q({className:s,children:t,...a}){return e.jsx(hs,{className:"flex",children:e.jsxs(fs,{"data-slot":"accordion-trigger",className:w("focus-visible:border-ring focus-visible:ring-ring/50 flex flex-1 items-start justify-between gap-4 rounded-md py-4 text-left text-sm font-medium transition-all outline-none hover:underline focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 [&[data-state=open]>svg]:rotate-180",s),...a,children:[t,e.jsx(na,{className:"text-muted-foreground pointer-events-none size-4 shrink-0 translate-y-0.5 transition-transform duration-200"})]})})}function de({className:s,children:t,...a}){return e.jsx(Is,{"data-slot":"accordion-content",className:"data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-sm",...a,children:e.jsx("div",{className:w("pt-0 pb-4",s),children:t})})}function js({frameGroup:s,updateFrameGroup:t}){const{canWrite:a}=W(),[o,n]=p.useState(!1),[r,i]=ee(s.name||""),l=r!==s.name;return e.jsx(le,{type:"single",collapsible:!0,className:"border-b",defaultValue:"basics",children:e.jsxs(ce,{value:"basics",children:[e.jsx(Q,{className:"group flex w-full items-center justify-between px-4 text-base",children:"Basics"}),e.jsxs(de,{className:"space-y-4 px-4 pt-2",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(B,{htmlFor:"group-name",children:"Name"}),e.jsx(ae,{id:"group-name",value:r,autoCorrect:"off",autoComplete:"off",autoCapitalize:"off",disabled:o,onChange:c=>i(c.target.value),placeholder:"Enter group name",className:"!h-14 w-full !rounded-[0.75rem]"})]}),l&&e.jsx("div",{className:"flex justify-start",children:e.jsxs(S,{size:"lg",variant:"outline",className:"h-11 rounded-[0.75rem]",disabled:!a,onClick:async()=>{try{n(!0),await t({name:r,locationX:s.locationX??0,locationY:s.locationY??0,width:s.width??0,height:s.height??0})}catch{F.error("Failed to update group")}finally{n(!1)}},children:[e.jsx(V,{loading:o}),"Save Changes"]})})]})]})})}const vs=N(`
|
|
98
|
+
query Components($orgId: ID!) {
|
|
99
|
+
components(orgId: $orgId) {
|
|
100
|
+
components {
|
|
101
|
+
componentId
|
|
102
|
+
type
|
|
103
|
+
name
|
|
104
|
+
description
|
|
105
|
+
tags
|
|
106
|
+
category
|
|
107
|
+
slug
|
|
108
|
+
previewImageJpg
|
|
109
|
+
isActive
|
|
110
|
+
order
|
|
111
|
+
componentFields {
|
|
112
|
+
componentFieldId
|
|
113
|
+
label
|
|
114
|
+
type
|
|
115
|
+
required
|
|
116
|
+
readonly
|
|
117
|
+
options
|
|
118
|
+
order
|
|
119
|
+
}
|
|
120
|
+
createdAt
|
|
121
|
+
updatedAt
|
|
122
|
+
}
|
|
123
|
+
customComponents {
|
|
124
|
+
componentId
|
|
125
|
+
type
|
|
126
|
+
name
|
|
127
|
+
description
|
|
128
|
+
tags
|
|
129
|
+
category
|
|
130
|
+
slug
|
|
131
|
+
previewImageJpg
|
|
132
|
+
isActive
|
|
133
|
+
order
|
|
134
|
+
componentFields {
|
|
135
|
+
componentFieldId
|
|
136
|
+
label
|
|
137
|
+
type
|
|
138
|
+
required
|
|
139
|
+
readonly
|
|
140
|
+
options
|
|
141
|
+
order
|
|
142
|
+
}
|
|
143
|
+
createdAt
|
|
144
|
+
updatedAt
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
`);function bs(){const s=O()?.id,{data:t,loading:a}=M(vs,{variables:{orgId:s},skip:!s,fetchPolicy:"cache-first"});return{focalPointGroups:p.useMemo(()=>{const n=$(t?.components?.components),r=$(t?.components?.customComponents),i=[...n,...r],l={};for(const c of i){const d=c.category?.trim()||"Other";l[d]||(l[d]={name:d,components:[]}),l[d].components.push(ys(c))}return Object.values(l)},[t]),loading:a&&!t?.components?.components}}function ys(s){return{...s,componentFields:$(s.componentFields).map(t=>({...t,options:$(t.options)}))}}const Cs="component_backend-flow-diagram",Ns="component_api-contract",Ds="component_support-kb-troubleshooting",fe="!h-[56px] w-full rounded-[16px] border border-[#2A3242] bg-transparent px-6 text-[#F4F7FC] focus:outline-none",ge="flex !h-[56px] w-full items-center gap-2 rounded-[16px] border border-[#2A3242] bg-transparent px-6 focus:outline-none",Fs=X({serviceId:T(),apiGroupId:T(),apiEndpointId:T()});function $s({onSelect:s}){const t=O().id,a=oe({resolver:ne(Fs),defaultValues:{serviceId:"",apiGroupId:"",apiEndpointId:""}}),o=a.watch("serviceId"),n=a.watch("apiGroupId"),{data:r,loading:i}=M(Ce,{variables:{orgId:t},fetchPolicy:"cache-first",skip:!t}),{data:l,loading:c}=M(fa,{variables:{orgId:t,serviceId:o},fetchPolicy:"cache-first",skip:!t||!o}),{data:d,loading:m}=M(ga,{variables:{orgId:t,serviceId:o,apiGroupId:n},fetchPolicy:"cache-first",skip:!t||!o||!n}),u=p.useMemo(()=>$(r?.services.items),[r]),x=p.useMemo(()=>$(l?.apiGroups).map(pa),[l]),j=p.useMemo(()=>$(d?.apiEndpoints).map(h=>{const v=st(h,t),D=$(v.componentMeta?.componentModalFields),y=Ne(D,D),k=D.find(g=>g?.label?.toLowerCase()==="name")?.componentFieldId,f=k?y[k]:null,C=h.method.toUpperCase(),A=String(f||h.summary||"");return{value:v.apiEndpoint.apiEndpointId??"",label:`${C} ${h.path} ${A}`,node:e.jsxs("span",{className:"flex items-center gap-3",children:[e.jsx(at,{method:C}),e.jsxs("span",{className:"flex flex-col",children:[e.jsx("span",{className:"text-foreground font-mono font-semibold",children:h.path}),A&&e.jsx("span",{className:"text-muted-foreground text-sm",children:A})]})]})}}),[d,t]);return e.jsx(L,{title:"Select API Contract",description:"Select the API contract to link to this focal point",onFooterSubmitClick:a.handleSubmit(s),footerSubmitLoading:a.formState.isSubmitting,footerSubmit:"Connect API Contract",footerCancel:!0,children:e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(B,{className:"text-foreground text-sm font-medium",children:"Service"}),i?e.jsxs("div",{className:ge,children:[e.jsx(U,{className:"h-4 w-4 animate-spin"}),e.jsx("span",{className:"text-sm text-[#828DA3]",children:"Loading services..."})]}):e.jsx(H,{value:o,options:u.map(I=>({value:I.id??"",label:I.name??""})),onChange:I=>{a.setValue("serviceId",I),a.setValue("apiGroupId",""),a.setValue("apiEndpointId","")},className:fe})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(B,{className:"text-foreground text-sm font-medium",children:"API Group"}),c?e.jsxs("div",{className:ge,children:[e.jsx(U,{className:"h-4 w-4 animate-spin"}),e.jsx("span",{className:"text-sm text-[#828DA3]",children:"Loading API groups..."})]}):e.jsx(H,{value:n,options:x.map(I=>({value:I.serviceApiGroupId??"",label:I.name??I.version??""})),disabled:c||!o,onChange:I=>a.setValue("apiGroupId",I),className:fe})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(B,{className:"text-foreground text-sm font-medium",children:"API Endpoint"}),m?e.jsxs("div",{className:ge,children:[e.jsx(U,{className:"h-4 w-4 animate-spin"}),e.jsx("span",{className:"text-sm text-[#828DA3]",children:"Loading API endpoints..."})]}):e.jsx(H,{value:a.watch("apiEndpointId"),options:j,disabled:m||!n,onChange:I=>a.setValue("apiEndpointId",I),className:fe})]})]})})}function As({open:s,onOpenChange:t,onConfirm:a}){const[o,n]=p.useState(!1);return e.jsx(Ae,{open:s,onOpenChange:t,className:"!max-w-[463px]",children:e.jsxs("div",{className:"p-6 text-center",children:[e.jsx("img",{src:nt,alt:"trash",className:"mx-auto mb-4"}),e.jsx(J,{className:"text-textPrimary pt-8 text-[1rem] leading-[1.33] font-semibold",children:"Do you want to delete this focal point meta data?"}),e.jsx(Z,{className:"text-textSecondary pt-4 text-sm leading-[1.33] font-normal",children:"Deleting this focal point meta data is a permanent action and cannot be undone. Please think carefully before proceeding."}),e.jsxs("div",{className:"flex space-x-3 pt-8 *:flex-1",children:[e.jsxs(S,{variant:"outline",className:"h-14 rounded-[13px] border border-[#CD454380] bg-[#CD45434D] text-sm font-normal text-[#E92A19] hover:bg-[#CD4543] hover:text-white",onClick:async()=>{n(!0),await a(),n(!1),t(!1)},children:[o&&e.jsx(V,{}),"Permanently Delete"]}),e.jsx(S,{onClick:()=>t(!1),className:"h-14 rounded-[13px] text-sm font-normal text-white",children:"Cancel"})]})]})})}const Ie=12,je="__all__",Ps="!h-11 rounded-[16px] text-sm";function Ss({onSelect:s}){const t=O()?.id,[a,o]=p.useState(null),[n,r]=p.useState(null),[i,l]=p.useState(""),[c,d]=p.useState(0),m=Fa(i),u=M(Ce,{variables:{orgId:t},skip:!t,fetchPolicy:"cache-first"}),{data:x,loading:j}=M(Da,{variables:{orgId:t,serviceId:n,search:m||null,sortBy:"created",sortDir:"desc",limit:Ie,offset:c*Ie},skip:!t,fetchPolicy:"cache-and-network"}),I=$(u.data?.services.items),h=$(x?.diagrams.items),v=x?.diagrams.totalCount??0,D=Math.ceil(v/Ie),y=!!(n||m);function k(){d(0)}function f(g){r(g===je?null:g),k()}function C(g){l(g),k()}async function A(g){if(!a)try{o(g),await s(g)}finally{o(null)}}return e.jsx(L,{title:"Select Diagram",description:"Select a diagram to link to this focal point",className:"flex min-h-0 flex-col !overflow-hidden",children:e.jsxs("div",{className:"flex h-full flex-col gap-4",children:[e.jsxs("div",{className:"flex shrink-0 flex-col gap-3 sm:flex-row sm:items-center",children:[e.jsx(ae,{value:i,onChange:g=>C(g.target.value),placeholder:"Search diagrams",className:"border-stock bg-input h-11 flex-1 rounded-[16px] px-4 text-sm"}),e.jsx(H,{value:n??je,onChange:f,placeholder:"All Services",className:`${Ps} sm:w-44`,options:[{value:je,label:"All Services"},...I.map(g=>({value:g.id??"",label:g.name??""}))]})]}),e.jsx("div",{className:"min-h-0 flex-1 overflow-auto",children:j&&h.length===0?e.jsx(We,{label:"Loading diagrams..."}):h.length===0?e.jsx("div",{className:"py-8 text-center",children:e.jsx("p",{className:"text-muted-foreground text-sm",children:y?"No diagrams match your filters.":"No diagrams available"})}):e.jsx("div",{className:"grid grid-cols-3 content-start gap-4",children:h.map(g=>e.jsxs("div",{className:"group bg-card border-stock hover:border-primary/50 relative rounded-lg border-2 p-3 transition-all",children:[e.jsxs("div",{className:"relative overflow-hidden rounded-md",children:[e.jsx("img",{alt:g.name??"Blank Diagram",src:g.previewImageUrl??"/placeholder.svg",className:"aspect-square w-full object-cover object-top"}),e.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-black/50 opacity-0 transition-opacity group-hover:opacity-100",children:e.jsxs(S,{preset:"primary",disabled:a!==null,onClick:()=>A(g.id??""),children:[a===g.id?e.jsx(U,{className:"size-4 animate-spin"}):e.jsx($a,{className:"size-4"}),"Link Diagram"]})})]}),e.jsx("div",{className:"mt-2",children:e.jsx("h4",{className:"text-foreground line-clamp-1 text-sm font-medium",children:g.name??"Blank Diagram"})})]},g.id))})}),D>1&&e.jsxs("div",{className:"flex shrink-0 items-center justify-center gap-3 pt-1",children:[e.jsx(S,{preset:"outline",className:"h-8 px-3 text-sm",disabled:c===0,onClick:()=>d(c-1),children:"Previous"}),e.jsxs("span",{className:"text-muted-foreground text-sm",children:["Page ",c+1," of ",D]}),e.jsx(S,{preset:"outline",className:"h-8 px-3 text-sm",disabled:c>=D-1,onClick:()=>d(c+1),children:"Next"})]})]})})}const ws=N(`
|
|
149
|
+
query ApiEndpointById($orgId: ID!, $id: ID!) {
|
|
150
|
+
apiEndpointById(orgId: $orgId, id: $id) {
|
|
151
|
+
id
|
|
152
|
+
serviceId
|
|
153
|
+
apiGroupId
|
|
154
|
+
method
|
|
155
|
+
path
|
|
156
|
+
summary
|
|
157
|
+
description
|
|
158
|
+
tags
|
|
159
|
+
parameters
|
|
160
|
+
requestBody
|
|
161
|
+
responses
|
|
162
|
+
exampleRequests
|
|
163
|
+
exampleResponses
|
|
164
|
+
updatedAt
|
|
165
|
+
createdAt
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
`),Ms=N(`
|
|
169
|
+
query ServiceDocById($orgId: ID!, $id: ID!) {
|
|
170
|
+
serviceDocById(orgId: $orgId, id: $id) {
|
|
171
|
+
serviceId
|
|
172
|
+
docId
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
`),ks=N(`
|
|
176
|
+
query DocById($orgId: ID!, $id: ID!) {
|
|
177
|
+
doc(orgId: $orgId, id: $id) {
|
|
178
|
+
id
|
|
179
|
+
fileUrl
|
|
180
|
+
fileName
|
|
181
|
+
fileType
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
`);function Es({orgId:s,endpointId:t}){const{data:a,loading:o}=M(ws,{variables:{orgId:s,id:t},fetchPolicy:"cache-first"}),n=a?.apiEndpointById,{data:r}=M(Ia,{variables:{orgId:s,serviceId:n?.serviceId??"",id:n?.apiGroupId??""},fetchPolicy:"cache-first",skip:!n}),i=r?.apiGroup?.protocol??"REST",l=i.toLowerCase();return o?e.jsx(L,{title:"API Contract",children:e.jsxs("div",{className:"flex items-center gap-2 px-6 py-10",children:[e.jsx(U,{className:"h-4 w-4 animate-spin"}),e.jsx("span",{className:"text-paragraph text-sm",children:"Loading API contract..."})]})}):n?e.jsx(Ls,{orgId:s,endpoint:n,protocol:l,protocolLabel:i}):e.jsx(L,{title:"API Contract",children:e.jsx("div",{className:"text-paragraph px-6 py-10 text-sm",children:"API contract not found."})})}function Ls({orgId:s,endpoint:t,protocol:a,protocolLabel:o}){const n=p.useMemo(()=>{const x={id:t.id,apiGroupId:t.apiGroupId,serviceId:t.serviceId,operationId:"",method:t.method,path:t.path,summary:t.summary,description:t.description,tags:t.tags,parameters:t.parameters,requestBody:t.requestBody,responses:t.responses,exampleRequests:t.exampleRequests,exampleResponses:t.exampleResponses,order:0,createdAt:t.createdAt,updatedAt:t.updatedAt};return st(x,s,a)},[t,s,a]),r=p.useMemo(()=>$(n.componentMeta.componentModalFields),[n.componentMeta.componentModalFields]),i=p.useMemo(()=>Ne(r,r),[r]),l=p.useMemo(()=>r.filter(x=>{const j=x.componentFieldId?i[x.componentFieldId]:null;return typeof j=="string"&&j.trim().length>0}),[r,i]),c=p.useMemo(()=>$(n.apiEndpoint.exampleRequests),[n.apiEndpoint.exampleRequests]),d=p.useMemo(()=>$(n.apiEndpoint.exampleResponses),[n.apiEndpoint.exampleResponses]),m=$(t.tags).filter(Boolean),u=t.updatedAt?new Date(t.updatedAt).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"}):null;return e.jsx(L,{className:"p-0",title:e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx(at,{method:t.method||"N/A"}),e.jsx("span",{className:"font-mono break-all",children:t.path})]}),description:e.jsx("span",{className:"text-paragraph text-xs",children:t.summary?.trim()||(u?`Updated ${u}`:o)}),footerCancel:"Close",footerSubmit:"Open API Endpoint",footerAlign:"between",onFooterSubmitClick:()=>window.open(`/services/${t.serviceId}/apis/${t.apiGroupId}?endpointId=${t.id}`),children:e.jsxs("div",{className:"max-h-[70vh] space-y-8 overflow-y-auto px-6 py-6",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-1.5",children:[e.jsx("span",{className:"bg-primary/15 text-primary rounded-md px-2 py-1 text-xs font-medium",children:o}),e.jsx(oa,{tags:m,max:8,tagClassName:"rounded-md bg-[#1E2533] px-2 py-1 text-xs font-medium text-[#828DA3]"})]}),l.length>0&&e.jsx(ye,{theme:"modal",children:e.jsx("div",{className:"space-y-1",children:l.map((x,j)=>{const I=x.componentFieldId?String(i[x.componentFieldId]??""):"";return e.jsx(ut,{label:x.label??"Field",required:!1,componentType:x.type??"unknown",error:null,children:x.type===P.CodeEditor?e.jsx(tt,{readonly:!0,value:xa(x.label??"",I,a),setValue:()=>{}}):x.type===P.TextBox?e.jsx(qe,{readonly:!0,value:I,onChange:()=>{}}):x.type===P.URLInput?e.jsx(Ve,{readonly:!0,value:I,onChange:()=>{}}):e.jsx(He,{readonly:!0,value:I,onChange:()=>{}})},x.componentFieldId??j)})})}),c.length>0&&e.jsx(Ue,{label:"Example Requests",samples:c,protocol:a,kind:"request"}),d.length>0&&e.jsx(Ue,{label:"Example Responses",samples:d,protocol:a,kind:"response"})]})})}function Ue({label:s,samples:t,protocol:a,kind:o}){const[n,r]=p.useState(0),i=t[n]??t[0];return e.jsxs("div",{children:[e.jsxs("div",{className:"mb-2 flex items-center justify-between",children:[e.jsx("div",{className:"text-xs font-medium tracking-wider text-[#828DA3] uppercase",children:s}),t.length>1&&e.jsx("div",{className:"flex items-center gap-1",children:t.map((l,c)=>e.jsx("button",{onClick:()=>r(c),className:w("rounded px-2 py-0.5 text-xs",c===n?"bg-primary/15 text-primary":"text-paragraph hover:bg-[#1E2533]"),children:c+1},c))})]}),e.jsx(ca,{editable:!1,value:ha(i,a,o),className:"overflow-hidden rounded-lg border border-[#2A3242]"})]})}function _s({orgId:s,diagramId:t}){const{data:a,loading:o}=M(Pa,{variables:{orgId:s,id:t},fetchPolicy:"cache-first"}),n=a?.diagram,r=p.useMemo(()=>{const l=a?.diagram?.content;if(!l)return null;const c=Sa(l),d=c.nodes.map(m=>({...m,data:{...m.data,isForcedOpen:!0}}));return{...c,nodes:d}},[a?.diagram?.content]);if(o)return e.jsx(L,{title:"Diagram",children:e.jsxs("div",{className:"flex items-center gap-2 py-6",children:[e.jsx(U,{className:"h-4 w-4 animate-spin"}),e.jsx("span",{className:"text-paragraph text-sm",children:"Loading diagram..."})]})});if(!n)return e.jsx(L,{title:"Diagram",children:e.jsx("div",{className:"text-paragraph py-6 text-sm",children:"Diagram not found."})});const i=n.updatedAt?mt(new Date(n.updatedAt),{addSuffix:!0}):null;return e.jsx(L,{title:n.name,description:i?e.jsxs("span",{className:"text-paragraph text-xs",children:["Updated ",i]}):null,footerCancel:"Close",footerSubmit:"Open Diagram",footerAlign:"between",onFooterSubmitClick:()=>window.open(`/diagram/${n.id}`),children:r?e.jsx("div",{className:"border-stock h-[55vh] w-full overflow-hidden rounded-lg border",children:e.jsx(Ma,{data:r,name:n.name},t)}):e.jsx("div",{className:"text-paragraph flex h-40 w-full items-center justify-center rounded-lg border border-[#2A3242] bg-[#0F1420] text-sm",children:"No diagram content available."})})}const Ts=N(`
|
|
185
|
+
query FocalPoints($orgId: ID!, $mapId: ID!, $frameId: ID!) {
|
|
186
|
+
focalPoints(orgId: $orgId, mapId: $mapId, frameId: $frameId) {
|
|
187
|
+
id
|
|
188
|
+
frameId
|
|
189
|
+
orgId
|
|
190
|
+
name
|
|
191
|
+
locationX
|
|
192
|
+
locationY
|
|
193
|
+
visibility
|
|
194
|
+
color
|
|
195
|
+
isActive
|
|
196
|
+
createdBy
|
|
197
|
+
updatedBy
|
|
198
|
+
createdAt
|
|
199
|
+
updatedAt
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
`),ln=N(`
|
|
203
|
+
mutation CreateFocalPoint(
|
|
204
|
+
$orgId: ID!
|
|
205
|
+
$mapId: ID!
|
|
206
|
+
$frameId: ID!
|
|
207
|
+
$input: CreateFocalPointInput!
|
|
208
|
+
) {
|
|
209
|
+
createFocalPoint(
|
|
210
|
+
orgId: $orgId
|
|
211
|
+
mapId: $mapId
|
|
212
|
+
frameId: $frameId
|
|
213
|
+
input: $input
|
|
214
|
+
) {
|
|
215
|
+
id
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
`),cn=N(`
|
|
219
|
+
mutation UpdateFocalPoint(
|
|
220
|
+
$orgId: ID!
|
|
221
|
+
$mapId: ID!
|
|
222
|
+
$frameId: ID!
|
|
223
|
+
$id: ID!
|
|
224
|
+
$input: UpdateFocalPointInput!
|
|
225
|
+
) {
|
|
226
|
+
updateFocalPoint(
|
|
227
|
+
orgId: $orgId
|
|
228
|
+
mapId: $mapId
|
|
229
|
+
frameId: $frameId
|
|
230
|
+
id: $id
|
|
231
|
+
input: $input
|
|
232
|
+
) {
|
|
233
|
+
id
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
`),dn=N(`
|
|
237
|
+
mutation DeleteFocalPoint($orgId: ID!, $mapId: ID!, $frameId: ID!, $id: ID!) {
|
|
238
|
+
deleteFocalPoint(orgId: $orgId, mapId: $mapId, frameId: $frameId, id: $id)
|
|
239
|
+
}
|
|
240
|
+
`),mn=N(`
|
|
241
|
+
query Frames(
|
|
242
|
+
$orgId: ID!
|
|
243
|
+
$mapId: ID!
|
|
244
|
+
$search: String
|
|
245
|
+
$sortBy: String
|
|
246
|
+
$sortDir: String
|
|
247
|
+
$limit: Int
|
|
248
|
+
$offset: Int
|
|
249
|
+
) {
|
|
250
|
+
frames(
|
|
251
|
+
orgId: $orgId
|
|
252
|
+
mapId: $mapId
|
|
253
|
+
search: $search
|
|
254
|
+
sortBy: $sortBy
|
|
255
|
+
sortDir: $sortDir
|
|
256
|
+
limit: $limit
|
|
257
|
+
offset: $offset
|
|
258
|
+
) {
|
|
259
|
+
totalCount
|
|
260
|
+
items {
|
|
261
|
+
id
|
|
262
|
+
mapId
|
|
263
|
+
orgId
|
|
264
|
+
parentFrameId
|
|
265
|
+
name
|
|
266
|
+
description
|
|
267
|
+
templateType
|
|
268
|
+
screenshotAssetId
|
|
269
|
+
screenshotImageUrl
|
|
270
|
+
screenshotContentHash
|
|
271
|
+
status
|
|
272
|
+
order
|
|
273
|
+
source
|
|
274
|
+
focalPointCount
|
|
275
|
+
createdBy
|
|
276
|
+
updatedBy
|
|
277
|
+
createdByCommitHash
|
|
278
|
+
updatedByCommitHash
|
|
279
|
+
createdAt
|
|
280
|
+
updatedAt
|
|
281
|
+
createdByActor {
|
|
282
|
+
id
|
|
283
|
+
name
|
|
284
|
+
avatarUrl
|
|
285
|
+
type
|
|
286
|
+
email
|
|
287
|
+
}
|
|
288
|
+
updatedByActor {
|
|
289
|
+
id
|
|
290
|
+
name
|
|
291
|
+
avatarUrl
|
|
292
|
+
type
|
|
293
|
+
email
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
`),Os=N(`
|
|
299
|
+
query FrameById($orgId: ID!, $id: ID!) {
|
|
300
|
+
frameById(orgId: $orgId, id: $id) {
|
|
301
|
+
id
|
|
302
|
+
mapId
|
|
303
|
+
orgId
|
|
304
|
+
parentFrameId
|
|
305
|
+
name
|
|
306
|
+
description
|
|
307
|
+
templateType
|
|
308
|
+
screenshotAssetId
|
|
309
|
+
screenshotImageUrl
|
|
310
|
+
screenshotContentHash
|
|
311
|
+
status
|
|
312
|
+
order
|
|
313
|
+
source
|
|
314
|
+
focalPointCount
|
|
315
|
+
createdBy
|
|
316
|
+
updatedBy
|
|
317
|
+
createdByCommitHash
|
|
318
|
+
updatedByCommitHash
|
|
319
|
+
createdAt
|
|
320
|
+
updatedAt
|
|
321
|
+
createdByActor {
|
|
322
|
+
id
|
|
323
|
+
name
|
|
324
|
+
avatarUrl
|
|
325
|
+
type
|
|
326
|
+
email
|
|
327
|
+
}
|
|
328
|
+
updatedByActor {
|
|
329
|
+
id
|
|
330
|
+
name
|
|
331
|
+
avatarUrl
|
|
332
|
+
type
|
|
333
|
+
email
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
`),un=N(`
|
|
338
|
+
mutation CreateFrame($orgId: ID!, $mapId: ID!, $input: CreateFrameInput!) {
|
|
339
|
+
createFrame(orgId: $orgId, mapId: $mapId, input: $input) {
|
|
340
|
+
id
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
`),pn=N(`
|
|
344
|
+
mutation UpdateFrame(
|
|
345
|
+
$orgId: ID!
|
|
346
|
+
$mapId: ID!
|
|
347
|
+
$id: ID!
|
|
348
|
+
$input: UpdateFrameInput!
|
|
349
|
+
) {
|
|
350
|
+
updateFrame(orgId: $orgId, mapId: $mapId, id: $id, input: $input) {
|
|
351
|
+
id
|
|
352
|
+
}
|
|
353
|
+
}
|
|
354
|
+
`),xn=N(`
|
|
355
|
+
mutation DeleteFrame($orgId: ID!, $mapId: ID!, $id: ID!) {
|
|
356
|
+
deleteFrame(orgId: $orgId, mapId: $mapId, id: $id)
|
|
357
|
+
}
|
|
358
|
+
`),hn=N(`
|
|
359
|
+
query Maps(
|
|
360
|
+
$orgId: ID!
|
|
361
|
+
$folderId: ID
|
|
362
|
+
$teamId: ID
|
|
363
|
+
$search: String
|
|
364
|
+
$sortBy: String
|
|
365
|
+
$sortDir: String
|
|
366
|
+
$limit: Int
|
|
367
|
+
$offset: Int
|
|
368
|
+
) {
|
|
369
|
+
maps(
|
|
370
|
+
orgId: $orgId
|
|
371
|
+
folderId: $folderId
|
|
372
|
+
teamId: $teamId
|
|
373
|
+
search: $search
|
|
374
|
+
sortBy: $sortBy
|
|
375
|
+
sortDir: $sortDir
|
|
376
|
+
limit: $limit
|
|
377
|
+
offset: $offset
|
|
378
|
+
) {
|
|
379
|
+
totalCount
|
|
380
|
+
items {
|
|
381
|
+
id
|
|
382
|
+
orgId
|
|
383
|
+
folderId
|
|
384
|
+
teamId
|
|
385
|
+
name
|
|
386
|
+
description
|
|
387
|
+
status
|
|
388
|
+
createdBy
|
|
389
|
+
updatedBy
|
|
390
|
+
createdAt
|
|
391
|
+
updatedAt
|
|
392
|
+
previewImgUrls
|
|
393
|
+
}
|
|
394
|
+
}
|
|
395
|
+
}
|
|
396
|
+
`),fn=N(`
|
|
397
|
+
query Map($orgId: ID!, $id: ID!) {
|
|
398
|
+
map(orgId: $orgId, id: $id) {
|
|
399
|
+
id
|
|
400
|
+
orgId
|
|
401
|
+
folderId
|
|
402
|
+
teamId
|
|
403
|
+
name
|
|
404
|
+
description
|
|
405
|
+
status
|
|
406
|
+
createdBy
|
|
407
|
+
updatedBy
|
|
408
|
+
createdAt
|
|
409
|
+
updatedAt
|
|
410
|
+
}
|
|
411
|
+
}
|
|
412
|
+
`),gn=Ra`
|
|
413
|
+
mutation CreateMap($orgId: ID!, $input: CreateMapInput!) {
|
|
414
|
+
createMap(orgId: $orgId, input: $input) {
|
|
415
|
+
id
|
|
416
|
+
}
|
|
417
|
+
}
|
|
418
|
+
`,In=N(`
|
|
419
|
+
mutation UpdateMap($orgId: ID!, $id: ID!, $input: UpdateMapInput!) {
|
|
420
|
+
updateMap(orgId: $orgId, id: $id, input: $input) {
|
|
421
|
+
id
|
|
422
|
+
}
|
|
423
|
+
}
|
|
424
|
+
`),jn=N(`
|
|
425
|
+
mutation DeleteMap($orgId: ID!, $id: ID!) {
|
|
426
|
+
deleteMap(orgId: $orgId, id: $id)
|
|
427
|
+
}
|
|
428
|
+
`);function Rs({pageId:s,focalPointId:t}){const a=O()?.id,n=M(Os,{fetchPolicy:"cache-first",variables:{orgId:a,id:s},skip:!a||!s}).data?.frameById?.mapId??"",{data:r}=M(Ts,{fetchPolicy:"cache-first",variables:{orgId:a,mapId:n,frameId:s},skip:!a||!n||!s}),i=p.useMemo(()=>r?.focalPoints?.find(l=>l?.id===t)?.name,[r?.focalPoints,t]);return i?e.jsxs("span",{className:"text-paragraph ml-2 text-xs",children:["(",i,")"]}):null}function Bs(s){const t={};return s.forEach(a=>{let o;const n=a.componentFieldId;if(n){switch(a.type){case E.TextInput:case E.TextBox:case E.DropdownSelect:case E.DatePicker:{var r;const u=T();o=a.required?u.min(1,{message:`${(r=a.label)!==null&&r!==void 0?r:"Field"} is required`}):u.optional();break}case E.FileUpload:case E.LinkOrFileUpload:{var i;const u=X({fileId:T().optional(),url:T().optional(),file:ba(File).optional()});o=a.required?u.refine(x=>{var j,I,h,v;return((j=(I=x.url)===null||I===void 0?void 0:I.length)!==null&&j!==void 0?j:0)>0||((h=(v=x.fileId)===null||v===void 0?void 0:v.length)!==null&&h!==void 0?h:0)>0||x.file instanceof File},{message:`${(i=a.label)!==null&&i!==void 0?i:"Field"} is required`}):u.optional();break}case E.URLInput:{var l;const u=T({message:"Invalid URL"});o=a.required?u.min(1,{message:`${(l=a.label)!==null&&l!==void 0?l:"Field"} is required`}):u.optional().or(va(""));break}case E.NumberInput:{var c;let u=Na();const x=a.min,j=a.max;typeof x=="number"&&(u=u.min(x,{message:`Must be ≥ ${x}`})),typeof j=="number"&&(u=u.max(j,{message:`Must be ≤ ${j}`})),o=a.required?u.nullable().refine(I=>I!==null,{message:`${(c=a.label)!==null&&c!==void 0?c:"Field"} is required`}):u.nullable().optional();break}case E.CheckboxGroup:case E.MultiSelect:case E.TagInput:{var d;const u=Ca(T());o=a.required?u.min(1,{message:`${(d=a.label)!==null&&d!==void 0?d:"Field"} is required`}):u.optional();break}case E.BooleanToggle:{const u=ya();o=a.required?u:u.optional();break}default:if(a.required){var m;o=Ee().refine(u=>{if(a.type===E.RichTextEditor&&u instanceof Ua){var x,j,I;if(!u.ops.length)return!1;const h=new Ga(document.createElement("div"));h==null||(x=h.setContents)===null||x===void 0||x.call(h,u);const v=h==null||(j=h.getText)===null||j===void 0?void 0:j.call(h).trim();return((I=v?.length)!==null&&I!==void 0?I:0)>0}return Array.isArray(u)?u.length>0:u!=null&&u!==""},{message:`${(m=a.label)!==null&&m!==void 0?m:"Field"} is required`})}else o=Ee().optional();break}t[n]=o}}),X(t)}function Us({title:s,fields:t,setFields:a,doneEditing:o}){const[n,r]=ee(t);return e.jsxs(e.Fragment,{children:[e.jsxs(Fe,{className:"border-stock h-[6.1rem] border-b p-6",children:[e.jsx(J,{asChild:!0,children:e.jsxs("h3",{children:[s," - Layout"]})}),e.jsx(Z,{asChild:!0,children:e.jsx("p",{className:"text-paragraph mt-2 text-sm",children:"Customize the layout of the focal point by adding or removing fields."})})]}),e.jsx("div",{className:"max-h-full overflow-auto p-6",children:e.jsxs(ye,{theme:"modal",children:[e.jsx(Ct,{componentFields:n,setComponentFields:r}),e.jsx("div",{className:"mt-6",children:e.jsx(Nt,{setComponentFields:r})})]})}),e.jsxs($e,{className:"border-stock border-t p-6 pt-2",children:[e.jsx(S,{preset:"outline",className:"h-11 rounded-[0.8125rem]",children:"Cancel"}),e.jsxs(S,{preset:"cta",className:"h-11 rounded-[0.8125rem] !px-5",onClick:()=>{a(n),o()},children:[e.jsx(Yt,{className:"text-lg"}),"Done"]})]})]})}function Gs({title:s,description:t,fields:a,submit:o,submitLabel:n,isViewMode:r=!1,isReadOnly:i=!1,setEditMode:l}){const c=p.useRef(null),d=p.useMemo(()=>Ne(a,a),[a]),m=p.useMemo(()=>Bs(a),[a]),{formState:u,handleSubmit:x,control:j}=oe({resolver:ne(m),defaultValues:d,values:d}),I=O()?.id,[h,v]=p.useState(!1),[D,y]=p.useState(!1);async function k(f){v(!0);const C={...f},A=Object.fromEntries(Object.entries(f).filter(([g,b])=>b?.file instanceof File).map(([g,b])=>[g,b.file]));if(Object.keys(A).length>0){y(!0);for(const g in A){const b=A[g],q=await Ba(I,b);C[g]={fileId:q}}y(!1)}o(ja(a,C).map(g=>{const{readonly:b,...q}=g;return{...q,isReadonly:q.isReadonly??b??null,options:$(q.options)}})).then(()=>{v(!1)}).catch(g=>{console.error("Submission error:",g),v(!1)})}return e.jsxs(e.Fragment,{children:[e.jsxs(Fe,{className:"border-stock min-h-[6.1rem] gap-2.5 border-b p-6",children:[e.jsx(J,{asChild:!0,children:e.jsx("h3",{children:s})}),e.jsx(Z,{asChild:!0,children:e.jsx("p",{className:"text-paragraph text-sm",children:t})})]}),e.jsx("div",{ref:c,className:"max-h-full overflow-auto p-6 pb-0",onFocus:f=>{r&&f.target.blur()},children:e.jsx(ye,{theme:"modal",children:e.jsx("div",{className:w(r&&"pointer-events-none"),children:a.map((f,C)=>e.jsx(ot,{control:j,name:f.componentFieldId,render:({field:A})=>{const g=A.value,b=A.onChange;return e.jsxs(ut,{label:f.label??"Label",required:!i&&(f.required??!1),componentType:f.type??"unknown",error:u.errors[f.componentFieldId]?.message?.toString(),children:[f.type===P.NumberInput&&e.jsx(Dt,{value:g??"",onChange:b}),f.type===P.TextInput&&e.jsx(He,{value:g??"",onChange:b}),f.type===P.TextBox&&e.jsx(qe,{value:g??"",onChange:b}),f.type===P.URLInput&&e.jsx(Ve,{value:g??"",onChange:b}),f.type===P.FileUpload&&e.jsx(Ft,{file:g??null,isViewMode:r,onChange:b}),f.type===P.LinkOrFileUpload&&e.jsx($t,{value:g??null,isViewMode:r,onChange:b}),f.type===P.DropdownSelect&&e.jsx(At,{options:$(f.options),value:g??"",onChange:b,required:f.required??void 0}),f.type===P.RichTextEditor&&e.jsx(da,{value:g??"",setValue:b}),f.type===P.CodeEditor&&e.jsx(tt,{height:"10rem",value:g??"",setValue:b}),f.type===P.KeyValueList&&e.jsx(Pt,{value:g??[],onChange:b}),f.type===P.BooleanToggle&&e.jsx(St,{checked:!!g,onChange:b}),f.type===P.MultiSelect&&e.jsx(wt,{options:$(f.options),value:g??[],onChange:b}),f.type===P.SearchSelect&&e.jsx(Mt,{options:$(f.options),value:g??"",onChange:b,required:f.required??void 0}),f.type===P.CheckboxGroup&&e.jsx(kt,{value:g??[],onChange:b,options:$(f.options)}),f.type===P.TagInput&&e.jsx(Et,{value:g??[],onChange:b}),f.type===P.DatePicker&&e.jsx(Lt,{value:g??null,onChange:b}),f.type===P.DateRangePicker&&e.jsx(_t,{value:g??null,onChange:b}),f.type===P.ColorPicker&&e.jsx(Tt,{value:g??null,onChange:b}),f.type===P.Slider&&e.jsx(Ot,{value:g??null,onChange:b})]})}},f.componentFieldId??C))})})}),e.jsxs($e,{className:"border-stock flex-row items-center justify-end border-t p-6 pt-2 pb-3 sm:pb-6",children:[i&&e.jsxs("p",{className:"text-paragraph mr-auto text-sm",children:["This component is linked to a service and cannot be edited here.",e.jsx("br",{}),"You can edit the component in the service."]}),e.jsx(De,{asChild:!0,children:e.jsx(S,{preset:"outline",disabled:h,className:"h-11 rounded-[0.8125rem]",children:r?"Close":"Cancel"})}),!i&&e.jsxs(S,{preset:"cta",disabled:h||i,className:"h-11 rounded-[0.8125rem]",onClick:()=>{if(r&&l)return l();x(k,()=>{const f=c.current;if(!f)return;const C=f.querySelector("[data-has-error]");C&&C.scrollIntoView({behavior:"smooth",block:"center"})})()},children:[e.jsx("div",{className:"flex w-4 items-center justify-center",children:h?e.jsx(V,{className:"text-base"}):r?e.jsx(ra,{className:"text-lg"}):e.jsx(Rt,{className:"text-lg"})}),D?"Uploading File":r?"Start Editing":n]})]})]})}function zs({isOpen:s,setIsOpen:t,isViewMode:a=!1,...o}){const n=p.useMemo(()=>o.fields.filter(d=>d.type).sort((d,m)=>(d.order??0)-(m.order??0)),[o.fields]),[r,i]=p.useState(n),[l,c]=p.useState(!1);return e.jsxs(e.Fragment,{children:[l?e.jsx(Us,{title:o.title,fields:r,setFields:i,doneEditing:()=>c(!1)}):e.jsx(Gs,{...o,isViewMode:a,fields:r}),l?e.jsx(K,{className:"absolute top-3 right-3",onClick:()=>c(!1)}):e.jsxs(e.Fragment,{children:[e.jsx(De,{asChild:!0,children:e.jsx(K,{className:"absolute top-3 right-3"})}),!a&&e.jsx("button",{onClick:()=>c(!0),className:"hover:bg-stock absolute top-4 right-14 rounded-md p-2",children:e.jsx(Kt,{})})]})]})}function qs({isOpen:s,setIsOpen:t,...a}){return e.jsx(it,{open:s,onOpenChange:t,children:e.jsx(lt,{showCloseButton:!1,className:"h-full max-h-full w-full max-w-full grid-rows-[auto_1fr_auto] gap-0 rounded-none border border-[#2A3242] bg-[#141925] p-0 sm:h-auto sm:max-h-[95%] sm:max-w-[min(43rem,95%)] sm:rounded-[1rem]",children:e.jsx(zs,{isOpen:s,setIsOpen:t,...a})})})}function Vs({orgId:s,serviceDocId:t}){const{data:a,loading:o}=M(ks,{variables:{orgId:s,id:t},fetchPolicy:"cache-first"}),{data:n}=M(Ms,{variables:{orgId:s,id:t},fetchPolicy:"cache-first"}),r=a?.doc,i=n?.serviceDocById;if(o)return e.jsx(L,{title:"Document",children:e.jsxs("div",{className:"flex items-center gap-2 py-6",children:[e.jsx(U,{className:"h-4 w-4 animate-spin"}),e.jsx("span",{className:"text-paragraph text-sm",children:"Loading document..."})]})});if(!r)return e.jsx(L,{title:"Document",children:e.jsx("div",{className:"text-paragraph py-6 text-sm",children:"Document not found."})});const l=za(r.fileType,r.fileName);return e.jsx(L,{className:l?"p-0":"",title:r.fileName?.trim()||"Document",description:r.fileType?e.jsx("span",{className:"text-paragraph text-xs",children:r.fileType}):null,footerCancel:"Close",footerSubmit:"Open Document",footerAlign:"between",onFooterSubmitClick:()=>window.open(`/services/${i?.serviceId??""}/docs?open=${i?.docId??r.id}`),children:e.jsx("div",{style:l?{padding:0,width:"100%"}:{width:"100%"},children:e.jsx(qa,{fileURL:r.fileUrl,fileName:r.fileName,fileType:r.fileType})})})}function me({index:s,component:t,pointMeta:a,showFocalPointName:o,openDeleteConfirmationModal:n,onClick:r,hasLink:i,showPreview:l,previewImageUrl:c,nameOverride:d}){const m=p.useMemo(()=>$(a.componentModalFields),[a.componentModalFields]),u=ma(m,{label:"Name"}),x=m.length,j=d?.trim()||u?.trim()||`${t.name} ${s+1}`;return e.jsxs("button",{className:"group relative flex w-full items-center justify-between gap-3 overflow-hidden rounded-lg border border-[#2A3242] bg-[#1E2533] px-4 py-3 text-left transition-all hover:border-[#3B6BFF]/40",onClick:r,children:[e.jsxs("div",{className:"flex min-w-0 items-center gap-3",children:[l&&(c?e.jsx("img",{alt:j,src:c,className:"size-9 shrink-0 rounded-md border border-[#2A3242] bg-[#0F1420] object-contain p-0.5"}):e.jsx("span",{className:"flex size-9 shrink-0 items-center justify-center rounded-md border border-[#2A3242] bg-[#0F1420]",children:e.jsx(Xt,{className:"text-paragraph size-4"})})),e.jsxs("div",{className:"min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-1.5",children:[i&&e.jsx(se,{className:"text-primary size-3 shrink-0"}),e.jsxs("span",{className:"text-foreground block truncate text-sm font-medium",children:[j,o&&e.jsx(Rs,{pageId:a.frameId,focalPointId:a.focalPointId})]})]}),a.updatedAt&&e.jsxs("span",{className:"text-paragraph mt-0.5 block text-[10px] tracking-wide",children:["Updated"," ",mt(new Date(a.updatedAt),{addSuffix:!0})]})]})]}),e.jsxs("div",{className:"flex items-center gap-3",children:[x>0&&e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx("div",{className:"flex -space-x-0.5",children:Array.from({length:Math.min(x,4)}).map((I,h)=>e.jsx("div",{className:w("size-1.5 rounded-full",h===0&&"bg-primary",h===1&&"bg-primary/60",h===2&&"bg-primary/30",h>=3&&"bg-primary/15")},h))}),e.jsxs("span",{className:"text-paragraph text-[10px] font-medium tabular-nums",children:[x," field",x>1?"s":""]})]}),e.jsx("span",{className:"text-destructive/80 hover:text-destructive bg-destructive/5 hover:bg-destructive/15 -mr-1 flex size-6 items-center justify-center rounded-sm transition-all",onClick:I=>{I.stopPropagation(),n()},children:e.jsx(Qt,{className:"size-4"})})]})]})}function Hs(s){const t=O()?.id,a=s.pointMeta.componentLinkDiagramId,[o,n]=p.useState(!1),{data:r}=M(wa,{variables:{orgId:t,id:a},skip:!t,fetchPolicy:"cache-first"});return e.jsxs(e.Fragment,{children:[e.jsx(me,{...s,hasLink:!0,showPreview:!0,previewImageUrl:r?.diagram?.previewImageUrl,nameOverride:r?.diagram?.name,onClick:()=>n(!0)}),e.jsx(G,{open:o,onOpenChange:n,children:e.jsx(_s,{orgId:t,diagramId:a})})]})}function Ws(s){const t=O()?.id,[a,o]=p.useState(!1);return e.jsxs(e.Fragment,{children:[e.jsx(me,{...s,hasLink:!0,onClick:()=>o(!0)}),e.jsx(G,{open:a,onOpenChange:o,children:e.jsx(Es,{orgId:t,endpointId:s.pointMeta.componentLinkApiEndpointId})})]})}function Ys(s){const t=O()?.id,[a,o]=p.useState(!1);return e.jsxs(e.Fragment,{children:[e.jsx(me,{...s,hasLink:!0,onClick:()=>o(!0)}),e.jsx(G,{open:a,onOpenChange:o,className:"min-h-[95vh] [--width:min(95vw,100rem)]",children:e.jsx(Vs,{orgId:t,serviceDocId:s.pointMeta.componentLinkServiceDocId})})]})}function Ks({index:s,component:t,pointMeta:a,showFocalPointName:o,openDeleteConfirmationModal:n,updatePointMeta:r}){const[i,l]=p.useState(!1),[c,d]=p.useState("view"),m=p.useMemo(()=>$(a.componentModalFields),[a.componentModalFields]);return e.jsxs(e.Fragment,{children:[e.jsx(me,{index:s,component:t,pointMeta:a,showFocalPointName:o,openDeleteConfirmationModal:n,onClick:()=>l(!0)}),e.jsx(qs,{isOpen:i,setIsOpen:u=>{l(u),d("view")},submitLabel:"Update Now",isViewMode:c==="view",setEditMode:()=>d("edit"),title:`${c==="view"?"":"Edit"} ${t.name} ${s+1||""}`,description:t.description,fields:m,submit:async u=>{try{await r({componentModalFields:u}),F.success("Focal point meta updated successfully")}catch{return void F.error("Failed to update focal point meta. Please try again.")}l(!1),d("view")}})]})}function Xs({setIsLinkModalOpen:s,linkLabel:t}){return e.jsx("div",{className:"flex items-center justify-center gap-1 rounded-[0.8125rem] font-medium",children:t&&e.jsxs(S,{preset:"outline",onClick:()=>s(!0),children:[e.jsx(Aa,{})," Link to ",t]})})}const Ge="!h-[56px] w-full rounded-[16px] border border-[#2A3242] bg-transparent px-6 text-[#F4F7FC] focus:outline-none",ze="flex !h-[56px] w-full items-center gap-2 rounded-[16px] border border-[#2A3242] bg-transparent px-6 focus:outline-none",Qs=X({serviceId:T(),serviceDocId:T()});function Js({onSelect:s}){const t=O().id,a=oe({resolver:ne(Qs),defaultValues:{serviceId:"",serviceDocId:""}}),o=a.watch("serviceId"),{data:n,loading:r}=M(Ce,{variables:{orgId:t},fetchPolicy:"cache-first",skip:!t}),{data:i,loading:l}=M(Va,{variables:{orgId:t,serviceId:o},fetchPolicy:"cache-first",skip:!t||!o}),c=p.useMemo(()=>$(n?.services.items),[n]),d=p.useMemo(()=>$(i?.serviceDocs).map(m=>m.doc).filter(m=>!!m),[i]);return e.jsx(L,{title:"Select Documentation",description:"Select the document to link to this focal point",onFooterSubmitClick:a.handleSubmit(s),footerSubmitLoading:a.formState.isSubmitting,footerSubmit:"Connect Document",footerCancel:!0,children:e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(B,{className:"text-foreground text-sm font-medium",children:"Service"}),r?e.jsxs("div",{className:ze,children:[e.jsx(U,{className:"h-4 w-4 animate-spin"}),e.jsx("span",{className:"text-sm text-[#828DA3]",children:"Loading services..."})]}):e.jsx(H,{value:o,options:c.map(m=>({value:m.id??"",label:m.name??""})),onChange:m=>{a.setValue("serviceId",m),a.setValue("serviceDocId","")},className:Ge})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(B,{className:"text-foreground text-sm font-medium",children:"Document"}),l?e.jsxs("div",{className:ze,children:[e.jsx(U,{className:"h-4 w-4 animate-spin"}),e.jsx("span",{className:"text-sm text-[#828DA3]",children:"Loading documents..."})]}):e.jsx(H,{value:a.watch("serviceDocId"),options:d.map(m=>({value:m.id,label:m.fileName??m.id})),disabled:l||!o,onChange:m=>a.setValue("serviceDocId",m),className:Ge})]})]})})}function Zs({component:s,componentPointMeta:t,createPointMeta:a,updatePointMeta:o,deletePointMeta:n,showFocalPointName:r,disableCreatePointMeta:i}){const{canWrite:l}=W(),c=i||!l,[d,m]=p.useState(null),[u,x]=p.useState(!1),j=s.componentId===Cs,I=s.componentId===Ns,h=s.componentId===Ds,v=j?"Diagram":I?"API Contract":h?"Documentation":void 0,D=!!v;return e.jsxs(e.Fragment,{children:[e.jsx(le,{type:"single",collapsible:!0,className:"overflow-hidden rounded-[0.8125rem] border border-[#2A3242] bg-[#1E2533]",value:t.length>0?void 0:"none",children:e.jsxs(ce,{value:"item-1",children:[e.jsxs("div",{className:"flex w-full items-center justify-between gap-3 rounded-none px-4 py-4",children:[e.jsxs("div",{className:"flex gap-2",children:[e.jsx("div",{className:"self-start text-[2.25rem]",children:ua({component:s.componentId,category:s.category})}),e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsx("h4",{className:"text-sm font-medium",children:s.name}),e.jsx("p",{className:"text-paragraph text-xs",children:s.description})]})]}),e.jsxs("div",{className:"flex items-center gap-2 self-start",children:[t.length>0&&e.jsx("span",{className:"text-primary bg-primary/20 flex h-5 items-center justify-center rounded-lg p-1 px-2 text-xs font-bold",children:t.length}),e.jsxs("div",{className:"flex items-center",children:[t.length===0&&!c&&e.jsx(Q,{className:w("text-primary bg-primary/5 flex h-9 items-center justify-center rounded-full px-4 font-medium hover:no-underline [&>svg]:last:hidden",D&&"rounded-r-none"),onClick:y=>{y.preventDefault(),x(!0)},children:"Add"}),t.length>0&&e.jsx(Q,{className:w("text-primary bg-primary/5 flex h-9 items-center justify-center rounded-full px-2 font-medium hover:no-underline [&>svg]:last:hidden"),children:e.jsx(ia,{className:"text-lg transition-all"})}),D&&!c&&t.length===0&&e.jsx("button",{onClick:()=>x(!0),className:"text-primary border-primary/10 bg-primary/5 flex size-9 items-center justify-center rounded-full rounded-l-none border-l pr-1 font-medium hover:no-underline",children:e.jsx(se,{className:"size-4 shrink-0"})})]})]})]},s.componentId),e.jsxs(de,{className:"border-t border-[#2A3242] bg-[#141925] p-3",children:[e.jsx("div",{className:w("flex flex-col gap-2",!c&&"mb-3"),children:t.map((y,k)=>{const f={index:k,pointMeta:y,component:s,showFocalPointName:r??!1,openDeleteConfirmationModal:()=>m(y.id??null)},C=y.id;return y.componentLinkDiagramId?e.jsx(Hs,{...f},C):y.componentLinkApiEndpointId?e.jsx(Ws,{...f},C):y.componentLinkServiceDocId?e.jsx(Ys,{...f},C):e.jsx(Ks,{...f,updatePointMeta:async({componentModalFields:A})=>{await o(y.id,s.componentId,{componentModalFields:A})}},C)})}),!c&&e.jsx(Xs,{setIsLinkModalOpen:x,linkLabel:v})]})]})}),e.jsx(As,{open:!!d,onOpenChange:()=>m(null),onConfirm:async()=>{if(d){try{await n(d),F.success("Focal point meta deleted successfully")}catch{F.error("Failed to delete focal point meta. Please try again later.")}m(null)}}}),e.jsx(G,{open:u&&I,onOpenChange:x,children:e.jsx($s,{onSelect:async y=>{try{await a(s.componentId,{componentLinkApiEndpointId:y.apiEndpointId}),x(!1),F.success("Focal point meta created successfully")}catch{return void F.error("Failed to create focal point meta. Please try again.")}}})}),e.jsx(G,{open:u&&j,onOpenChange:x,className:"[--width:52rem] sm:!h-[90vh]",children:e.jsx(Ss,{onSelect:async y=>{try{await a(s.componentId,{componentLinkDiagramId:y}),F.success("Focal point meta created successfully"),x(!1)}catch{return void F.error("Failed to create focal point meta. Please try again.")}}})}),e.jsx(G,{open:u&&h,onOpenChange:x,children:e.jsx(Js,{onSelect:async y=>{try{await a(s.componentId,{componentLinkServiceDocId:y.serviceDocId}),x(!1),F.success("Focal point meta created successfully")}catch{return void F.error("Failed to create focal point meta. Please try again.")}}})})]})}function bt({...s}){const{focalPointGroups:t,loading:a}=bs();return a?e.jsxs("div",{className:"flex flex-col items-center justify-center py-8",children:[e.jsx(Ye,{className:"text-8xl"}),e.jsx("p",{className:"text-muted-foreground mt-4 text-sm font-medium",children:"Loading Focal Point..."})]}):e.jsx(e.Fragment,{children:t.map((o,n)=>e.jsx(le,{collapsible:!0,type:"single",className:"border-stock border-b",defaultValue:o.name,children:e.jsxs(ce,{value:o.name,children:[e.jsx(Q,{className:"group flex w-full items-center justify-between px-4 text-base text-[#F4F7FC]",children:o.name}),e.jsx(de,{className:"space-y-4 px-4 pt-2",children:o.components.map(r=>e.jsx(eo,{component:r,...s},r.componentId))})]})},n))})}function eo({component:s,pointMetaList:t,...a}){const o=p.useMemo(()=>t.filter(n=>n.componentId===s.componentId),[t,s.componentId]);return e.jsx(Zs,{component:s,componentPointMeta:o,...a})}function to({focalPoints:s,mapId:t}){const a=O()?.id,[o,n]=p.useState(!1),[r,i]=p.useState([]);return p.useEffect(()=>{async function l(){if(!a||!t)return;const d=(await Promise.all(s.map(m=>xe.query({query:ve,variables:{orgId:a,mapId:t,frameId:m.frameId??"",focalPointId:m.id},fetchPolicy:"cache-first"})))).flatMap(m=>m.data?.focalPointMeta??[]);i(d)}n(!0),l().catch(()=>{F.error("Failed to fetch point meta list")}).finally(()=>{n(!1)})},[s,a,t]),o?e.jsx(We,{label:"Loading point meta list"}):e.jsx(bt,{showFocalPointName:!0,disableCreatePointMeta:!0,pointMetaList:r,createPointMeta:async()=>{throw new Error("Not implemented, Do not need to create point meta here")},deletePointMeta:async l=>{const c=r.find(d=>d.id===l);if(!c)throw new Error("Point meta not found");await xe.mutate({mutation:xt,variables:{orgId:a,mapId:t,frameId:c.frameId??"",focalPointId:c.focalPointId??"",id:l}}),i(d=>d.filter(m=>m.id!==l))},updatePointMeta:async(l,c,d)=>{const m=r.find(x=>x.id===l);if(!m)throw new Error("Point meta not found");const{data:u}=await xe.mutate({mutation:pt,variables:{orgId:a,mapId:t,frameId:m.frameId??"",focalPointId:m.focalPointId??"",id:l,input:{componentId:c,componentModalFields:d.componentModalFields}}});u?.updateFocalPointMeta&&i(x=>x.map(j=>j.id===l?{...j,componentModalFields:d.componentModalFields??[]}:j))}})}function ao({frame:s,frameGroup:t,frameGroupPoints:a,updateFrameGroup:o,deleteFrameGroup:n}){const{canWrite:r}=W(),[i,l]=p.useState(!1),[c,d]=p.useState(!1);return e.jsxs("div",{children:[e.jsx(js,{frameGroup:t,updateFrameGroup:o}),e.jsx(to,{focalPoints:a,mapId:s.mapId??""}),e.jsxs("div",{className:"px-4 pb-2",children:[e.jsxs(S,{size:"lg",variant:"destructive",className:"text-destructive ring-destructive w-full rounded-lg bg-white ring hover:text-white",disabled:i||!r,onClick:async()=>d(!0),children:[e.jsx(V,{loading:i}),"Delete Frame Group"]}),e.jsx(gt,{open:c,onOpenChange:d,onConfirm:async()=>{try{l(!0),await n(),F.success("Frame group deleted successfully")}catch{F.error("Failed to delete frame group. Please try again later.")}finally{l(!1)}}})]})]})}function vn({frame:s,frameGroup:t,frameGroupPoints:a,updateFrameGroup:o,deleteFrameGroup:n}){const r=ft();return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"border-stock flex h-14 items-center justify-between border-b px-4 py-3",children:[e.jsx("h2",{className:"text-lg font-semibold text-gray-900",children:"Frame Group Details"}),e.jsx(K,{onClick:r.clearTarget,className:"size-8"})]}),e.jsx("div",{className:"flex-1 overflow-auto pb-2",children:e.jsx(ao,{frame:s,frameGroup:t,frameGroupPoints:a,updateFrameGroup:o,deleteFrameGroup:n})})]})}const so="!h-14 w-full rounded-[16px] border border-[#2A3242] bg-transparent px-6 text-[#F4F7FC] placeholder:text-[#828DA3] focus:outline-none";function oo({focalPoint:s,unselectFocalPoint:t,updateFocalPoint:a,deleteFocalPoint:o}){const{pointMeta:n,createPointMeta:r,updatePointMeta:i,deletePointMeta:l}=ht(),{canWrite:c}=W(),[d,m]=p.useState(!1),[u,x]=p.useState(!1),[j,I]=p.useState(!1),[h,v]=ee(s.name||""),[D,y]=ee(s.color||""),k=h!==s.name||D!==(s.color||""),f=D===""||/^#[0-9a-fA-F]{6}$/.test(D);return e.jsxs("div",{children:[e.jsx(le,{type:"single",collapsible:!0,className:"border-b",defaultValue:"basics",children:e.jsxs(ce,{value:"basics",children:[e.jsx(Q,{className:"group flex w-full items-center justify-between px-4 text-base text-[#F4F7FC]",children:"Basics"}),e.jsxs(de,{className:"space-y-4 px-4 pt-2",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(B,{htmlFor:"name",className:"text-[#F4F7FC]",children:"Name"}),e.jsx(ae,{id:"name",value:h,autoCorrect:"off",autoComplete:"off",autoCapitalize:"off",disabled:d,onChange:C=>v(C.target.value),placeholder:"Enter focal point name",className:so})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(B,{className:"text-[#F4F7FC]",children:"Color"}),e.jsx(Bt,{color:D,onColorChange:y})]}),k&&e.jsx("div",{className:"flex justify-start",children:e.jsxs(S,{size:"lg",variant:"outline",className:"h-11 rounded-[0.75rem]",disabled:!c||!f,onClick:async()=>{try{m(!0),await a(s.id,{name:h,color:D})}catch{F.error("Failed to update focal point")}finally{m(!1)}},children:[e.jsx(V,{loading:d}),"Save Changes"]})})]})]})}),e.jsx(bt,{pointMetaList:n,createPointMeta:async(C,A)=>{await r(C,A)},deletePointMeta:async C=>{await l(C)},updatePointMeta:async(C,A,g)=>{await i(C,A,g)}}),e.jsxs("div",{className:"mt-6 px-4 pb-2",children:[e.jsxs(S,{preset:"outline",className:"text-destructive border-destructive/30 hover:bg-destructive w-full rounded-lg hover:text-white",disabled:u||!c,onClick:async()=>I(!0),children:[e.jsx(V,{loading:u}),"Delete Focal Point"]}),e.jsx(gt,{open:j,onOpenChange:I,onConfirm:async()=>{try{x(!0),await o(s.id),F.success("Focal point deleted successfully"),t()}catch{F.error("Failed to delete focal point. Please try again later.")}finally{x(!1)}}})]})]})}function bn({focalPoint:s,updateFocalPoint:t,deleteFocalPoint:a}){const o=ft(),{pointMetaLoading:n}=ht();return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"border-stock flex h-14 items-center justify-between border-b px-4 py-3",children:[e.jsx("h2",{className:"text-lg font-semibold text-[#F4F7FC]",children:"Focal Point Details"}),e.jsx(K,{onClick:o.clearTarget,className:"size-8"})]}),e.jsx("div",{className:"flex-1 overflow-auto pb-2",children:n?e.jsx("div",{className:"flex flex-col items-center justify-center py-24",children:e.jsx(Ye,{})}):e.jsx(e.Fragment,{children:e.jsx(oo,{focalPoint:s,unselectFocalPoint:o.clearTarget,updateFocalPoint:t,deleteFocalPoint:a})})})]})}const yn=N(`
|
|
429
|
+
query FrameGroups($orgId: ID!, $mapId: ID!, $frameId: ID!) {
|
|
430
|
+
frameGroups(orgId: $orgId, mapId: $mapId, frameId: $frameId) {
|
|
431
|
+
id
|
|
432
|
+
frameId
|
|
433
|
+
orgId
|
|
434
|
+
name
|
|
435
|
+
description
|
|
436
|
+
locationX
|
|
437
|
+
locationY
|
|
438
|
+
width
|
|
439
|
+
height
|
|
440
|
+
order
|
|
441
|
+
isActive
|
|
442
|
+
createdAt
|
|
443
|
+
updatedAt
|
|
444
|
+
}
|
|
445
|
+
}
|
|
446
|
+
`),Cn=N(`
|
|
447
|
+
mutation CreateFrameGroup(
|
|
448
|
+
$orgId: ID!
|
|
449
|
+
$mapId: ID!
|
|
450
|
+
$frameId: ID!
|
|
451
|
+
$input: CreateFrameGroupInput!
|
|
452
|
+
) {
|
|
453
|
+
createFrameGroup(
|
|
454
|
+
orgId: $orgId
|
|
455
|
+
mapId: $mapId
|
|
456
|
+
frameId: $frameId
|
|
457
|
+
input: $input
|
|
458
|
+
) {
|
|
459
|
+
id
|
|
460
|
+
}
|
|
461
|
+
}
|
|
462
|
+
`),Nn=N(`
|
|
463
|
+
mutation UpdateFrameGroup(
|
|
464
|
+
$orgId: ID!
|
|
465
|
+
$mapId: ID!
|
|
466
|
+
$frameId: ID!
|
|
467
|
+
$id: ID!
|
|
468
|
+
$input: UpdateFrameGroupInput!
|
|
469
|
+
) {
|
|
470
|
+
updateFrameGroup(
|
|
471
|
+
orgId: $orgId
|
|
472
|
+
mapId: $mapId
|
|
473
|
+
frameId: $frameId
|
|
474
|
+
id: $id
|
|
475
|
+
input: $input
|
|
476
|
+
) {
|
|
477
|
+
id
|
|
478
|
+
}
|
|
479
|
+
}
|
|
480
|
+
`),Dn=N(`
|
|
481
|
+
mutation DeleteFrameGroup($orgId: ID!, $mapId: ID!, $frameId: ID!, $id: ID!) {
|
|
482
|
+
deleteFrameGroup(orgId: $orgId, mapId: $mapId, frameId: $frameId, id: $id)
|
|
483
|
+
}
|
|
484
|
+
`),Fn=N(`
|
|
485
|
+
query FrameLinks($orgId: ID!, $mapId: ID!, $frameId: ID!) {
|
|
486
|
+
frameLinks(orgId: $orgId, mapId: $mapId, frameId: $frameId) {
|
|
487
|
+
id
|
|
488
|
+
frameId
|
|
489
|
+
orgId
|
|
490
|
+
kind
|
|
491
|
+
targetFrameId
|
|
492
|
+
targetMapId
|
|
493
|
+
label
|
|
494
|
+
locationX
|
|
495
|
+
locationY
|
|
496
|
+
isActive
|
|
497
|
+
createdAt
|
|
498
|
+
updatedAt
|
|
499
|
+
}
|
|
500
|
+
}
|
|
501
|
+
`),$n=N(`
|
|
502
|
+
mutation CreateFrameLink(
|
|
503
|
+
$orgId: ID!
|
|
504
|
+
$mapId: ID!
|
|
505
|
+
$frameId: ID!
|
|
506
|
+
$input: CreateFrameLinkInput!
|
|
507
|
+
) {
|
|
508
|
+
createFrameLink(
|
|
509
|
+
orgId: $orgId
|
|
510
|
+
mapId: $mapId
|
|
511
|
+
frameId: $frameId
|
|
512
|
+
input: $input
|
|
513
|
+
) {
|
|
514
|
+
id
|
|
515
|
+
}
|
|
516
|
+
}
|
|
517
|
+
`),An=N(`
|
|
518
|
+
mutation UpdateFrameLink(
|
|
519
|
+
$orgId: ID!
|
|
520
|
+
$mapId: ID!
|
|
521
|
+
$frameId: ID!
|
|
522
|
+
$id: ID!
|
|
523
|
+
$input: UpdateFrameLinkInput!
|
|
524
|
+
) {
|
|
525
|
+
updateFrameLink(
|
|
526
|
+
orgId: $orgId
|
|
527
|
+
mapId: $mapId
|
|
528
|
+
frameId: $frameId
|
|
529
|
+
id: $id
|
|
530
|
+
input: $input
|
|
531
|
+
) {
|
|
532
|
+
id
|
|
533
|
+
}
|
|
534
|
+
}
|
|
535
|
+
`),Pn=N(`
|
|
536
|
+
mutation DeleteFrameLink($orgId: ID!, $mapId: ID!, $frameId: ID!, $id: ID!) {
|
|
537
|
+
deleteFrameLink(orgId: $orgId, mapId: $mapId, frameId: $frameId, id: $id)
|
|
538
|
+
}
|
|
539
|
+
`),z=3e3,te="var(--frame-image-canvas-width, 0)";function ue(s){const t=`calc((${s.y} / ${z}) * ${te})`,a=`calc((${s.x} / ${z}) * ${te})`;return{top:t,left:a}}function no(s,t){const a=`calc((${s} / ${z}) * ${te})`,o=`calc((${t} / ${z}) * ${te})`;return{width:a,height:o}}function Sn(s,t){const a=z/s,o=Math.max(0,t.x*a),n=Math.max(0,t.y*a);return{x:Math.min(z,o),y:n}}function wn(s,t,a){const o=z/s,n=Math.max(0,t*o),r=Math.max(0,a*o);return{width:Math.min(z,n),height:r}}function Mn(s,t){return t.x>=s.x&&t.x<=s.x+s.width&&t.y>=s.y&&t.y<=s.y+s.height}function ke({...s}){return e.jsxs("svg",{fill:"none",width:"1em",height:"1em",viewBox:"0 0 48 49",xmlns:"http://www.w3.org/2000/svg",...s,children:[e.jsx("foreignObject",{x:"-4",y:"-3.8186",width:"56",height:"56",children:e.jsx("div",{style:{clipPath:"url(#bgblur_0_207_5347_clip_path)",height:"100%",width:"100%"}})}),e.jsx("circle",{"data-figma-bg-blur-radius":"4",cx:"24",cy:"24.1814",r:"24",fillOpacity:"0.1",className:"fill-current"}),e.jsx("circle",{opacity:"0.2",cx:"23.9999",cy:"24.1815",r:"20.9403",className:"fill-current"}),e.jsx("circle",{opacity:"0.5",cx:"23.9997",cy:"24.1816",r:"17.1183",className:"fill-current"}),e.jsx("g",{filter:"url(#filter1_i_207_5347)",children:e.jsx("circle",{cx:"23.9996",cy:"24.182",r:"12.5221",className:"fill-current transition-all group-hover:fill-black"})}),e.jsxs("defs",{children:[e.jsx("clipPath",{id:"bgblur_0_207_5347_clip_path",transform:"translate(4 3.8186)",children:e.jsx("circle",{cx:"24",cy:"24.1814",r:"24"})}),e.jsxs("filter",{id:"filter1_i_207_5347",x:"11.4775",y:"11.6599",width:"25.0444",height:"29.0442",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[e.jsx("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),e.jsx("feBlend",{mode:"normal",in:"SourceGraphic",in2:"BackgroundImageFix",result:"shape"}),e.jsx("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),e.jsx("feOffset",{dy:"4"}),e.jsx("feGaussianBlur",{stdDeviation:"6"}),e.jsx("feComposite",{in2:"hardAlpha",operator:"arithmetic",k2:"-1",k3:"1"}),e.jsx("feColorMatrix",{type:"matrix",values:"0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.12 0"}),e.jsx("feBlend",{mode:"normal",in2:"shape",result:"effect1_innerShadow_207_5347"})]})]})]})}function kn({contentSize:s,focalPoint:t,onClick:a,onPointerDown:o}){return e.jsx("button",{type:"button",onClick:a,onPointerDown:o,style:{...ue({x:t.locationX,y:t.locationY}),color:t.color?t.color:void 0},className:w("group absolute block -translate-x-1/2 -translate-y-1/2 rounded-full",!a&&o&&"cursor-grab",!t.color&&"text-primary",s==="sm"&&"text-[1.5rem]",s==="md"&&"text-[3rem]"),children:e.jsx(ke,{})})}function En({contentSize:s,frameGroup:t,isSelected:a,onClick:o,onResizePointerDown:n}){return e.jsxs("div",{className:"absolute",style:{...ue({x:t.locationX,y:t.locationY}),...no(t.width,t.height)},children:[e.jsx("button",{onClick:o,className:w("border-primary/50 block size-full rounded-md bg-transparent transition-colors",a?"bg-primary/25 border-primary/80":"hover:bg-primary/20",s==="sm"&&"border",s==="md"&&"border-2")},t.id),a&&n&&["top-left","top-right","bottom-left","bottom-right"].map(r=>e.jsx("button",{type:"button","aria-label":"Resize group",onPointerDown:()=>n(r),className:w("bg-primary absolute size-3 rounded-sm",r==="top-left"&&"-top-1.5 -left-1.5 cursor-nwse-resize",r==="top-right"&&"-top-1.5 -right-1.5 cursor-nesw-resize",r==="bottom-left"&&"-bottom-1.5 -left-1.5 cursor-nesw-resize",r==="bottom-right"&&"-right-1.5 -bottom-1.5 cursor-nwse-resize")},r))]})}function Ln({frame:s,content:t,onEmptyClick:a,setCanvasSize:o}){const n=p.useRef(null),[r,i]=p.useState(0);return p.useEffect(()=>{const l=n.current;if(!l)return;const c=new ResizeObserver(()=>{i(l.clientWidth)});return i(l.clientWidth),c.observe(l),()=>c.disconnect()},[n]),e.jsxs("div",{ref:n,className:"canvas-container relative isolate w-full",children:[e.jsx(Ha,{jsx:!0,children:`
|
|
540
|
+
.canvas-container {
|
|
541
|
+
--frame-image-canvas-width: ${r}px;
|
|
542
|
+
}
|
|
543
|
+
`}),e.jsx("img",{src:s.screenshotImageUrl??void 0,alt:s.name??"Default",className:"!h-auto !w-full rounded-[0.4rem]",onClick:a,onLoad:l=>{if(o){const c=l.currentTarget;o({width:c.naturalWidth,height:c.naturalHeight})}}}),t]})}const ro=X({label:T().min(1,"Label is required")});function yt({defaultValues:s={},onSubmit:t}){const a=oe({resolver:ne(ro),defaultValues:{label:s.label??""}});return e.jsx(L,{title:"Edit Link",description:"Update link details.",footerSubmitLoading:a.formState.isSubmitting,onFooterSubmitClick:a.handleSubmit(t),footerSubmit:"Save Changes",footerCancel:!0,children:e.jsx("form",{onSubmit:a.handleSubmit(t),className:"space-y-6",children:e.jsx(ot,{name:"label",control:a.control,render:({field:o})=>e.jsxs("div",{className:"space-y-2",children:[e.jsx(B,{htmlFor:"label",className:"text-sm font-medium text-[#111110]",children:"Label"}),e.jsx(ae,{...o,id:"label",placeholder:"Enter link label",className:"h-[56px] rounded-[16px] border border-[#E5E7E9] bg-white px-6",autoComplete:"off"}),a.formState.errors.label&&e.jsx("p",{className:"text-destructive text-sm",children:a.formState.errors.label.message})]})})})})}function _n({contentSize:s,pageLink:t,deletePageLink:a,updatePageLink:o}){const{canWrite:n}=W(),[r,i]=p.useState(!1),[l,c]=p.useState(!1),[d,m]=p.useState(!1);return e.jsxs(e.Fragment,{children:[e.jsxs(Qe,{open:l||d?!0:r,onOpenChange:i,children:[e.jsx(Je,{asChild:!0,children:e.jsxs("a",{target:"_blank",rel:"noreferrer",href:`/dashboard/frame/${t.targetFrameId}`,style:ue({x:t.locationX,y:t.locationY}),className:w("group text-primary absolute block -translate-x-1/2 -translate-y-1/2 rounded-full",s==="sm"&&"text-[1.5rem]",s==="md"&&"text-[3rem]"),children:[e.jsx(ke,{}),e.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:e.jsx(se,{className:"size-[0.25em] text-white transition-all group-hover:text-white"})})]})}),e.jsx(Ze,{className:"text-foreground bg-white shadow-lg [&>span>svg]:hidden!",children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("p",{className:"text-lg font-medium",children:t.label??"N/A"}),e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(S,{preset:"outline",className:"size-8",disabled:!n,onClick:()=>c(!0),children:e.jsx(dt,{})}),e.jsx(S,{preset:"destructive",className:"size-8",disabled:!n,onClick:()=>m(!0),children:e.jsx(ct,{})})]})]})})]}),e.jsx(rt,{open:d,onOpenChange:m,onConfirm:async()=>{await a(),F.success("Link deleted")},title:"Delete linked page?",description:"Deleting this link removes it from the canvas. This action cannot be undone."}),e.jsx(G,{open:l,onOpenChange:c,children:e.jsx(yt,{defaultValues:{label:t.label??""},onSubmit:async({label:u})=>{try{await o({label:u}),F.success("Label updated"),c(!1)}catch{F.error("Failed to update label")}}})})]})}function Tn({contentSize:s,projectLink:t,deleteProjectLink:a,updateProjectLink:o}){const{canWrite:n}=W(),[r,i]=p.useState(!1),[l,c]=p.useState(!1),[d,m]=p.useState(!1);return e.jsxs(e.Fragment,{children:[e.jsxs(Qe,{open:l||d?!0:r,onOpenChange:i,children:[e.jsx(Je,{asChild:!0,children:e.jsxs("a",{target:"_blank",rel:"noreferrer",href:`/dashboard/maps/${t.targetMapId}`,style:ue({x:t.locationX,y:t.locationY}),className:w("group text-primary absolute block -translate-x-1/2 -translate-y-1/2 rounded-full",s==="sm"&&"text-[1.5rem]",s==="md"&&"text-[3rem]"),children:[e.jsx(ke,{}),e.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:e.jsx(se,{className:"size-[0.25em] text-white transition-all group-hover:text-white"})})]})}),e.jsx(Ze,{className:"text-foreground bg-white shadow-lg [&>span>svg]:hidden!",children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("p",{className:"text-lg font-medium",children:t.label??"N/A"}),e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(S,{preset:"outline",className:"size-8",disabled:!n,onClick:()=>c(!0),children:e.jsx(dt,{})}),e.jsx(S,{preset:"destructive",className:"size-8",disabled:!n,onClick:()=>m(!0),children:e.jsx(ct,{})})]})]})})]}),e.jsx(rt,{open:d,onOpenChange:m,onConfirm:async()=>{await a(),F.success("Link deleted")},title:"Delete linked project?",description:"Deleting this link removes it from the canvas. This action cannot be undone."}),e.jsx(G,{open:l,onOpenChange:c,children:e.jsx(yt,{defaultValues:{label:t.label??""},onSubmit:async({label:u})=>{try{await o({label:u}),F.success("Label updated"),c(!1)}catch{F.error("Failed to update label")}}})})]})}export{Ka as A,nn as B,ln as C,dn as D,In as E,Os as F,vn as G,jn as H,Ln as I,gn as J,_n as L,fn as M,cn as U,Ts as a,yn as b,Fn as c,Cn as d,Nn as e,Dn as f,$n as g,An as h,Pn as i,Mn as j,Sn as k,wn as l,ue as m,no as n,hn as o,mn as p,En as q,Tn as r,kn as s,on as t,ft as u,bn as v,un as w,xn as x,pn as y,Ae as z};
|