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
|
@@ -1,543 +0,0 @@
|
|
|
1
|
-
import{j as e,a as bt,d as yt,r as p,g as C,u as T,c as M,t as F,ae as ue}from"./index-5E1tJ7yK.js";import{C as Y}from"./cross-button-5Sr5rWVP.js";import{S as V}from"./super-circle-loader-D8MElOMh.js";import{B as w}from"./button-DadqadpO.js";import{u as W}from"./use-permissions-6JVET753.js";import{I as te}from"./input-YvHTVS0E.js";import{L as U}from"./textarea-MgxZ5x6-.js";import{u as Z,S as H,T as Ge,U as qe,a as ze,b as Ct,c as Nt,N as Dt,F as Ft,L as $t,D as At,K as St,B as Pt,d as wt,e as Mt,f as kt,g as Et,h as Lt,i as _t,j as Ot,k as Tt,l as Rt,m as Bt}from"./color-input-Efm-lxDy.js";import{S as Ve}from"./section-loader-BzpYM_Nx.js";import{S as He}from"./super-logo-loader-DJYiRbCS.js";import{c as Ut}from"./react-BNzYaZuG.js";import{u as k}from"./useQuery-B8yYhO0c.js";import{u as pe}from"./useMutation-CmVaR9zz.js";import{c as Gt,a as qt,g as We,f as zt,d as Ye,i as Vt,Q as Ht,S as Wt,U as Yt,B as ae,I as Kt,T as Ke,n as Qe,o as Xe}from"./nav-links-8vT2ixiI.js";import{e as Qt,u as Xt}from"./scroll-area-BodE-n7W.js";import{u as Jt}from"./iconBase-BoDZfJgC.js";import{c as Je,R as Zt,b as ea,d as ta,T as aa}from"./index-CzHjJWeV.js";import{C as sa}from"./chevron-down-R7pQzyLD.js";import{a as $}from"./index-Dj_05fqk.js";import{a as L,B as q}from"./better-dialog-D3AAiahr.js";import{a as oa,b as na}from"./index-c6Bxcoqm.js";import{u as ra,e as je,f as S,h as Ze,C as ia,i as la,j as ca,k as da}from"./react-flow-wrapper-BPlRstyO.js";import{M as et}from"./method-badge-DMYDKdDZ.js";import{a as ma,c as tt,f as ua,d as pa}from"./api-adapters-CnQpLiWI.js";import{A as xa,a as ha,b as fa}from"./api-endpoints-DCA5GNpC.js";import{S as be}from"./services-Crqkffr5.js";import{u as se,a as oe,C as at}from"./zod-Dc4H6VVJ.js";import{f as ye,C as E,b as ga}from"./index-HU5pz3kj.js";import{L as G}from"./loader-circle-C5jZoM7X.js";import{o as K,s as O,E as Me,B as Ia,_ as va,b as ja,d as ba,n as ya}from"./index-DcEA6SIV.js";import{d as st,B as ot}from"./better-delete-confirmation-modal-Dib31LVb.js";import{D as nt,a as rt,c as Ce,d as Ne,e as X,f as J,b as De}from"./dialog-D_HtNS17.js";import{D as Ca}from"./diagrams-C1xkRPqT.js";import{u as Na}from"./use-debounced-value-Ba-kkCUY.js";import{L as Da}from"./link-2-C75goIOt.js";import{C as Fa}from"./common-Y7ySZBdh.js";import{D as $a,c as Aa,d as Sa}from"./avatar-BI7D-Aia.js";import{FlowDiagramPreview as Pa}from"./flow-diagram-preview-T0Z4iMVU.js";import{c as wa,g as Ma,a as ka}from"./getRoundingMethod-DC1wW3rl.js";import{e as Ea,n as La,g as ke,m as Ee,a as Le,h as _e,b as _a,i as Oe}from"./en-US-B1Lg1a1H.js";import{g as Oa}from"./index-D7MEHpJf.js";import{u as Ta,T as it}from"./uploads-BOQHX9l4.js";import{D as Ra,Q as Ba}from"./quill-rCHj4fCw.js";import{d as Ua,c as Ga}from"./doc-file-content-B06roi8L.js";import{S as qa}from"./service-doc-Dir8g83J.js";import{C as za}from"./grid-scroll-body-CPqSxU6-.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 Va=[["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"}]],lt=Gt("pencil",Va);function Ha(s,t,a){const o=_a(),n=a?.locale??o.locale??Ea,r=wa(s,t);if(isNaN(r))throw new RangeError("Invalid time value");const i=Object.assign({},a,{addSuffix:a?.addSuffix,comparison:r}),[l,c]=La(a?.in,...r>0?[t,s]:[s,t]),d=Ma(a?.roundingMethod??"round"),m=c.getTime()-l.getTime(),u=m/Oe,x=ke(c)-ke(l),v=(m-x)/Oe,I=a?.unit;let h;if(I?h=I:u<1?h="second":u<60?h="minute":u<Ee?h="hour":v<Le?h="day":v<_e?h="month":h="year",h==="second"){const j=d(m/1e3);return n.formatDistance("xSeconds",j,i)}else if(h==="minute"){const j=d(u);return n.formatDistance("xMinutes",j,i)}else if(h==="hour"){const j=d(u/60);return n.formatDistance("xHours",j,i)}else if(h==="day"){const j=d(v/Ee);return n.formatDistance("xDays",j,i)}else if(h==="month"){const j=d(v/Le);return j===12&&I!=="month"?n.formatDistance("xYears",1,i):n.formatDistance("xMonths",j,i)}else{const j=d(v/_e);return n.formatDistance("xYears",j,i)}}function ct(s,t){return Ha(s,ka(s),t)}function dt({error:s,label:t,required:a,children:o,componentType:n}){const r=ra();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 Wa(...s){const t=bt(),[a]=yt(),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 Ie=C(`
|
|
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
|
-
`),Ya=C(`
|
|
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
|
-
`),mt=C(`
|
|
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
|
-
`),ut=C(`
|
|
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
|
-
`),[tn,pt]=Ut(({focalPoint:s,mapId:t})=>{const a=T()?.id,o=s.frameId??"",n=s.id,r={orgId:a,mapId:t,frameId:o,focalPointId:n},l=k(Ie,{variables:r,skip:!a||!t||!o}),d={awaitRefetchQueries:!0,refetchQueries:[{query:Ie,variables:r}]},[m]=pe(Ya,d),[u]=pe(mt,d),[x]=pe(ut,d),v=l.data?.focalPointMeta??[];function I(h,j){return{componentId:h,...j}}return{focalPoint:s,pointMeta:v,pointMetaLoading:l.loading&&!l.data?.focalPointMeta,createPointMeta(h,j){return m({variables:{...r,input:I(h,j)}})},updatePointMeta(h,j,D){return u({variables:{...r,id:h,input:I(j,D)}})},deletePointMeta(h){return x({variables:{...r,id:h}})}}});function xt(){const[s,t]=Wa("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 Fe({open:s,onOpenChange:t,children:a,className:o}){return e.jsx(nt,{open:s,onOpenChange:t,children:e.jsxs(rt,{showCloseButton:!1,className:M("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(Ce,{asChild:!0,children:e.jsx(Y,{className:"absolute top-3 right-3"})}),a]})})}function Ka({children:s,className:t,hasFooter:a,...o}){return e.jsx("div",{...o,className:M("custom-scrollbar max-h-full overflow-auto p-6",a&&"pb-0",t),children:s})}function Qa({title:s,description:t,className:a,...o}){return e.jsxs(Ne,{...o,className:M("border-stock h-[6.1rem] border-b p-6",a),children:[e.jsx(X,{asChild:!0,children:e.jsx("h3",{children:s})}),t&&e.jsx(J,{asChild:!0,children:e.jsx("p",{className:"text-paragraph mt-2 text-sm",children:t})})]})}function Xa({children:s,className:t,...a}){return e.jsx(De,{...a,className:M("border-stock flex-row justify-end p-6 pt-2 pb-3 sm:pb-6",t),children:s})}function an({title:s,description:t,contentClassName:a,footer:o,children:n,...r}){return e.jsxs(Fe,{...r,children:[e.jsx(Qa,{title:s,description:t}),e.jsx(Ka,{hasFooter:!!o,className:a,children:n}),o&&e.jsx(Xa,{children:o})]})}function ht({open:s,onOpenChange:t,onConfirm:a}){const[o,n]=p.useState(!1);return e.jsx(Fe,{open:s,onOpenChange:t,className:"!max-w-[463px]",children:e.jsxs("div",{className:"p-6 text-center",children:[e.jsx("img",{src:st,alt:"trash",className:"mx-auto mb-4"}),e.jsx(X,{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(J,{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(w,{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(w,{onClick:()=>t(!1),className:"h-14 rounded-[13px] text-sm font-normal text-white",children:"Cancel"})]})]})})}var Ja=Object.defineProperty,_=(s,t)=>Ja(s,"name",{value:t,configurable:!0}),R="Accordion",Za=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[$e,es,ts]=Qt(R),[ne,sn]=qt(R,[ts,Je]),Ae=Je(),as=p.forwardRef(_(function(t,a){const{type:o,...n}=t,r=n,i=n;return e.jsx($e.Provider,{scope:t.__scopeAccordion,children:o==="multiple"?e.jsx(rs,{...i,ref:a}):e.jsx(ns,{...r,ref:a})})},"Accordion")),[ft,ss]=ne(R),[gt,os]=ne(R,{collapsible:!1}),ns=p.forwardRef(_(function(t,a){const{value:o,defaultValue:n,onValueChange:r=_(()=>{},"onValueChange"),collapsible:i=!1,...l}=t,[c,d]=We({prop:o,defaultProp:n??"",onChange:r,caller:R});return e.jsx(ft,{scope:t.__scopeAccordion,value:p.useMemo(()=>c?[c]:[],[c]),onItemOpen:d,onItemClose:p.useCallback(()=>i&&d(""),[i,d]),children:e.jsx(gt,{scope:t.__scopeAccordion,collapsible:i,children:e.jsx(It,{...l,ref:a})})})},"AccordionImplSingle")),rs=p.forwardRef(_(function(t,a){const{value:o,defaultValue:n,onValueChange:r=_(()=>{},"onValueChange"),...i}=t,[l,c]=We({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(v=>v!==u)),[c]);return e.jsx(ft,{scope:t.__scopeAccordion,value:l,onItemOpen:d,onItemClose:m,children:e.jsx(gt,{scope:t.__scopeAccordion,collapsible:!0,children:e.jsx(It,{...i,ref:a})})})},"AccordionImplMultiple")),[is,re]=ne(R),It=p.forwardRef(_(function(t,a){const{__scopeAccordion:o,disabled:n,dir:r,orientation:i="vertical",...l}=t,c=p.useRef(null),d=Jt(c,a),m=es(o),x=Xt(r)==="ltr",v=zt(t.onKeyDown,I=>{if(!Za.includes(I.key))return;const h=I.target,j=m().filter(B=>!B.ref.current?.disabled),D=j.findIndex(B=>B.ref.current===h),N=j.length;if(D===-1)return;I.preventDefault();let P=D;const g=0,b=N-1,A=_(()=>{P=D+1,P>b&&(P=g)},"moveNext"),f=_(()=>{P=D-1,P<g&&(P=b)},"movePrev");switch(I.key){case"Home":P=g;break;case"End":P=b;break;case"ArrowRight":i==="horizontal"&&(x?A():f());break;case"ArrowDown":i==="vertical"&&A();break;case"ArrowLeft":i==="horizontal"&&(x?f():A());break;case"ArrowUp":i==="vertical"&&f();break}const y=P%N;j[y].ref.current?.focus()});return e.jsx(is,{scope:o,disabled:n,direction:r,orientation:i,children:e.jsx($e.Slot,{scope:o,children:e.jsx(Ye.div,{...l,"data-orientation":i,ref:d,onKeyDown:n?void 0:v})})})},"AccordionImpl")),ve="AccordionItem",[ls,Se]=ne(ve),cs=p.forwardRef(_(function(t,a){const{__scopeAccordion:o,value:n,...r}=t,i=re(ve,o),l=ss(ve,o),c=Ae(o),d=Vt(),m=n&&l.value.includes(n)||!1,u=i.disabled||t.disabled;return e.jsx(ls,{scope:o,open:m,disabled:u,triggerId:d,children:e.jsx(Zt,{"data-orientation":i.orientation,"data-state":Pe(m),...c,...r,ref:a,disabled:u,open:m,onOpenChange:x=>{x?l.onItemOpen(n):l.onItemClose(n)}})})},"AccordionItem")),ds="AccordionHeader",ms=p.forwardRef(_(function(t,a){const{__scopeAccordion:o,...n}=t,r=re(R,o),i=Se(ds,o);return e.jsx(Ye.h3,{"data-orientation":r.orientation,"data-state":Pe(i.open),"data-disabled":i.disabled?"":void 0,...n,ref:a})},"AccordionHeader")),Te="AccordionTrigger",us=p.forwardRef(_(function(t,a){const{__scopeAccordion:o,...n}=t,r=re(R,o),i=Se(Te,o),l=os(Te,o),c=Ae(o);return e.jsx($e.ItemSlot,{scope:o,children:e.jsx(ea,{"aria-disabled":i.open&&!l.collapsible||void 0,"data-orientation":r.orientation,id:i.triggerId,...c,...n,ref:a})})},"AccordionTrigger")),ps="AccordionContent",xs=p.forwardRef(_(function(t,a){const{__scopeAccordion:o,...n}=t,r=re(R,o),i=Se(ps,o),l=Ae(o);return e.jsx(ta,{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 Pe(s){return s?"open":"closed"}_(Pe,"getState");var hs=as,fs=cs,gs=ms,Is=us,vs=xs;function ie({...s}){return e.jsx(hs,{"data-slot":"accordion",...s})}function le({className:s,...t}){return e.jsx(fs,{"data-slot":"accordion-item",className:M("border-b last:border-b-0",s),...t})}function Q({className:s,children:t,...a}){return e.jsx(gs,{className:"flex",children:e.jsxs(Is,{"data-slot":"accordion-trigger",className:M("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(sa,{className:"text-muted-foreground pointer-events-none size-4 shrink-0 translate-y-0.5 transition-transform duration-200"})]})})}function ce({className:s,children:t,...a}){return e.jsx(vs,{"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:M("pt-0 pb-4",s),children:t})})}function js({frameGroup:s,updateFrameGroup:t}){const{canWrite:a}=W(),[o,n]=p.useState(!1),[r,i]=Z(s.name||""),l=r!==s.name;return e.jsx(ie,{type:"single",collapsible:!0,className:"border-b",defaultValue:"basics",children:e.jsxs(le,{value:"basics",children:[e.jsx(Q,{className:"group flex w-full items-center justify-between px-4 text-base",children:"Basics"}),e.jsxs(ce,{className:"space-y-4 px-4 pt-2",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(U,{htmlFor:"group-name",children:"Name"}),e.jsx(te,{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(w,{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 bs=C(`
|
|
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 ys(){const s=T()?.id,{data:t,loading:a}=k(bs,{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(Cs(c))}return Object.values(l)},[t]),loading:a&&!t?.components?.components}}function Cs(s){return{...s,componentFields:$(s.componentFields).map(t=>({...t,options:$(t.options)}))}}const Ns="component_backend-flow-diagram",Ds="component_api-contract",Fs="component_support-kb-troubleshooting",xe="!h-[56px] w-full rounded-[16px] border border-[#2A3242] bg-transparent px-6 text-[#F4F7FC] focus:outline-none",he="flex !h-[56px] w-full items-center gap-2 rounded-[16px] border border-[#2A3242] bg-transparent px-6 focus:outline-none",$s=K({serviceId:O(),apiGroupId:O(),apiEndpointId:O()});function As({onSelect:s}){const t=T().id,a=se({resolver:oe($s),defaultValues:{serviceId:"",apiGroupId:"",apiEndpointId:""}}),o=a.watch("serviceId"),n=a.watch("apiGroupId"),{data:r,loading:i}=k(be,{variables:{orgId:t},fetchPolicy:"cache-first",skip:!t}),{data:l,loading:c}=k(xa,{variables:{orgId:t,serviceId:o},fetchPolicy:"cache-first",skip:!t||!o}),{data:d,loading:m}=k(ha,{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(ma),[l]),v=p.useMemo(()=>$(d?.apiEndpoints).map(h=>{const j=tt(h,t),D=$(j.componentMeta?.componentModalFields),N=ye(D,D),P=D.find(f=>f?.label?.toLowerCase()==="name")?.componentFieldId,g=P?N[P]:null,b=h.method.toUpperCase(),A=String(g||h.summary||"");return{value:j.apiEndpoint.apiEndpointId??"",label:`${b} ${h.path} ${A}`,node:e.jsxs("span",{className:"flex items-center gap-3",children:[e.jsx(et,{method:b}),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(U,{className:"text-foreground text-sm font-medium",children:"Service"}),i?e.jsxs("div",{className:he,children:[e.jsx(G,{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:xe})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(U,{className:"text-foreground text-sm font-medium",children:"API Group"}),c?e.jsxs("div",{className:he,children:[e.jsx(G,{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:xe})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(U,{className:"text-foreground text-sm font-medium",children:"API Endpoint"}),m?e.jsxs("div",{className:he,children:[e.jsx(G,{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:v,disabled:m||!n,onChange:I=>a.setValue("apiEndpointId",I),className:xe})]})]})})}function Ss({open:s,onOpenChange:t,onConfirm:a}){const[o,n]=p.useState(!1);return e.jsx(Fe,{open:s,onOpenChange:t,className:"!max-w-[463px]",children:e.jsxs("div",{className:"p-6 text-center",children:[e.jsx("img",{src:st,alt:"trash",className:"mx-auto mb-4"}),e.jsx(X,{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(J,{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(w,{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(w,{onClick:()=>t(!1),className:"h-14 rounded-[13px] text-sm font-normal text-white",children:"Cancel"})]})]})})}const fe=12,ge="__all__",Ps="!h-11 rounded-[16px] text-sm";function ws({onSelect:s}){const t=T()?.id,[a,o]=p.useState(null),[n,r]=p.useState(null),[i,l]=p.useState(""),[c,d]=p.useState(0),m=Na(i),u=k(be,{variables:{orgId:t},skip:!t,fetchPolicy:"cache-first"}),{data:x,loading:v}=k(Ca,{variables:{orgId:t,serviceId:n,search:m||null,sortBy:"created",sortDir:"desc",limit:fe,offset:c*fe},skip:!t,fetchPolicy:"cache-and-network"}),I=$(u.data?.services.items),h=$(x?.diagrams.items),j=x?.diagrams.totalCount??0,D=Math.ceil(j/fe),N=!!(n||m);function P(){d(0)}function g(f){r(f===ge?null:f),P()}function b(f){l(f),P()}async function A(f){if(!a)try{o(f),await s(f)}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(te,{value:i,onChange:f=>b(f.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??ge,onChange:g,placeholder:"All Services",className:`${Ps} sm:w-44`,options:[{value:ge,label:"All Services"},...I.map(f=>({value:f.id??"",label:f.name??""}))]})]}),e.jsx("div",{className:"min-h-0 flex-1 overflow-auto",children:v&&h.length===0?e.jsx(Ve,{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:N?"No diagrams match your filters.":"No diagrams available"})}):e.jsx("div",{className:"grid grid-cols-3 content-start gap-4",children:h.map(f=>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:f.name??"Blank Diagram",src:f.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(w,{preset:"primary",disabled:a!==null,onClick:()=>A(f.id??""),children:[a===f.id?e.jsx(G,{className:"size-4 animate-spin"}):e.jsx(Da,{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:f.name??"Blank Diagram"})})]},f.id))})}),D>1&&e.jsxs("div",{className:"flex shrink-0 items-center justify-center gap-3 pt-1",children:[e.jsx(w,{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(w,{preset:"outline",className:"h-8 px-3 text-sm",disabled:c>=D-1,onClick:()=>d(c+1),children:"Next"})]})]})})}const Ms=C(`
|
|
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
|
-
`),ks=C(`
|
|
169
|
-
query ServiceDocById($orgId: ID!, $id: ID!) {
|
|
170
|
-
serviceDocById(orgId: $orgId, id: $id) {
|
|
171
|
-
serviceId
|
|
172
|
-
docId
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
`),Es=C(`
|
|
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 Ls({orgId:s,endpointId:t}){const{data:a,loading:o}=k(Ms,{variables:{orgId:s,id:t},fetchPolicy:"cache-first"}),n=a?.apiEndpointById,{data:r}=k(fa,{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(G,{className:"h-4 w-4 animate-spin"}),e.jsx("span",{className:"text-paragraph text-sm",children:"Loading API contract..."})]})}):n?e.jsx(_s,{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 _s({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 tt(x,s,a)},[t,s,a]),r=p.useMemo(()=>$(n.componentMeta.componentModalFields),[n.componentMeta.componentModalFields]),i=p.useMemo(()=>ye(r,r),[r]),l=p.useMemo(()=>r.filter(x=>{const v=x.componentFieldId?i[x.componentFieldId]:null;return typeof v=="string"&&v.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(et,{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(aa,{tags:m,max:8,tagClassName:"rounded-md bg-[#1E2533] px-2 py-1 text-xs font-medium text-[#828DA3]"})]}),l.length>0&&e.jsx(je,{theme:"modal",children:e.jsx("div",{className:"space-y-1",children:l.map((x,v)=>{const I=x.componentFieldId?String(i[x.componentFieldId]??""):"";return e.jsx(dt,{label:x.label??"Field",required:!1,componentType:x.type??"unknown",error:null,children:x.type===S.CodeEditor?e.jsx(Ze,{readonly:!0,value:ua(x.label??"",I,a),setValue:()=>{}}):x.type===S.TextBox?e.jsx(Ge,{readonly:!0,value:I,onChange:()=>{}}):x.type===S.URLInput?e.jsx(qe,{readonly:!0,value:I,onChange:()=>{}}):e.jsx(ze,{readonly:!0,value:I,onChange:()=>{}})},x.componentFieldId??v)})})}),c.length>0&&e.jsx(Re,{label:"Example Requests",samples:c,protocol:a,kind:"request"}),d.length>0&&e.jsx(Re,{label:"Example Responses",samples:d,protocol:a,kind:"response"})]})})}function Re({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:M("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(ia,{editable:!1,value:pa(i,a,o),className:"overflow-hidden rounded-lg border border-[#2A3242]"})]})}function Os({orgId:s,diagramId:t}){const{data:a,loading:o}=k($a,{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=Aa(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(G,{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?ct(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(Pa,{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=C(`
|
|
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
|
-
`),on=C(`
|
|
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
|
-
`),nn=C(`
|
|
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
|
-
`),rn=C(`
|
|
237
|
-
mutation DeleteFocalPoint($orgId: ID!, $mapId: ID!, $frameId: ID!, $id: ID!) {
|
|
238
|
-
deleteFocalPoint(orgId: $orgId, mapId: $mapId, frameId: $frameId, id: $id)
|
|
239
|
-
}
|
|
240
|
-
`),ln=C(`
|
|
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
|
-
`),Rs=C(`
|
|
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
|
-
`),cn=C(`
|
|
338
|
-
mutation CreateFrame($orgId: ID!, $mapId: ID!, $input: CreateFrameInput!) {
|
|
339
|
-
createFrame(orgId: $orgId, mapId: $mapId, input: $input) {
|
|
340
|
-
id
|
|
341
|
-
}
|
|
342
|
-
}
|
|
343
|
-
`),dn=C(`
|
|
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
|
-
`),mn=C(`
|
|
355
|
-
mutation DeleteFrame($orgId: ID!, $mapId: ID!, $id: ID!) {
|
|
356
|
-
deleteFrame(orgId: $orgId, mapId: $mapId, id: $id)
|
|
357
|
-
}
|
|
358
|
-
`),un=C(`
|
|
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
|
-
`),pn=C(`
|
|
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
|
-
`),xn=Oa`
|
|
413
|
-
mutation CreateMap($orgId: ID!, $input: CreateMapInput!) {
|
|
414
|
-
createMap(orgId: $orgId, input: $input) {
|
|
415
|
-
id
|
|
416
|
-
}
|
|
417
|
-
}
|
|
418
|
-
`,hn=C(`
|
|
419
|
-
mutation UpdateMap($orgId: ID!, $id: ID!, $input: UpdateMapInput!) {
|
|
420
|
-
updateMap(orgId: $orgId, id: $id, input: $input) {
|
|
421
|
-
id
|
|
422
|
-
}
|
|
423
|
-
}
|
|
424
|
-
`),fn=C(`
|
|
425
|
-
mutation DeleteMap($orgId: ID!, $id: ID!) {
|
|
426
|
-
deleteMap(orgId: $orgId, id: $id)
|
|
427
|
-
}
|
|
428
|
-
`);function Bs({pageId:s,focalPointId:t}){const a=T()?.id,n=k(Rs,{fetchPolicy:"cache-first",variables:{orgId:a,id:s},skip:!a||!s}).data?.frameById?.mapId??"",{data:r}=k(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 Us(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=O();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=K({fileId:O().optional(),url:O().optional(),file:va(File).optional()});o=a.required?u.refine(x=>{var v,I,h,j;return((v=(I=x.url)===null||I===void 0?void 0:I.length)!==null&&v!==void 0?v:0)>0||((h=(j=x.fileId)===null||j===void 0?void 0:j.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=O({message:"Invalid URL"});o=a.required?u.min(1,{message:`${(l=a.label)!==null&&l!==void 0?l:"Field"} is required`}):u.optional().or(Ia(""));break}case E.NumberInput:{var c;let u=ya();const x=a.min,v=a.max;typeof x=="number"&&(u=u.min(x,{message:`Must be ≥ ${x}`})),typeof v=="number"&&(u=u.max(v,{message:`Must be ≤ ${v}`})),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=ba(O());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=ja();o=a.required?u:u.optional();break}default:if(a.required){var m;o=Me().refine(u=>{if(a.type===E.RichTextEditor&&u instanceof Ra){var x,v,I;if(!u.ops.length)return!1;const h=new Ba(document.createElement("div"));h==null||(x=h.setContents)===null||x===void 0||x.call(h,u);const j=h==null||(v=h.getText)===null||v===void 0?void 0:v.call(h).trim();return((I=j?.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=Me().optional();break}t[n]=o}}),K(t)}function Gs({title:s,fields:t,setFields:a,doneEditing:o}){const[n,r]=Z(t);return e.jsxs(e.Fragment,{children:[e.jsxs(Ne,{className:"border-stock h-[6.1rem] border-b p-6",children:[e.jsx(X,{asChild:!0,children:e.jsxs("h3",{children:[s," - Layout"]})}),e.jsx(J,{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(je,{theme:"modal",children:[e.jsx(Ct,{componentFields:n,setComponentFields:r}),e.jsx("div",{className:"mt-6",children:e.jsx(Nt,{setComponentFields:r})})]})}),e.jsxs(De,{className:"border-stock border-t p-6 pt-2",children:[e.jsx(w,{preset:"outline",className:"h-11 rounded-[0.8125rem]",children:"Cancel"}),e.jsxs(w,{preset:"cta",className:"h-11 rounded-[0.8125rem] !px-5",onClick:()=>{a(n),o()},children:[e.jsx(Ht,{className:"text-lg"}),"Done"]})]})]})}function qs({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(()=>ye(a,a),[a]),m=p.useMemo(()=>Us(a),[a]),{formState:u,handleSubmit:x,control:v}=se({resolver:oe(m),defaultValues:d,values:d}),I=T()?.id,[h,j]=p.useState(!1),[D,N]=p.useState(!1);async function P(g){j(!0);const b={...g},A=Object.fromEntries(Object.entries(g).filter(([f,y])=>y?.file instanceof File).map(([f,y])=>[f,y.file]));if(Object.keys(A).length>0){N(!0);for(const f in A){const y=A[f],B=await Ta(I,y);b[f]={fileId:B}}N(!1)}o(ga(a,b).map(f=>{const{readonly:y,...B}=f;return{...B,isReadonly:B.isReadonly??y??null,options:$(B.options)}})).then(()=>{j(!1)}).catch(f=>{console.error("Submission error:",f),j(!1)})}return e.jsxs(e.Fragment,{children:[e.jsxs(Ne,{className:"border-stock min-h-[6.1rem] gap-2.5 border-b p-6",children:[e.jsx(X,{asChild:!0,children:e.jsx("h3",{children:s})}),e.jsx(J,{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:g=>{r&&g.target.blur()},children:e.jsx(je,{theme:"modal",children:e.jsx("div",{className:M(r&&"pointer-events-none"),children:a.map((g,b)=>e.jsx(at,{control:v,name:g.componentFieldId,render:({field:A})=>{const f=A.value,y=A.onChange;return e.jsxs(dt,{label:g.label??"Label",required:!i&&(g.required??!1),componentType:g.type??"unknown",error:u.errors[g.componentFieldId]?.message?.toString(),children:[g.type===S.NumberInput&&e.jsx(Dt,{value:f??"",onChange:y}),g.type===S.TextInput&&e.jsx(ze,{value:f??"",onChange:y}),g.type===S.TextBox&&e.jsx(Ge,{value:f??"",onChange:y}),g.type===S.URLInput&&e.jsx(qe,{value:f??"",onChange:y}),g.type===S.FileUpload&&e.jsx(Ft,{file:f??null,isViewMode:r,onChange:y}),g.type===S.LinkOrFileUpload&&e.jsx($t,{value:f??null,isViewMode:r,onChange:y}),g.type===S.DropdownSelect&&e.jsx(At,{options:$(g.options),value:f??"",onChange:y,required:g.required??void 0}),g.type===S.RichTextEditor&&e.jsx(la,{value:f??"",setValue:y}),g.type===S.CodeEditor&&e.jsx(Ze,{height:"10rem",value:f??"",setValue:y}),g.type===S.KeyValueList&&e.jsx(St,{value:f??[],onChange:y}),g.type===S.BooleanToggle&&e.jsx(Pt,{checked:!!f,onChange:y}),g.type===S.MultiSelect&&e.jsx(wt,{options:$(g.options),value:f??[],onChange:y}),g.type===S.SearchSelect&&e.jsx(Mt,{options:$(g.options),value:f??"",onChange:y,required:g.required??void 0}),g.type===S.CheckboxGroup&&e.jsx(kt,{value:f??[],onChange:y,options:$(g.options)}),g.type===S.TagInput&&e.jsx(Et,{value:f??[],onChange:y}),g.type===S.DatePicker&&e.jsx(Lt,{value:f??null,onChange:y}),g.type===S.DateRangePicker&&e.jsx(_t,{value:f??null,onChange:y}),g.type===S.ColorPicker&&e.jsx(Ot,{value:f??null,onChange:y}),g.type===S.Slider&&e.jsx(Tt,{value:f??null,onChange:y})]})}},g.componentFieldId??b))})})}),e.jsxs(De,{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(Ce,{asChild:!0,children:e.jsx(w,{preset:"outline",disabled:h,className:"h-11 rounded-[0.8125rem]",children:r?"Close":"Cancel"})}),!i&&e.jsxs(w,{preset:"cta",disabled:h||i,className:"h-11 rounded-[0.8125rem]",onClick:()=>{if(r&&l)return l();x(P,()=>{const g=c.current;if(!g)return;const b=g.querySelector("[data-has-error]");b&&b.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(oa,{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(Gs,{title:o.title,fields:r,setFields:i,doneEditing:()=>c(!1)}):e.jsx(qs,{...o,isViewMode:a,fields:r}),l?e.jsx(Y,{className:"absolute top-3 right-3",onClick:()=>c(!1)}):e.jsxs(e.Fragment,{children:[e.jsx(Ce,{asChild:!0,children:e.jsx(Y,{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(Wt,{})})]})]})}function Vs({isOpen:s,setIsOpen:t,...a}){return e.jsx(nt,{open:s,onOpenChange:t,children:e.jsx(rt,{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 Hs({orgId:s,serviceDocId:t}){const{data:a,loading:o}=k(Es,{variables:{orgId:s,id:t},fetchPolicy:"cache-first"}),{data:n}=k(ks,{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(G,{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=Ua(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(Ga,{fileURL:r.fileUrl,fileName:r.fileName,fileType:r.fileType})})})}function de({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=ca(m,{label:"Name"}),x=m.length,v=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:v,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(Yt,{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(ae,{className:"text-primary size-3 shrink-0"}),e.jsxs("span",{className:"text-foreground block truncate text-sm font-medium",children:[v,o&&e.jsx(Bs,{pageId:a.frameId,focalPointId:a.focalPointId})]})]}),a.updatedAt&&e.jsxs("span",{className:"text-paragraph mt-0.5 block text-[10px] tracking-wide",children:["Updated"," ",ct(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:M("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(Kt,{className:"size-4"})})]})]})}function Ws(s){const t=T()?.id,a=s.pointMeta.componentLinkDiagramId,[o,n]=p.useState(!1),{data:r}=k(Sa,{variables:{orgId:t,id:a},skip:!t,fetchPolicy:"cache-first"});return e.jsxs(e.Fragment,{children:[e.jsx(de,{...s,hasLink:!0,showPreview:!0,previewImageUrl:r?.diagram?.previewImageUrl,nameOverride:r?.diagram?.name,onClick:()=>n(!0)}),e.jsx(q,{open:o,onOpenChange:n,children:e.jsx(Os,{orgId:t,diagramId:a})})]})}function Ys(s){const t=T()?.id,[a,o]=p.useState(!1);return e.jsxs(e.Fragment,{children:[e.jsx(de,{...s,hasLink:!0,onClick:()=>o(!0)}),e.jsx(q,{open:a,onOpenChange:o,children:e.jsx(Ls,{orgId:t,endpointId:s.pointMeta.componentLinkApiEndpointId})})]})}function Ks(s){const t=T()?.id,[a,o]=p.useState(!1);return e.jsxs(e.Fragment,{children:[e.jsx(de,{...s,hasLink:!0,onClick:()=>o(!0)}),e.jsx(q,{open:a,onOpenChange:o,className:"min-h-[95vh] [--width:min(95vw,100rem)]",children:e.jsx(Hs,{orgId:t,serviceDocId:s.pointMeta.componentLinkServiceDocId})})]})}function Qs({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(de,{index:s,component:t,pointMeta:a,showFocalPointName:o,openDeleteConfirmationModal:n,onClick:()=>l(!0)}),e.jsx(Vs,{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(w,{preset:"outline",onClick:()=>s(!0),children:[e.jsx(Fa,{})," Link to ",t]})})}const Be="!h-[56px] w-full rounded-[16px] border border-[#2A3242] bg-transparent px-6 text-[#F4F7FC] focus:outline-none",Ue="flex !h-[56px] w-full items-center gap-2 rounded-[16px] border border-[#2A3242] bg-transparent px-6 focus:outline-none",Js=K({serviceId:O(),serviceDocId:O()});function Zs({onSelect:s}){const t=T().id,a=se({resolver:oe(Js),defaultValues:{serviceId:"",serviceDocId:""}}),o=a.watch("serviceId"),{data:n,loading:r}=k(be,{variables:{orgId:t},fetchPolicy:"cache-first",skip:!t}),{data:i,loading:l}=k(qa,{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(U,{className:"text-foreground text-sm font-medium",children:"Service"}),r?e.jsxs("div",{className:Ue,children:[e.jsx(G,{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:Be})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(U,{className:"text-foreground text-sm font-medium",children:"Document"}),l?e.jsxs("div",{className:Ue,children:[e.jsx(G,{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:Be})]})]})})}function eo({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),v=s.componentId===Ns,I=s.componentId===Ds,h=s.componentId===Fs,j=v?"Diagram":I?"API Contract":h?"Documentation":void 0,D=!!j;return e.jsxs(e.Fragment,{children:[e.jsx(ie,{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(le,{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:da({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:M("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:N=>{N.preventDefault(),x(!0)},children:"Add"}),t.length>0&&e.jsx(Q,{className:M("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(na,{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(ae,{className:"size-4 shrink-0"})})]})]})]},s.componentId),e.jsxs(ce,{className:"border-t border-[#2A3242] bg-[#141925] p-3",children:[e.jsx("div",{className:M("flex flex-col gap-2",!c&&"mb-3"),children:t.map((N,P)=>{const g={index:P,pointMeta:N,component:s,showFocalPointName:r??!1,openDeleteConfirmationModal:()=>m(N.id??null)},b=N.id;return N.componentLinkDiagramId?e.jsx(Ws,{...g},b):N.componentLinkApiEndpointId?e.jsx(Ys,{...g},b):N.componentLinkServiceDocId?e.jsx(Ks,{...g},b):e.jsx(Qs,{...g,updatePointMeta:async({componentModalFields:A})=>{await o(N.id,s.componentId,{componentModalFields:A})}},b)})}),!c&&e.jsx(Xs,{setIsLinkModalOpen:x,linkLabel:j})]})]})}),e.jsx(Ss,{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(q,{open:u&&I,onOpenChange:x,children:e.jsx(As,{onSelect:async N=>{try{await a(s.componentId,{componentLinkApiEndpointId:N.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(q,{open:u&&v,onOpenChange:x,className:"[--width:52rem] sm:!h-[90vh]",children:e.jsx(ws,{onSelect:async N=>{try{await a(s.componentId,{componentLinkDiagramId:N}),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(q,{open:u&&h,onOpenChange:x,children:e.jsx(Zs,{onSelect:async N=>{try{await a(s.componentId,{componentLinkServiceDocId:N.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 vt({...s}){const{focalPointGroups:t,loading:a}=ys();return a?e.jsxs("div",{className:"flex flex-col items-center justify-center py-8",children:[e.jsx(He,{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(ie,{collapsible:!0,type:"single",className:"border-stock border-b",defaultValue:o.name,children:e.jsxs(le,{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(ce,{className:"space-y-4 px-4 pt-2",children:o.components.map(r=>e.jsx(to,{component:r,...s},r.componentId))})]})},n))})}function to({component:s,pointMetaList:t,...a}){const o=p.useMemo(()=>t.filter(n=>n.componentId===s.componentId),[t,s.componentId]);return e.jsx(eo,{component:s,componentPointMeta:o,...a})}function ao({focalPoints:s,mapId:t}){const a=T()?.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=>ue.query({query:Ie,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(Ve,{label:"Loading point meta list"}):e.jsx(vt,{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 ue.mutate({mutation:ut,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 ue.mutate({mutation:mt,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(v=>v.id===l?{...v,componentModalFields:d.componentModalFields??[]}:v))}})}function so({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(ao,{focalPoints:a,mapId:s.mapId??""}),e.jsxs("div",{className:"px-4 pb-2",children:[e.jsxs(w,{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(ht,{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 gn({frame:s,frameGroup:t,frameGroupPoints:a,updateFrameGroup:o,deleteFrameGroup:n}){const r=xt();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(Y,{onClick:r.clearTarget,className:"size-8"})]}),e.jsx("div",{className:"flex-1 overflow-auto pb-2",children:e.jsx(so,{frame:s,frameGroup:t,frameGroupPoints:a,updateFrameGroup:o,deleteFrameGroup:n})})]})}const oo="!h-14 w-full rounded-[16px] border border-[#2A3242] bg-transparent px-6 text-[#F4F7FC] placeholder:text-[#828DA3] focus:outline-none";function no({focalPoint:s,unselectFocalPoint:t,updateFocalPoint:a,deleteFocalPoint:o}){const{pointMeta:n,createPointMeta:r,updatePointMeta:i,deletePointMeta:l}=pt(),{canWrite:c}=W(),[d,m]=p.useState(!1),[u,x]=p.useState(!1),[v,I]=p.useState(!1),[h,j]=Z(s.name||""),[D,N]=Z(s.color||""),P=h!==s.name||D!==(s.color||""),g=D===""||/^#[0-9a-fA-F]{6}$/.test(D);return e.jsxs("div",{children:[e.jsx(ie,{type:"single",collapsible:!0,className:"border-b",defaultValue:"basics",children:e.jsxs(le,{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(ce,{className:"space-y-4 px-4 pt-2",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(U,{htmlFor:"name",className:"text-[#F4F7FC]",children:"Name"}),e.jsx(te,{id:"name",value:h,autoCorrect:"off",autoComplete:"off",autoCapitalize:"off",disabled:d,onChange:b=>j(b.target.value),placeholder:"Enter focal point name",className:oo})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(U,{className:"text-[#F4F7FC]",children:"Color"}),e.jsx(Bt,{color:D,onColorChange:N})]}),P&&e.jsx("div",{className:"flex justify-start",children:e.jsxs(w,{size:"lg",variant:"outline",className:"h-11 rounded-[0.75rem]",disabled:!c||!g,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(vt,{pointMetaList:n,createPointMeta:async(b,A)=>{await r(b,A)},deletePointMeta:async b=>{await l(b)},updatePointMeta:async(b,A,f)=>{await i(b,A,f)}}),e.jsxs("div",{className:"mt-6 px-4 pb-2",children:[e.jsxs(w,{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(ht,{open:v,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 In({focalPoint:s,updateFocalPoint:t,deleteFocalPoint:a}){const o=xt(),{pointMetaLoading:n}=pt();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(Y,{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(He,{})}):e.jsx(e.Fragment,{children:e.jsx(no,{focalPoint:s,unselectFocalPoint:o.clearTarget,updateFocalPoint:t,deleteFocalPoint:a})})})]})}const vn=C(`
|
|
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
|
-
`),jn=C(`
|
|
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
|
-
`),bn=C(`
|
|
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
|
-
`),yn=C(`
|
|
481
|
-
mutation DeleteFrameGroup($orgId: ID!, $mapId: ID!, $frameId: ID!, $id: ID!) {
|
|
482
|
-
deleteFrameGroup(orgId: $orgId, mapId: $mapId, frameId: $frameId, id: $id)
|
|
483
|
-
}
|
|
484
|
-
`),Cn=C(`
|
|
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
|
-
`),Nn=C(`
|
|
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
|
-
`),Dn=C(`
|
|
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
|
-
`),Fn=C(`
|
|
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,ee="var(--frame-image-canvas-width, 0)";function me(s){const t=`calc((${s.y} / ${z}) * ${ee})`,a=`calc((${s.x} / ${z}) * ${ee})`;return{top:t,left:a}}function ro(s,t){const a=`calc((${s} / ${z}) * ${ee})`,o=`calc((${t} / ${z}) * ${ee})`;return{width:a,height:o}}function $n(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 An(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 Sn(s,t){return t.x>=s.x&&t.x<=s.x+s.width&&t.y>=s.y&&t.y<=s.y+s.height}function we({...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 Pn({contentSize:s,focalPoint:t,onClick:a,onPointerDown:o}){return e.jsx("button",{type:"button",onClick:a,onPointerDown:o,style:{...me({x:t.locationX,y:t.locationY}),color:t.color?t.color:void 0},className:M("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(we,{})})}function wn({contentSize:s,frameGroup:t,isSelected:a,onClick:o,onResizePointerDown:n}){return e.jsxs("div",{className:"absolute",style:{...me({x:t.locationX,y:t.locationY}),...ro(t.width,t.height)},children:[e.jsx("button",{onClick:o,className:M("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:M("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 Mn({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(za,{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 io=K({label:O().min(1,"Label is required")});function jt({defaultValues:s={},onSubmit:t}){const a=se({resolver:oe(io),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(at,{name:"label",control:a.control,render:({field:o})=>e.jsxs("div",{className:"space-y-2",children:[e.jsx(U,{htmlFor:"label",className:"text-sm font-medium text-[#111110]",children:"Label"}),e.jsx(te,{...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 kn({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(Ke,{open:l||d?!0:r,onOpenChange:i,children:[e.jsx(Qe,{asChild:!0,children:e.jsxs("a",{target:"_blank",rel:"noreferrer",href:`/dashboard/frame/${t.targetFrameId}`,style:me({x:t.locationX,y:t.locationY}),className:M("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(we,{}),e.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:e.jsx(ae,{className:"size-[0.25em] text-white transition-all group-hover:text-white"})})]})}),e.jsx(Xe,{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(w,{preset:"outline",className:"size-8",disabled:!n,onClick:()=>c(!0),children:e.jsx(lt,{})}),e.jsx(w,{preset:"destructive",className:"size-8",disabled:!n,onClick:()=>m(!0),children:e.jsx(it,{})})]})]})})]}),e.jsx(ot,{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(q,{open:l,onOpenChange:c,children:e.jsx(jt,{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 En({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(Ke,{open:l||d?!0:r,onOpenChange:i,children:[e.jsx(Qe,{asChild:!0,children:e.jsxs("a",{target:"_blank",rel:"noreferrer",href:`/dashboard/maps/${t.targetMapId}`,style:me({x:t.locationX,y:t.locationY}),className:M("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(we,{}),e.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:e.jsx(ae,{className:"size-[0.25em] text-white transition-all group-hover:text-white"})})]})}),e.jsx(Xe,{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(w,{preset:"outline",className:"size-8",disabled:!n,onClick:()=>c(!0),children:e.jsx(lt,{})}),e.jsx(w,{preset:"destructive",className:"size-8",disabled:!n,onClick:()=>m(!0),children:e.jsx(it,{})})]})]})})]}),e.jsx(ot,{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(q,{open:l,onOpenChange:c,children:e.jsx(jt,{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{Wa as A,an as B,on as C,rn as D,hn as E,Rs as F,gn as G,fn as H,Mn as I,xn as J,kn as L,pn as M,nn as U,Ts as a,vn as b,Cn as c,jn as d,bn as e,yn as f,Nn as g,Dn as h,Fn as i,Sn as j,$n as k,An as l,me as m,ro as n,un as o,ln as p,wn as q,En as r,Pn as s,tn as t,xt as u,In as v,cn as w,mn as x,dn as y,Fe as z};
|