@protobase/ui 0.118.0 → 0.118.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/account/messages.d.ts +2 -2
- package/dist/app/app.js +67 -31
- package/dist/app/change-confirm/messages.d.ts +2 -2
- package/dist/app/charts/chart-params.js +1 -1
- package/dist/app/charts/messages.d.ts +2 -2
- package/dist/app/comments/messages.d.ts +2 -2
- package/dist/app/confirm-sign-in-messages.d.ts +2 -2
- package/dist/app/create/messages.d.ts +2 -2
- package/dist/app/delete/messages.d.ts +2 -2
- package/dist/app/displays/calendar-event.js +1 -1
- package/dist/app/displays/messages.d.ts +2 -2
- package/dist/app/displays/use-calendar-move.js +1 -1
- package/dist/app/embedded-list/messages.d.ts +2 -2
- package/dist/app/export/messages.d.ts +2 -2
- package/dist/app/field-messages.d.ts +2 -2
- package/dist/app/field-types/custom-step-container/messages.d.ts +2 -2
- package/dist/app/field-types/runner-install/messages.d.ts +2 -2
- package/dist/app/field-types/workflow/definition.d.ts +1 -1
- package/dist/app/field-types/workflow/messages.d.ts +2 -2
- package/dist/app/field-types/workflow-page/messages.d.ts +2 -2
- package/dist/app/field-types/workflow-run/messages.d.ts +2 -2
- package/dist/app/field-types/workflow-status/messages.d.ts +2 -2
- package/dist/app/file-viewers/messages.d.ts +2 -2
- package/dist/app/focus/messages.d.ts +2 -2
- package/dist/app/gallery/gallery-layout.d.ts +2 -2
- package/dist/app/gallery/messages.d.ts +2 -2
- package/dist/app/hand-order/messages.d.ts +2 -2
- package/dist/app/history/messages.d.ts +2 -2
- package/dist/app/import/messages.d.ts +2 -2
- package/dist/app/lazy-routes.d.ts +4 -0
- package/dist/app/lazy-routes.js +2 -1
- package/dist/app/list-messages.d.ts +2 -2
- package/dist/app/list-page.js +1 -1
- package/dist/app/messages.d.ts +2 -2
- package/dist/app/nav-recent.js +1 -1
- package/dist/app/new-version/messages.d.ts +2 -2
- package/dist/app/pages/messages.d.ts +2 -2
- package/dist/app/record-chart/messages.d.ts +2 -2
- package/dist/app/record-messages.d.ts +2 -2
- package/dist/app/record-mode/shown-layout.d.ts +1 -1
- package/dist/app/record-row/messages.d.ts +2 -2
- package/dist/app/related-cards/messages.d.ts +2 -2
- package/dist/app/runtime/messages.d.ts +2 -2
- package/dist/app/saved/messages.d.ts +2 -2
- package/dist/app/searches/messages.d.ts +2 -2
- package/dist/app/searches/update-search-dialog.js +1 -1
- package/dist/app/start-record.d.ts +22 -0
- package/dist/app/start-record.js +33 -0
- package/dist/app/use-nav-recent.d.ts +2 -2
- package/dist/app/use-nav-recent.js +8 -3
- package/dist/app/use-start-address.d.ts +21 -0
- package/dist/app/use-start-address.js +49 -0
- package/dist/app-shell/messages.d.ts +2 -2
- package/dist/app-shell/profile-menu.d.ts +2 -0
- package/dist/app-shell/profile-menu.js +1 -1
- package/dist/assistant-dock/messages.d.ts +2 -2
- package/dist/auth/messages.d.ts +2 -2
- package/dist/calls/messages.d.ts +2 -2
- package/dist/carousel/messages.d.ts +2 -2
- package/dist/chat/messages.d.ts +2 -2
- package/dist/data/query-keys.d.ts +4 -0
- package/dist/data/query-keys.js +11 -0
- package/dist/data/start-cache/restored-state.d.ts +7 -0
- package/dist/data/start-cache/restored-state.js +5 -1
- package/dist/data-grid/column-spec.d.ts +1 -1
- package/dist/data-grid/messages.d.ts +2 -2
- package/dist/filter-panel/messages.d.ts +2 -2
- package/dist/forms/messages.d.ts +2 -2
- package/dist/inline-child-table/messages.d.ts +2 -2
- package/dist/invitations/messages.d.ts +2 -2
- package/dist/locale/en.js +38 -21
- package/dist/locale/en.json.d.ts +17 -0
- package/dist/locale/messages.d.ts +34 -0
- package/dist/locale/nl.js +38 -21
- package/dist/notifications/bell/messages.d.ts +2 -2
- package/dist/organizations/all-organizations.js +5 -3
- package/dist/organizations/first-organization-page.d.ts +21 -0
- package/dist/organizations/first-organization-page.js +125 -0
- package/dist/organizations/invitations-page.js +3 -1
- package/dist/organizations/members-page.js +5 -2
- package/dist/organizations/messages.d.ts +2 -2
- package/dist/organizations/my-invitation-row.d.ts +11 -0
- package/dist/organizations/my-invitation-row.js +34 -0
- package/dist/organizations/new-organization-form.d.ts +10 -0
- package/dist/organizations/new-organization-form.js +76 -0
- package/dist/organizations/organization-page.js +9 -6
- package/dist/organizations/organization-paths.d.ts +7 -2
- package/dist/organizations/organization-paths.js +14 -8
- package/dist/organizations/organization-word.d.ts +14 -0
- package/dist/organizations/organization-word.js +22 -0
- package/dist/organizations/organizations-page.d.ts +0 -2
- package/dist/organizations/organizations-page.js +31 -98
- package/dist/organizations/use-my-invitations.d.ts +17 -0
- package/dist/organizations/use-my-invitations.js +30 -0
- package/dist/organizations/use-organizations.d.ts +4 -0
- package/dist/organizations/use-organizations.js +8 -3
- package/dist/package.js +1 -1
- package/dist/primitives/messages.d.ts +2 -2
- package/dist/shell/assets/{account-page-DOXkanFO.js → account-page-D9hXd-u3.js} +2 -2
- package/dist/shell/assets/app-D6luJ1k4.js +34 -0
- package/dist/shell/assets/{app-Dq5eubgK.css → app-xwgcmboV.css} +1 -1
- package/dist/shell/assets/{assistant-shell-Drpmyy7B.js → assistant-shell-DDkCxLNG.js} +2 -2
- package/dist/shell/assets/board-display-plYPsh6z.js +2 -0
- package/dist/shell/assets/calendar-display-B3kFBd2k.js +2 -0
- package/dist/shell/assets/{call-rings-C7f5skja.js → call-rings-B5rBD5EL.js} +2 -2
- package/dist/shell/assets/{calls-Ca2RAgzS.js → calls-z1AEvYOC.js} +2 -2
- package/dist/shell/assets/{circle-alert-B5-CtUEU.js → circle-alert-C_1i142n.js} +2 -2
- package/dist/shell/assets/{composed-page-BMYkHKrZ.js → composed-page--UJ8tsC0.js} +2 -2
- package/dist/shell/assets/{composer-section-CHUNzdVu.js → composer-section-tfrO2pIi.js} +2 -2
- package/dist/shell/assets/{connect-route-B_u1trIm.js → connect-route-rVNQDWcE.js} +2 -2
- package/dist/shell/assets/{copy-field-9SzlccPw.js → copy-field-D9agQmK0.js} +2 -2
- package/dist/shell/assets/create-route-C4xN9aXd.js +2 -0
- package/dist/shell/assets/{custom-step-container-field-BqLAbXaI.js → custom-step-container-field-BanmPoI-.js} +4 -4
- package/dist/shell/assets/embedded-list-B_e_Quer.js +3 -0
- package/dist/shell/assets/{en-wsBk87ZG.js → en-BrEwbNhJ.js} +2 -2
- package/dist/shell/assets/{export-dialog-DG5H_BHu.js → export-dialog-g69vJ8j2.js} +2 -2
- package/dist/shell/assets/export-worker-DuHOhIiP.js +15 -0
- package/dist/shell/assets/first-organization-page-Cijgw9tC.js +2 -0
- package/dist/shell/assets/{graph-view-DFeWGm5G.js → graph-view-DXDcn-Fx.js} +2 -2
- package/dist/shell/assets/{group-donut-D9vSqco5.js → group-donut-B3bCn83A.js} +2 -2
- package/dist/shell/assets/{guest-call-page-DIEo-q93.js → guest-call-page-rAD4EXPd.js} +3 -3
- package/dist/shell/assets/{html-viewer-F2craD8b.js → html-viewer-BxhCE5h2.js} +2 -2
- package/dist/shell/assets/{import-dialog-C6QghYOc.js → import-dialog-adjnDUuk.js} +2 -2
- package/dist/shell/assets/{import-table-dialog-BzpzE7wd.js → import-table-dialog-yV9UTlBY.js} +2 -2
- package/dist/shell/assets/{index-lcg5mDSu.js → index-BBHelxJ2.js} +1 -1
- package/dist/shell/assets/invitations-page-FKTUQL8J.js +2 -0
- package/dist/shell/assets/{layout-grid-XTZwSFbV.js → layout-grid-B3Php1Rf.js} +2 -2
- package/dist/shell/assets/{legend-item-BoeI6b5Y.js → legend-item-BbV6BD6w.js} +2 -2
- package/dist/shell/assets/list-page-CNhV2TuF.js +4 -0
- package/dist/shell/assets/{maplibre-CLloBp_X.js → maplibre-D4xk_BLC.js} +2 -2
- package/dist/shell/assets/{markdown-content-CEV942Pa.js → markdown-content-CnNrPGcY.js} +2 -2
- package/dist/shell/assets/members-page-CnxFoeyp.js +2 -0
- package/dist/shell/assets/messages-BHPGrBhJ.js +2 -0
- package/dist/shell/assets/{nl-nieWXCy1.js → nl-Dto12ewP.js} +2 -2
- package/dist/shell/assets/organization-page-B6k9pMkb.js +2 -0
- package/dist/shell/assets/organizations-page-D33Ruydz.js +2 -0
- package/dist/shell/assets/parse-worker-BRxyLV_D.js +35 -0
- package/dist/shell/assets/{pending-invitation-row-T-_gptFs.js → pending-invitation-row-D_vU7ynw.js} +2 -2
- package/dist/shell/assets/{period-chart-BLA0qneK.js → period-chart-DPlEbvX7.js} +2 -2
- package/dist/shell/assets/{person-row-CB2jyi4a.js → person-row-DMY-aQjx.js} +2 -2
- package/dist/shell/assets/public-form-page-DTgXLDpt.js +2 -0
- package/dist/shell/assets/{record-lines-C-s6d1b-.js → record-lines-SeXhFNSm.js} +2 -2
- package/dist/shell/assets/{record-map-1LgfFbVl.js → record-map-BiLFEqYi.js} +2 -2
- package/dist/shell/assets/{record-opens-DayPkcEp.js → record-opens-Ct9iF9FZ.js} +2 -2
- package/dist/shell/assets/record-page-TxDSHcMe.js +3 -0
- package/dist/shell/assets/{record-preview-DYLddBgR.js → record-preview-J1o4Sqs-.js} +2 -2
- package/dist/shell/assets/{records-map-Dbzp06m5.js → records-map-Cwdig5mb.js} +2 -2
- package/dist/shell/assets/render-node-BpHo-wre.js +3 -0
- package/dist/shell/assets/reorder-button-CBOmzmhg.js +2 -0
- package/dist/shell/assets/{run-trace-view-C7Fa31YF.js → run-trace-view-1fk6kU1U.js} +2 -2
- package/dist/shell/assets/{runner-install-field-Bpj6cGb0.js → runner-install-field-C_hTvogl.js} +2 -2
- package/dist/shell/assets/{runtime-update-CZ31fRYM.js → runtime-update-8hRmQkq-.js} +2 -2
- package/dist/shell/assets/shared-protobase-ui-Tq2sgl9G.js +1 -0
- package/dist/shell/assets/{sheet-source-CpQBUfMu.js → sheet-source-CD5hImgE.js} +3 -3
- package/dist/shell/assets/sign-in-policy-page-BQ8ck7Ar.js +2 -0
- package/dist/shell/assets/start-block-queries-4uvupY9E.js +2 -0
- package/dist/shell/assets/step-catalog-B2eQNTOp.js +2 -0
- package/dist/shell/assets/{step-panel-BNu4CT-a.js → step-panel-BVdV2FNT.js} +2 -2
- package/dist/shell/assets/timeline-display-BxihBkFH.js +2 -0
- package/dist/shell/assets/{trash-DGtnZxzc.js → trash-5PpoeP3R.js} +2 -2
- package/dist/shell/assets/{update-set-DmSoOUGC.js → update-set-BnRA9YhA.js} +2 -2
- package/dist/shell/assets/use-calendar-move-Bu9MSBcs.js +2 -0
- package/dist/shell/assets/{use-display-rows-QMseygYe.js → use-display-rows-ERQ-vbki.js} +2 -2
- package/dist/shell/assets/use-my-invitations-CnAvjXV0.js +2 -0
- package/dist/shell/assets/{use-paged-search-CI7t7XI0.js → use-paged-search-CcEitpWG.js} +2 -2
- package/dist/shell/assets/{use-run-trace-D0jDOrL8.js → use-run-trace-CV461SQS.js} +2 -2
- package/dist/shell/assets/{use-workflow-page-BMjBBt83.js → use-workflow-page-peSmP1Jq.js} +2 -2
- package/dist/shell/assets/{use-workflow-types-8ZRuZVuJ.js → use-workflow-types-xM8CZO96.js} +2 -2
- package/dist/shell/assets/{workflow-canvas-DtTiaGIh.js → workflow-canvas-CkKd9u0-.js} +4 -4
- package/dist/shell/assets/{workflow-field-2I9HpR3s.js → workflow-field-WovRhNaT.js} +3 -3
- package/dist/shell/assets/{workflow-graph-editor-DJoriSTb.js → workflow-graph-editor-DRZ2UtBp.js} +2 -2
- package/dist/shell/assets/{workflow-run-field-BB6DMeK0.js → workflow-run-field-CrBAVhOq.js} +3 -3
- package/dist/shell/assets/workflow-status-field-DgjtbjlH.js +2 -0
- package/dist/shell/assets/workflow-workbench-D8vU7ifz.js +4 -0
- package/dist/shell/index.html +4 -4
- package/dist/shell/protobase.shell.json +2 -2
- package/dist/shell/protobase.sw.js +2 -2
- package/dist/shell-source-maps/assets/{account-page-DOXkanFO.js.map → account-page-D9hXd-u3.js.map} +1 -1
- package/dist/shell-source-maps/assets/app-D6luJ1k4.js.map +1 -0
- package/dist/shell-source-maps/assets/{assistant-shell-Drpmyy7B.js.map → assistant-shell-DDkCxLNG.js.map} +1 -1
- package/dist/shell-source-maps/assets/{board-display-D9PUmRbl.js.map → board-display-plYPsh6z.js.map} +1 -1
- package/dist/shell-source-maps/assets/{calendar-display-B8J8DI5J.js.map → calendar-display-B3kFBd2k.js.map} +1 -1
- package/dist/shell-source-maps/assets/{call-rings-C7f5skja.js.map → call-rings-B5rBD5EL.js.map} +1 -1
- package/dist/shell-source-maps/assets/{calls-Ca2RAgzS.js.map → calls-z1AEvYOC.js.map} +1 -1
- package/dist/shell-source-maps/assets/{circle-alert-B5-CtUEU.js.map → circle-alert-C_1i142n.js.map} +1 -1
- package/dist/shell-source-maps/assets/{composed-page-BMYkHKrZ.js.map → composed-page--UJ8tsC0.js.map} +1 -1
- package/dist/shell-source-maps/assets/{composer-section-CHUNzdVu.js.map → composer-section-tfrO2pIi.js.map} +1 -1
- package/dist/shell-source-maps/assets/{connect-route-B_u1trIm.js.map → connect-route-rVNQDWcE.js.map} +1 -1
- package/dist/shell-source-maps/assets/{copy-field-9SzlccPw.js.map → copy-field-D9agQmK0.js.map} +1 -1
- package/dist/shell-source-maps/assets/{create-route-rbublA-_.js.map → create-route-C4xN9aXd.js.map} +1 -1
- package/dist/shell-source-maps/assets/{custom-step-container-field-BqLAbXaI.js.map → custom-step-container-field-BanmPoI-.js.map} +1 -1
- package/dist/shell-source-maps/assets/{embedded-list-CdFZ5TIe.js.map → embedded-list-B_e_Quer.js.map} +1 -1
- package/dist/shell-source-maps/assets/en-BrEwbNhJ.js.map +1 -0
- package/dist/shell-source-maps/assets/{export-dialog-DG5H_BHu.js.map → export-dialog-g69vJ8j2.js.map} +1 -1
- package/dist/shell-source-maps/assets/export-worker-DuHOhIiP.js.map +1 -0
- package/dist/shell-source-maps/assets/first-organization-page-Cijgw9tC.js.map +1 -0
- package/dist/shell-source-maps/assets/{graph-view-DFeWGm5G.js.map → graph-view-DXDcn-Fx.js.map} +1 -1
- package/dist/shell-source-maps/assets/{group-donut-D9vSqco5.js.map → group-donut-B3bCn83A.js.map} +1 -1
- package/dist/shell-source-maps/assets/{guest-call-page-DIEo-q93.js.map → guest-call-page-rAD4EXPd.js.map} +1 -1
- package/dist/shell-source-maps/assets/{html-viewer-F2craD8b.js.map → html-viewer-BxhCE5h2.js.map} +1 -1
- package/dist/shell-source-maps/assets/{import-dialog-C6QghYOc.js.map → import-dialog-adjnDUuk.js.map} +1 -1
- package/dist/shell-source-maps/assets/{import-table-dialog-BzpzE7wd.js.map → import-table-dialog-yV9UTlBY.js.map} +1 -1
- package/dist/shell-source-maps/assets/invitations-page-FKTUQL8J.js.map +1 -0
- package/dist/shell-source-maps/assets/{layout-grid-XTZwSFbV.js.map → layout-grid-B3Php1Rf.js.map} +1 -1
- package/dist/shell-source-maps/assets/{legend-item-BoeI6b5Y.js.map → legend-item-BbV6BD6w.js.map} +1 -1
- package/dist/shell-source-maps/assets/{list-page-C7h-_WJY.js.map → list-page-CNhV2TuF.js.map} +1 -1
- package/dist/shell-source-maps/assets/{maplibre-CLloBp_X.js.map → maplibre-D4xk_BLC.js.map} +1 -1
- package/dist/shell-source-maps/assets/{markdown-content-CEV942Pa.js.map → markdown-content-CnNrPGcY.js.map} +1 -1
- package/dist/shell-source-maps/assets/members-page-CnxFoeyp.js.map +1 -0
- package/dist/shell-source-maps/assets/{messages-lXPHUGLV.js.map → messages-BHPGrBhJ.js.map} +1 -1
- package/dist/shell-source-maps/assets/nl-Dto12ewP.js.map +1 -0
- package/dist/shell-source-maps/assets/organization-page-B6k9pMkb.js.map +1 -0
- package/dist/shell-source-maps/assets/organizations-page-D33Ruydz.js.map +1 -0
- package/dist/shell-source-maps/assets/parse-worker-BRxyLV_D.js.map +1 -0
- package/dist/shell-source-maps/assets/{pending-invitation-row-T-_gptFs.js.map → pending-invitation-row-D_vU7ynw.js.map} +1 -1
- package/dist/shell-source-maps/assets/{period-chart-BLA0qneK.js.map → period-chart-DPlEbvX7.js.map} +1 -1
- package/dist/shell-source-maps/assets/{person-row-CB2jyi4a.js.map → person-row-DMY-aQjx.js.map} +1 -1
- package/dist/shell-source-maps/assets/{public-form-page-CvtOJGMY.js.map → public-form-page-DTgXLDpt.js.map} +1 -1
- package/dist/shell-source-maps/assets/{record-lines-C-s6d1b-.js.map → record-lines-SeXhFNSm.js.map} +1 -1
- package/dist/shell-source-maps/assets/{record-map-1LgfFbVl.js.map → record-map-BiLFEqYi.js.map} +1 -1
- package/dist/shell-source-maps/assets/{record-opens-DayPkcEp.js.map → record-opens-Ct9iF9FZ.js.map} +1 -1
- package/dist/shell-source-maps/assets/{record-page-BMFIEvdR.js.map → record-page-TxDSHcMe.js.map} +1 -1
- package/dist/shell-source-maps/assets/{record-preview-DYLddBgR.js.map → record-preview-J1o4Sqs-.js.map} +1 -1
- package/dist/shell-source-maps/assets/{records-map-Dbzp06m5.js.map → records-map-Cwdig5mb.js.map} +1 -1
- package/dist/shell-source-maps/assets/{render-node-DEeBoZ9i.js.map → render-node-BpHo-wre.js.map} +1 -1
- package/dist/shell-source-maps/assets/{reorder-button-BauUDONv.js.map → reorder-button-CBOmzmhg.js.map} +1 -1
- package/dist/shell-source-maps/assets/{run-trace-view-C7Fa31YF.js.map → run-trace-view-1fk6kU1U.js.map} +1 -1
- package/dist/shell-source-maps/assets/{runner-install-field-Bpj6cGb0.js.map → runner-install-field-C_hTvogl.js.map} +1 -1
- package/dist/shell-source-maps/assets/{runtime-update-CZ31fRYM.js.map → runtime-update-8hRmQkq-.js.map} +1 -1
- package/dist/shell-source-maps/assets/{sheet-source-CpQBUfMu.js.map → sheet-source-CD5hImgE.js.map} +1 -1
- package/dist/shell-source-maps/assets/{sign-in-policy-page-BumL1ZPK.js.map → sign-in-policy-page-BQ8ck7Ar.js.map} +1 -1
- package/dist/shell-source-maps/assets/{start-block-queries-DYE83u9M.js.map → start-block-queries-4uvupY9E.js.map} +1 -1
- package/dist/shell-source-maps/assets/{step-catalog-DAHY1jbn.js.map → step-catalog-B2eQNTOp.js.map} +1 -1
- package/dist/shell-source-maps/assets/{step-panel-BNu4CT-a.js.map → step-panel-BVdV2FNT.js.map} +1 -1
- package/dist/shell-source-maps/assets/{timeline-display-Dj7rfbX5.js.map → timeline-display-BxihBkFH.js.map} +1 -1
- package/dist/shell-source-maps/assets/{trash-DGtnZxzc.js.map → trash-5PpoeP3R.js.map} +1 -1
- package/dist/shell-source-maps/assets/{update-set-DmSoOUGC.js.map → update-set-BnRA9YhA.js.map} +1 -1
- package/dist/shell-source-maps/assets/{use-calendar-move-r5AsNTri.js.map → use-calendar-move-Bu9MSBcs.js.map} +1 -1
- package/dist/shell-source-maps/assets/{use-display-rows-QMseygYe.js.map → use-display-rows-ERQ-vbki.js.map} +1 -1
- package/dist/shell-source-maps/assets/use-my-invitations-CnAvjXV0.js.map +1 -0
- package/dist/shell-source-maps/assets/{use-paged-search-CI7t7XI0.js.map → use-paged-search-CcEitpWG.js.map} +1 -1
- package/dist/shell-source-maps/assets/{use-run-trace-D0jDOrL8.js.map → use-run-trace-CV461SQS.js.map} +1 -1
- package/dist/shell-source-maps/assets/{use-workflow-page-BMjBBt83.js.map → use-workflow-page-peSmP1Jq.js.map} +1 -1
- package/dist/shell-source-maps/assets/{use-workflow-types-8ZRuZVuJ.js.map → use-workflow-types-xM8CZO96.js.map} +1 -1
- package/dist/shell-source-maps/assets/{workflow-canvas-DtTiaGIh.js.map → workflow-canvas-CkKd9u0-.js.map} +1 -1
- package/dist/shell-source-maps/assets/{workflow-field-2I9HpR3s.js.map → workflow-field-WovRhNaT.js.map} +1 -1
- package/dist/shell-source-maps/assets/{workflow-graph-editor-DJoriSTb.js.map → workflow-graph-editor-DRZ2UtBp.js.map} +1 -1
- package/dist/shell-source-maps/assets/{workflow-run-field-BB6DMeK0.js.map → workflow-run-field-CrBAVhOq.js.map} +1 -1
- package/dist/shell-source-maps/assets/workflow-status-field-DgjtbjlH.js.map +1 -0
- package/dist/shell-source-maps/assets/{workflow-workbench-PnPXVcoE.js.map → workflow-workbench-D8vU7ifz.js.map} +1 -1
- package/dist/status/messages.d.ts +2 -2
- package/dist/users/messages.d.ts +2 -2
- package/package.json +5 -5
- package/dist/shell/assets/app-B48LQpC1.js +0 -34
- package/dist/shell/assets/board-display-D9PUmRbl.js +0 -2
- package/dist/shell/assets/calendar-display-B8J8DI5J.js +0 -2
- package/dist/shell/assets/create-route-rbublA-_.js +0 -2
- package/dist/shell/assets/embedded-list-CdFZ5TIe.js +0 -3
- package/dist/shell/assets/export-worker-CQwKM8Oc.js +0 -15
- package/dist/shell/assets/invitations-page-nBjy3DSn.js +0 -2
- package/dist/shell/assets/list-page-C7h-_WJY.js +0 -4
- package/dist/shell/assets/members-page-D1uMhOZR.js +0 -2
- package/dist/shell/assets/messages-lXPHUGLV.js +0 -2
- package/dist/shell/assets/organization-page-RMZnMPR0.js +0 -2
- package/dist/shell/assets/organizations-page-Ce6Nwl7X.js +0 -2
- package/dist/shell/assets/parse-worker-BN8cVWIa.js +0 -35
- package/dist/shell/assets/public-form-page-CvtOJGMY.js +0 -2
- package/dist/shell/assets/record-page-BMFIEvdR.js +0 -3
- package/dist/shell/assets/render-node-DEeBoZ9i.js +0 -3
- package/dist/shell/assets/reorder-button-BauUDONv.js +0 -2
- package/dist/shell/assets/shared-protobase-ui-BGJ_UVNP.js +0 -1
- package/dist/shell/assets/sign-in-policy-page-BumL1ZPK.js +0 -2
- package/dist/shell/assets/start-block-queries-DYE83u9M.js +0 -2
- package/dist/shell/assets/step-catalog-DAHY1jbn.js +0 -2
- package/dist/shell/assets/timeline-display-Dj7rfbX5.js +0 -2
- package/dist/shell/assets/use-calendar-move-r5AsNTri.js +0 -2
- package/dist/shell/assets/workflow-status-field-L_mimjzo.js +0 -2
- package/dist/shell/assets/workflow-workbench-PnPXVcoE.js +0 -4
- package/dist/shell-source-maps/assets/app-B48LQpC1.js.map +0 -1
- package/dist/shell-source-maps/assets/en-wsBk87ZG.js.map +0 -1
- package/dist/shell-source-maps/assets/export-worker-CQwKM8Oc.js.map +0 -1
- package/dist/shell-source-maps/assets/invitations-page-nBjy3DSn.js.map +0 -1
- package/dist/shell-source-maps/assets/members-page-D1uMhOZR.js.map +0 -1
- package/dist/shell-source-maps/assets/nl-nieWXCy1.js.map +0 -1
- package/dist/shell-source-maps/assets/organization-page-RMZnMPR0.js.map +0 -1
- package/dist/shell-source-maps/assets/organizations-page-Ce6Nwl7X.js.map +0 -1
- package/dist/shell-source-maps/assets/parse-worker-BN8cVWIa.js.map +0 -1
- package/dist/shell-source-maps/assets/workflow-status-field-L_mimjzo.js.map +0 -1
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
(function(){try{var e=typeof globalThis<`u`?globalThis:typeof window<`u`?window:typeof global<`u`?global:typeof self<`u`?self:{};e._sentryModuleMetadata=e._sentryModuleMetadata||{},e._sentryModuleMetadata[new e.Error().stack]=function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];if(n!=null)for(var r in n)n.hasOwnProperty(r)&&(e[r]=n[r])}return e}({},e._sentryModuleMetadata[new e.Error().stack],{"_sentryBundlerPluginAppKey:protobase-app":!0})}catch{}})();import{o as e}from"./rolldown-runtime-DFwUHQ4A.js";import{i as t,t as n}from"./react-CuiNlnus.js";import{Ga as r,Ja as i,Uo as a,Ya as o,ds as s,qa as c}from"./app-B48LQpC1.js";import{t as l}from"./page-header-Ddz2r5ic.js";import{n as u,t as d}from"./pending-invitation-row-T-_gptFs.js";import{n as f}from"./person-row-CB2jyi4a.js";import{assignableOrganizationRoles as p}from"./members-page-D1uMhOZR.js";var m=e(t(),1),h=e(n(),1),g=({current:e,onSent:t})=>{let{session:n,organizations:i}=s(),a=i?.roles??[],[l,d]=(0,m.useState)(`member`),[g,_]=(0,m.useState)([]);return(0,h.jsx)(u,{title:o(`inviteSomeone`),description:o(`inviteDescription`),onInvite:async r=>{let i=await n.organizations.invite(e.organization.id,{email:r,role:l,appRoles:g});return _([]),t(),i},beside:(0,h.jsx)(`select`,{"aria-label":o(`organizationRole`),value:l,onChange:e=>d(e.target.value),className:`h-8 rounded-md border border-border-strong bg-background px-2`,children:p(e).map(e=>(0,h.jsx)(`option`,{value:e,children:c(e)},e))}),children:(0,h.jsx)(f,{roles:a.filter(e=>e.membership),selected:g,grantable:r(a,e),onChange:_})})},_=({invitation:e,organizationId:t,onChanged:n})=>{let{session:r,organizations:a}=s(),o=e.appRoles.map(e=>i(a?.roles??[],e));return(0,h.jsx)(d,{email:e.email,gives:`${c(e.role)}${o.length>0?` · ${o.join(`, `)}`:``}`,expiresAt:e.expiresAt,onResend:async()=>{let i=await r.organizations.resend(t,e);return n(),i},onRevoke:async()=>{await r.organizations.revoke(e.id),n()}})},v=({current:e})=>{let{session:t}=s(),[n,r]=(0,m.useState)([]),i=e?.organization?.id,c=(0,m.useCallback)(()=>{i&&t.organizations.invitations(i).then(e=>r(e.filter(e=>e.status===`pending`)),()=>r([]))},[t,i]);return(0,m.useEffect)(c,[c]),!e?.organization||!i?null:(0,h.jsxs)(`div`,{className:`mx-auto flex w-full max-w-3xl flex-col gap-4 px-4 py-6 md:px-6`,children:[(0,h.jsx)(l,{title:o(`invitations`),subtitle:o(`peopleInvited`,{organization:e.organization.name})}),(0,h.jsx)(g,{current:e,onSent:c}),(0,h.jsx)(a,{title:o(`notAcceptedYet`),description:n.length>0?o(`sendingAgain`):o(`nobodyWaiting`),children:n.length>0&&(0,h.jsx)(`ul`,{className:`divide-y rounded-md border`,children:n.map(e=>(0,h.jsx)(_,{invitation:e,organizationId:i,onChanged:c},e.id))})})]})};export{v as InvitationsPage};
|
|
2
|
-
//# debugId=27063cb7-0d29-4422-899e-202272e67b1d
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/import-dialog-C6QghYOc.js","assets/rolldown-runtime-DFwUHQ4A.js","assets/react-CuiNlnus.js","assets/app-B48LQpC1.js","assets/vendor-t7Q7QbPu.js","assets/app-Dq5eubgK.css","assets/sheet-source-CpQBUfMu.js","assets/import-table-dialog-BzpzE7wd.js","assets/export-dialog-DG5H_BHu.js","assets/embedded-list-CdFZ5TIe.js","assets/update-set-DmSoOUGC.js","assets/layout-grid-XTZwSFbV.js","assets/lib-tanstack-react-table-uAPG3Sdi.js","assets/lib-tanstack-store-KbP08Dw1.js","assets/lib-tanstack-react-store-BKI8EKbh.js","assets/lib-use-sync-external-store-D4s7MiFL.js","assets/lib-tanstack-table-core-2MHQ7o_e.js","assets/record-preview-DYLddBgR.js","assets/lib-dnd-kit-core-xi-7xL_N.js","assets/lib-dnd-kit-utilities-Bvr0fWXF.js","assets/lib-dnd-kit-accessibility-AUTLnqh4.js","assets/lib-dnd-kit-sortable-CNDSKqCD.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
(function(){try{var e=typeof globalThis<`u`?globalThis:typeof window<`u`?window:typeof global<`u`?global:typeof self<`u`?self:{};e._sentryModuleMetadata=e._sentryModuleMetadata||{},e._sentryModuleMetadata[new e.Error().stack]=function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];if(n!=null)for(var r in n)n.hasOwnProperty(r)&&(e[r]=n[r])}return e}({},e._sentryModuleMetadata[new e.Error().stack],{"_sentryBundlerPluginAppKey:protobase-app":!0})}catch{}})();import{o as e}from"./rolldown-runtime-DFwUHQ4A.js";import{i as t,t as n}from"./react-CuiNlnus.js";import{$c as r,$s as i,Ac as a,Ai as o,Bi as s,Bl as c,C as l,Ca as u,Dc as d,Fo as f,Ft as p,Gn as m,Gs as h,Hc as g,Hi as _,Hl as v,Il as y,Jn as b,Kr as x,Lr as S,M as C,Ma as w,Mi as T,Mo as E,Mr as D,Nc as O,Nn as k,O as ee,Oc as te,Pc as A,Pi as j,Pl as ne,Po as re,Qc as ie,Qo as ae,Qr as oe,Ri as M,Rr as se,Rs as N,S as P,Sa as ce,So as le,T as F,Ta as ue,Ti as I,Tn as de,Vc as L,Vr as R,Wc as fe,Wn as pe,Xa as z,Xc as me,Xo as he,Xs as B,Yc as ge,Zo as _e,Zr as ve,b as ye,bc as be,cl as xe,dc as Se,ds as Ce,ec as we,el as V,fa as Te,ho as Ee,ic as De,il as Oe,is as H,ji as ke,jr as Ae,k as je,ka as Me,kn as Ne,kt as Pe,lt as Fe,mi as Ie,mo as Le,mr as Re,qi as U,qn as ze,qs as W,rc as G,ri as Be,sc as K,si as Ve,ui as He,un as Ue,vn as We,vo as Ge,xa as Ke,xo as qe,yo as Je,zi as Ye}from"./app-B48LQpC1.js";import{C as Xe,f as Ze,h as Qe,i as $e,o as et,s as tt}from"./vendor-t7Q7QbPu.js";import{n as nt}from"./view-chart-ChBtewKd.js";import{$ as rt,A as it,B as at,D as ot,E as st,F as ct,G as lt,H as ut,I as dt,J as q,K as ft,L as pt,M as mt,N as ht,O as gt,P as _t,Q as vt,R as yt,T as bt,U as xt,V as St,W as Ct,X as wt,Y as Tt,Z as J,b as Et,d as Dt,et as Ot,f as kt,ft as At,h as jt,i as Mt,j as Nt,k as Pt,m as Ft,n as It,p as Lt,pt as Rt,q as zt,u as Bt,v as Vt,w as Ht,x as Ut,xt as Y,y as Wt,z as Gt}from"./embedded-list-CdFZ5TIe.js";import{a as Kt,i as qt,n as Jt,r as Yt,t as Xt}from"./reorder-button-BauUDONv.js";import{t as Zt}from"./trash-DGtnZxzc.js";import{t as Qt}from"./page-header-Ddz2r5ic.js";import{i as $t,r as en,t as tn}from"./record-preview-DYLddBgR.js";import{c as nn,l as rn}from"./messages-lXPHUGLV.js";import{t as an}from"./use-display-rows-QMseygYe.js";var on=new Set(`all.analyse.analyze.and.any.array.as.asc.asymmetric.both.case.cast.check.collate.column.constraint.create.current_catalog.current_date.current_role.current_time.current_timestamp.current_user.default.deferrable.desc.distinct.do.else.end.except.false.fetch.for.foreign.from.grant.group.having.in.initially.intersect.into.lateral.leading.limit.localtime.localtimestamp.not.null.offset.on.only.or.order.placing.primary.references.returning.select.session_user.some.symmetric.system_user.table.then.to.trailing.true.union.unique.user.using.variadic.when.where.window.with`.split(`.`)),sn=/^[a-z][a-z0-9_]*$/,cn=[`id`,`etag`,`organization_id`],ln=e=>sn.test(e)&&new TextEncoder().encode(e).length<=63,un=(e,t,n=63)=>{if(typeof e!=`string`||!ln(e)||new TextEncoder().encode(e).length>n)return`form`;if(on.has(e))return`reserved_word`;if(t===`field`&&cn.includes(e))return`reserved_field`},dn={name:`bookmark-check`,size:24,node:[[`path`,{d:`M17 3a2 2 0 0 1 2 2v15a1 1 0 0 1-1.496.868l-4.512-2.578a2 2 0 0 0-1.984 0l-4.512 2.578A1 1 0 0 1 5 20V5a2 2 0 0 1 2-2z`,key:`oz39mx`}],[`path`,{d:`m9 10 2 2 4-4`,key:`1gnqz4`}]]};dn.node;var fn=O(dn),pn={name:`bookmark-plus`,size:24,node:[[`path`,{d:`M12 7v6`,key:`lw1j43`}],[`path`,{d:`M15 10H9`,key:`o6yqo3`}],[`path`,{d:`M17 3a2 2 0 0 1 2 2v15a1 1 0 0 1-1.496.868l-4.512-2.578a2 2 0 0 0-1.984 0l-4.512 2.578A1 1 0 0 1 5 20V5a2 2 0 0 1 2-2z`,key:`oz39mx`}]]};pn.node;var mn=O(pn),hn={name:`lock`,size:24,node:[[`rect`,{width:`18`,height:`11`,x:`3`,y:`11`,rx:`2`,ry:`2`,key:`1w4ew1`}],[`path`,{d:`M7 11V7a5 5 0 0 1 10 0v4`,key:`fwvmzm`}]]};hn.node;var gn=O(hn),_n={name:`refresh-cw`,size:24,node:[[`path`,{d:`M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8`,key:`v9h5vc`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}],[`path`,{d:`M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16`,key:`3uifl3`}],[`path`,{d:`M8 16H3v5`,key:`1cv678`}]]};_n.node;var vn=O(_n),yn={name:`sliders-horizontal`,size:24,node:[[`path`,{d:`M10 5H3`,key:`1qgfaw`}],[`path`,{d:`M12 19H3`,key:`yhmn1j`}],[`path`,{d:`M14 3v4`,key:`1sua03`}],[`path`,{d:`M16 17v4`,key:`1q0r14`}],[`path`,{d:`M21 12h-9`,key:`1o4lsq`}],[`path`,{d:`M21 19h-5`,key:`1rlt1p`}],[`path`,{d:`M21 5h-7`,key:`1oszz2`}],[`path`,{d:`M8 10v4`,key:`tgpxqk`}],[`path`,{d:`M8 12H3`,key:`a7s4jb`}]]};yn.node;var bn=O(yn),xn=e=>e.normalize(`NFKD`).replace(/[̀-ͯ]/g,``).toLowerCase().replace(/[^a-z0-9]+/g,`_`).replace(/^_+|_+$/g,``),Sn=(e,t,n)=>(/^[a-z]/.test(e)?e:`${t}_${e}`).slice(0,n).replace(/_+$/,``),Cn=(e,t,n)=>{let r=e;for(let i=2;t.has(r)||on.has(r);i++){let t=`_${i}`;r=`${e.slice(0,n-t.length).replace(/_+$/,``)}${t}`}return r},wn=e=>e<26?String.fromCharCode(97+e):wn(Math.floor(e/26)-1)+wn(e%26),Tn=e=>{let t=new Set(cn);return e.map((e,n)=>{let r=xn(e),i=Cn(r===``?`column_${wn(n)}`:Sn(r,`column`,63),t,63);return t.add(i),i})},En=(e,t=[],n=63)=>{let r=xn(e.replace(/\.(csv|tsv|txt|xlsx|json)$/i,``));if(r!==``)return Cn(Sn(r,`table`,n),new Set(t),n)},X=e(n(),1),Dn=`inline-flex h-6 items-center gap-1 rounded-full border border-primary-border bg-primary-soft pl-2.5 pr-1.5 text-xs font-medium text-primary-text`,On=({chips:e,lockedLabels:t=[],onRemove:n,onClear:r,scroll:i})=>e.length===0&&t.length===0?null:(0,X.jsxs)(`div`,{className:i?`flex flex-nowrap items-center gap-1.5 overflow-x-auto pb-1 [&>*]:shrink-0`:`flex flex-wrap items-center gap-1.5`,children:[t.map(e=>(0,X.jsxs)(`span`,{className:`inline-flex h-6 items-center gap-1.5 rounded-full border border-border-strong bg-muted px-2.5 text-xs font-medium text-foreground`,children:[(0,X.jsx)(gn,{className:`size-3 text-muted-foreground`}),e]},e)),e.map(e=>(0,X.jsxs)(`span`,{className:Dn,children:[e.label,(0,X.jsx)(`button`,{type:`button`,"aria-label":q(`remove`,{label:e.label}),onClick:()=>n(e.key),className:`rounded-full p-0.5 hover:bg-primary-border/60`,children:(0,X.jsx)(G,{className:`size-3`})})]},e.key)),e.length>0&&(0,X.jsx)(`button`,{type:`button`,onClick:r,className:`ml-1 text-xs font-medium text-muted-foreground hover:text-foreground`,children:q(`clearAll`)})]}),kn=({value:e,presets:t=zt,onChange:n})=>(0,X.jsx)(`div`,{className:`flex flex-wrap gap-1.5`,children:t.map(t=>{let r=ft(t);return(0,X.jsx)(`button`,{type:`button`,disabled:!r,title:r?void 0:q(`unknownPreset`,{id:t}),onClick:()=>n(e===t?void 0:t),className:A(`h-7 rounded-md border px-2.5 text-body font-medium transition-colors`,!r&&`border-dashed text-danger-text`,e===t?`border-primary-border bg-primary-soft text-primary-text`:`border-border-strong bg-background text-muted-foreground hover:bg-muted`),children:r??q(`unsupported`,{id:t})},t)})}),An=(e,t)=>e.onSearch?e.options:e.options.filter(e=>St(e.label,t)),jn=(e,t,n)=>t===0?-1:n===`ArrowDown`?e<0?0:(e+1)%t:e<0?t-1:(e-1+t)%t,Z=e(t(),1),Mn=({config:e,selected:t,onToggle:n,inline:r=!1})=>{let i=(0,Z.useId)(),a=(0,Z.useRef)(null),[o,s]=(0,Z.useState)(``),[c,l]=(0,Z.useState)(!1),[u,d]=(0,Z.useState)(-1),f=r||c,p=An(e,o),m=(0,Z.useRef)(e.onSearch);m.current=e.onSearch,(0,Z.useEffect)(()=>()=>m.current?.(``),[]);let h=t=>{s(t),d(-1),e.onSearch?.(t)};return(0,X.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,X.jsxs)(`div`,{className:`flex min-h-8 cursor-text flex-wrap items-center gap-1 rounded-md border border-border-strong bg-background px-2 py-1 shadow-sm focus-within:border-primary focus-within:ring-2 focus-within:ring-primary/20`,onClick:()=>a.current?.focus(),children:[(0,X.jsx)(K,{className:`size-3.5 shrink-0 text-muted-foreground`}),t.map(t=>(0,X.jsx)(k,{label:at(e,t),onRemove:()=>n(t)},t)),(0,X.jsx)(`input`,{ref:a,autoFocus:r,role:`combobox`,"aria-label":e.label,"aria-expanded":f,"aria-controls":`${i}-options`,"aria-autocomplete":`list`,"aria-activedescendant":p[u]?`${i}-${u}`:void 0,placeholder:t.length>0?``:q(`searchIn`,{label:e.label}),className:`h-6 min-w-16 flex-1 bg-transparent text-foreground outline-none placeholder:text-faint-foreground`,value:o,onChange:e=>h(e.target.value),onKeyDown:e=>{if(e.key===`ArrowDown`||e.key===`ArrowUp`){e.preventDefault(),d(jn(u,p.length,e.key));return}if(e.key===`Enter`&&p[u]){e.preventDefault(),n(p[u].value);return}if(e.key===`Backspace`&&o===``&&t.length>0){n(t[t.length-1]);return}e.key===`Escape`&&o!==``&&(e.stopPropagation(),h(``))},onFocus:()=>l(!0),onBlur:()=>{l(!1),d(-1),!r&&o!==``&&h(``)}})]}),f&&(0,X.jsxs)(`ul`,{id:`${i}-options`,role:`listbox`,"aria-label":e.label,"aria-multiselectable":!0,className:A(`flex max-h-60 flex-col gap-px overflow-y-auto`,!r&&`rounded-md border bg-background p-1 shadow-sm`),children:[p.map((e,r)=>{let a=t.includes(e.value);return(0,X.jsxs)(`li`,{id:`${i}-${r}`,role:`option`,"aria-selected":a,tabIndex:-1,className:A(`flex cursor-pointer items-center gap-2 rounded px-1.5 py-1 hover:bg-muted`,r===u&&`bg-muted`),onMouseDown:e=>e.preventDefault(),onClick:()=>n(e.value),children:[(0,X.jsx)(`span`,{className:A(`inline-flex size-4 shrink-0 items-center justify-center rounded border`,a?`border-primary bg-primary text-primary-foreground`:`border-border-strong bg-background`),children:a&&(0,X.jsx)(te,{className:`size-3`,strokeWidth:3})}),(0,X.jsx)(`span`,{className:`flex-1 truncate`,children:e.label}),e.count!==void 0&&(0,X.jsx)(`span`,{className:`text-xs tabular-nums text-faint-foreground`,children:j(e.count)})]},e.value)}),e.failed&&(0,X.jsx)(`li`,{className:`px-1.5 py-1 text-xs text-danger-text`,children:q(`couldNotLoadCounts`)}),!e.failed&&p.length===0&&(0,X.jsx)(`li`,{className:`px-1.5 py-1 text-xs text-faint-foreground`,children:q(`noMatches`)})]})]})},Nn=({config:e,selected:t,onToggle:n})=>{let[r,i]=(0,Z.useState)(``),a=e.options.filter(e=>St(e.label,r));return(0,X.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[e.searchable&&(0,X.jsx)(le,{wrapperClassName:`mb-1 h-7`,leading:(0,X.jsx)(K,{className:`size-3.5`}),placeholder:q(`searchIn`,{label:e.label}),value:r,onChange:e=>i(e.target.value)}),a.map(e=>(0,X.jsxs)(`label`,{className:`flex cursor-pointer items-center gap-2 rounded px-1 py-1 hover:bg-muted`,children:[(0,X.jsx)(z,{checked:t.includes(e.value),onChange:()=>n(e.value),label:e.label}),(0,X.jsx)(`span`,{className:`flex-1 truncate`,children:e.label}),e.count!==void 0&&(0,X.jsx)(`span`,{className:`text-xs tabular-nums text-faint-foreground`,children:j(e.count)})]},e.value)),e.failed&&(0,X.jsx)(`span`,{className:`px-1 py-1 text-xs text-danger-text`,children:q(`couldNotLoadCounts`)}),!e.failed&&a.length===0&&(0,X.jsx)(`span`,{className:`px-1 py-1 text-xs text-faint-foreground`,children:q(`noMatches`)})]})},Pn=({label:e,activeCount:t,width:n=240,defaultOpen:r=!1,children:i})=>{let[a,o]=(0,Z.useState)(r),[s,c]=(0,Z.useState)({width:n}),l=(0,Z.useRef)(null),u=(0,Z.useRef)(null);(0,Z.useLayoutEffect)(()=>{if(!a||!l.current)return;let e=l.current.getBoundingClientRect(),t=document.documentElement.clientWidth,r=Math.min(n,Ge(t));c({width:r,right:e.left+r>t?e.right-Je(e.right,r,t):void 0})},[a,n]);let f=qe(a,l,u,s);return(0,Z.useEffect)(()=>{if(!a)return;let e=e=>{e.target instanceof Node&&!l.current?.contains(e.target)&&o(!1)};return document.addEventListener(`pointerdown`,e),()=>document.removeEventListener(`pointerdown`,e)},[a]),(0,X.jsxs)(`div`,{ref:l,className:`relative`,children:[(0,X.jsxs)(`button`,{type:`button`,"aria-expanded":a,onClick:()=>o(!a),className:A(`inline-flex h-8 items-center gap-1.5 rounded-md border bg-background px-2.5 font-medium shadow-sm transition-colors hover:bg-muted`,t>0?`border-primary-border text-primary-text`:`border-border-strong text-foreground`),children:[e,t>0&&(0,X.jsx)(`span`,{className:`rounded-full bg-primary px-1.5 text-[0.6875rem] leading-4 text-primary-foreground`,children:t}),(0,X.jsx)(d,{className:`size-3.5 text-muted-foreground`})]}),a&&(0,X.jsx)(`div`,{ref:u,className:A(`absolute top-full z-30 mt-1.5 rounded-lg border bg-background p-3 shadow-pop`,s.right===void 0&&`left-0`),style:{...s,...f},children:typeof i==`function`?i(()=>o(!1)):i})]})},Fn=({title:e,children:t})=>(0,X.jsxs)(`section`,{className:`flex flex-col gap-2 border-b py-3 last:border-b-0`,children:[(0,X.jsx)(`h3`,{className:`text-xs font-semibold uppercase tracking-wide text-muted-foreground`,children:e}),t]}),In=({items:e,onPick:t,close:n})=>{let r=(0,Z.useRef)([]);return(0,Z.useEffect)(()=>r.current[0]?.focus(),[]),(0,X.jsx)(`ul`,{role:`menu`,"aria-label":q(`moreFilters`),onKeyDown:t=>{if(t.key===`Escape`)return n();let i=Pe(t.key,r.current.indexOf(document.activeElement),e.length);i!==void 0&&(t.preventDefault(),r.current[i]?.focus())},className:`-mx-3 -my-3`,children:e.map((e,i)=>(0,X.jsx)(`li`,{role:`none`,children:(0,X.jsx)(`button`,{ref:e=>{r.current[i]=e},type:`button`,role:`menuitem`,className:Fe,onClick:()=>{n(),t(e.key)},children:e.label})},e.key))})},Ln=({items:e,onPick:t})=>e.length===0?null:(0,X.jsx)(Pn,{label:q(`moreFilters`),activeCount:0,children:n=>(0,X.jsx)(In,{items:e,onPick:t,close:n})}),Rn=(e,t,n,r,i)=>{let a=n+(r-n)*e/t;return n+(r-n)*(e+1)/t>i[0]&&a<i[1]},zn=(e,t,n)=>n===t?0:(e-t)/(n-t),Bn=(e,t,n)=>t===0?[Math.min(n,e[1]),e[1]]:[e[0],Math.max(n,e[0])],Vn=1e3,Hn=({config:e,value:t,onChange:n})=>{let{min:r,max:i,step:a,histogram:o,format:s}=e,[c,l]=(0,Z.useState)(),u=c??t??[r,i],d=Math.max(...o),f=()=>{c&&(l(void 0),n(c[0]===r&&c[1]===i?void 0:c))},p=Ye(c,Vn);return(0,Z.useEffect)(()=>{p&&f()},[p]),e.failed?(0,X.jsx)(`p`,{className:`text-xs text-danger-text`,children:q(`couldNotLoadCounts`)}):(0,X.jsxs)(`div`,{className:`w-full`,children:[(0,X.jsxs)(`div`,{className:`px-[7px]`,children:[o.length>0&&(0,X.jsx)(`div`,{className:`mb-1 flex h-12 items-end gap-0.5`,children:o.map((e,t)=>(0,X.jsx)(`span`,{className:A(`flex-1 rounded-t-sm`,Rn(t,o.length,r,i,u)?`bg-primary/70`:`bg-border`),style:{height:`${Math.max(6,e/d*100)}%`}},t))}),(0,X.jsxs)(`div`,{className:`relative h-4`,children:[(0,X.jsx)(`span`,{className:`absolute inset-x-0 top-1/2 h-1 -translate-y-1/2 rounded-full bg-border`}),(0,X.jsx)(`span`,{className:`absolute top-1/2 h-1 -translate-y-1/2 rounded-full bg-primary`,style:{left:`${zn(u[0],r,i)*100}%`,right:`${100-zn(u[1],r,i)*100}%`}})]})]}),(0,X.jsx)(`div`,{className:`relative -mt-4 h-4`,children:[0,1].map(t=>(0,X.jsx)(`input`,{type:`range`,className:`pb-range`,"aria-label":q(t===0?`minimum`:`maximum`,{label:e.label}),min:r,max:i,step:a,value:u[t],onChange:e=>l(Bn(u,t,Number(e.target.value))),onPointerUp:f,onTouchEnd:f,onBlur:f},t))}),(0,X.jsxs)(`div`,{className:`mt-2 flex justify-between text-xs tabular-nums text-muted-foreground`,children:[(0,X.jsx)(`span`,{children:s(u[0])}),(0,X.jsx)(`span`,{children:s(u[1])})]})]})},Un=e=>[...new Set(e.map(e=>e.key.split(`:`).slice(0,2).join(`:`)))],Wn=(e,t)=>{let n=t.filter(t=>!e.includes(t));return n.length===0?e:[...e,...n]},Gn=(e,t)=>{let n=[...e.facets.map(e=>({key:`facet:${e.id}`,label:e.label,secondary:e.secondary})),...(e.ranges??[]).map(e=>({key:`range:${e.id}`,label:e.label,secondary:e.secondary})),...e.datePresets?[{key:`date`,label:q(`date`),secondary:e.dateSecondary}]:[],...(e.toggles??[]).map(e=>({key:`toggle:${e.id}`,label:e.label,secondary:e.secondary}))],r=new Set,i=[];for(let e of n)!e.secondary||t.includes(e.key)?r.add(e.key):i.push({key:e.key,label:e.label});return{shown:r,more:i}},Kn=({label:e,checked:t,onChange:n})=>(0,X.jsxs)(`label`,{className:`flex cursor-pointer items-center justify-between gap-3 py-1`,children:[(0,X.jsx)(`span`,{children:e}),(0,X.jsx)(C,{checked:t,onChange:n,label:e})]}),qn=(e,t)=>e.some(e=>e.length>0)||!!t,Jn=({groups:e,trailing:t})=>{if(!qn(e,t))return null;let n=e.filter(e=>e.length>0);return(0,X.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[n.map((e,t)=>(0,X.jsxs)(Z.Fragment,{children:[t>0&&(0,X.jsx)(`span`,{className:`mx-1 h-5 w-px bg-border`}),e]},t)),t&&(0,X.jsx)(`div`,{className:`flex min-w-32 flex-1 justify-end`,children:t})]})},Yn=(e,t,n)=>{let[r,i]=(0,Z.useState)(t??Gt);return[e??r,e=>{i(e),n?.(e)}]},Xn=({config:e,layout:t,value:n,defaultValue:r,onChange:i,lockedLabels:a,defaultOpenMenu:o,fullWidth:s,leading:c,trailing:l})=>{let[u,d]=Yn(n,r,i),f=yt(e,u),p=Un(f),[m,h]=(0,Z.useState)(()=>p),[g,_]=(0,Z.useState)();(0,Z.useEffect)(()=>h(e=>Wn(e,p)),[p.join(`,`)]);let v=(0,X.jsx)(On,{chips:f,lockedLabels:a,onRemove:e=>d(ut(u,e)),onClear:()=>d(Gt)}),y=(e,t=!1)=>{let n=u.facets[e.id]??[],r=t=>d(Ct(u,e.id,t));return e.combobox?(0,X.jsx)(Mn,{config:e,selected:n,onToggle:r,inline:t}):(0,X.jsx)(Nn,{config:e,selected:n,onToggle:r})},b=e.ranges??[],x=e=>(0,X.jsx)(Hn,{config:e,value:u.ranges?.[e.id],onChange:t=>d(xt(u,e.id,t))}),S=e.datePresets&&(0,X.jsx)(kn,{value:u.date,presets:Array.isArray(e.datePresets)?e.datePresets:void 0,onChange:e=>d({...u,date:e})}),C=(e.toggles??[]).map(e=>(0,X.jsx)(Kn,{label:e.label,checked:u.toggles.includes(e.id),onChange:()=>d(lt(u,e.id))},e.id));if(t===`panel`)return(0,X.jsxs)(`aside`,{className:s?`flex w-full flex-col gap-1`:`flex w-64 shrink-0 flex-col gap-1 overflow-y-auto rounded-lg border bg-background px-4 py-3`,children:[(0,X.jsx)(`div`,{className:`flex items-center justify-between pb-1`,children:(0,X.jsx)(`h2`,{className:`font-semibold`,children:q(`filters`)})}),(f.length>0||(a?.length??0)>0)&&(0,X.jsx)(`div`,{className:`border-b pb-3`,children:v}),c,e.facets.map(e=>(0,X.jsx)(Fn,{title:e.label,children:y(e)},e.id)),b.map(e=>(0,X.jsx)(Fn,{title:e.label,children:x(e)},e.id)),S&&(0,X.jsx)(Fn,{title:q(`date`),children:S}),C.length>0&&(0,X.jsx)(Fn,{title:q(`showOnly`),children:C})]});let{shown:w,more:T}=Gn(e,m),E=e=>{h(t=>Wn(t,[e])),_(e)},D=[...e.facets.filter(e=>w.has(`facet:${e.id}`)).map(e=>(0,X.jsx)(Pn,{label:e.label,activeCount:(u.facets[e.id]??[]).length,width:e.combobox?280:void 0,defaultOpen:o===e.id||g===`facet:${e.id}`,children:y(e,!0)},e.id)),...b.filter(e=>w.has(`range:${e.id}`)).map(e=>(0,X.jsx)(Pn,{label:e.label,activeCount:+!!u.ranges?.[e.id],width:280,defaultOpen:o===e.id||g===`range:${e.id}`,children:x(e)},`range:${e.id}`)),...S&&w.has(`date`)?[(0,X.jsx)(Z.Fragment,{children:S},`date`)]:[]],O=(e.toggles??[]).filter(e=>w.has(`toggle:${e.id}`)).map(e=>(0,X.jsx)(`div`,{className:`flex items-center gap-2 text-muted-foreground`,children:(0,X.jsx)(Kn,{label:e.label,checked:u.toggles.includes(e.id),onChange:()=>d(lt(u,e.id))})},e.id)),k=[c?[(0,X.jsx)(Z.Fragment,{children:c},`leading`)]:[],D,O,T.length>0?[(0,X.jsx)(Ln,{items:T,onPick:E},`more`)]:[]];return!qn(k,l)&&f.length===0&&!a?.length?null:(0,X.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,X.jsx)(Jn,{groups:k,trailing:l}),v]})},Q=g(`app/export`),Zn=()=>new DOMException(Q(`cancelled`),`AbortError`),Qn=async({client:e,resource:t,filters:n,orderBy:r,plan:i,labels:a,limit:o,port:s,sink:c,signal:l,onProgress:u})=>{let d=i.columns.map(e=>e.name),f=0;try{await c.write(await s.send({kind:`start`,plan:i,locale:fe()}));for(let[i,p]of n.entries()){let m=``;do{let h=await e.search(t,{filter:p,orderBy:r,pageSize:500,pageToken:m,fields:d,labels:a});if(l.aborted)throw Zn();let g=h.items.slice(0,o-f);if(await c.write(await s.send({kind:`page`,records:g,labels:h.labels??{}})),f+=g.length,u(f),m=h.nextPageToken,f>=o)return await $n(s,c),{rows:f,truncated:g.length<h.items.length||m!==``||i+1<n.length}}while(m!==``)}return await $n(s,c),{rows:f,truncated:!1}}catch(e){throw await c.abort(),e}finally{s.close()}},$n=async(e,t)=>{await t.write(await e.send({kind:`finish`})),await t.close()},er=1048575,tr=`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
3
|
-
`,nr=`http://schemas.openxmlformats.org/officeDocument/2006/relationships`,rr=`http://schemas.openxmlformats.org/package/2006/relationships`;`${tr}`,`${tr}${rr}${nr}`,`${tr}${rr}${nr}${nr}`,new TextEncoder;var ir=ne(),ar=e=>e?.export!==!1,or=e=>Object.values(e.fields).flatMap(e=>e.sensitive?[]:[e.name]),sr=(e,t)=>{let n=new Set(or(e));return ge(e,t).filter(e=>n.has(e))},cr=(e,t,n)=>Object.fromEntries(Ie(e,t,[],n).map(e=>[e.id,e.header])),lr=(e,t,n)=>{let r=cr(e,t,n);return n.flatMap(n=>{let i=e.fields[n];return i?[{name:n,header:r[n],field:i,hints:t?.fields[n]??{}}]:[]})},ur=(e,t)=>{let n=e?.export?e.export.maxRows??1/0:1/0;return Math.min(n,t===`xlsx`?er:1/0)},dr=e=>e.primaryKey.length===1,fr=(e,t)=>{let[n]=e.primaryKey;if(!n||e.primaryKey.length!==1)throw Error(`Not implemented: selected rows are exported by a single-field key`);let r=[];for(let e=0;e<t.length;e+=500)r.push(y(ir.in(n,t.slice(e,e+500))));return r},pr=e=>{if(e.kind!==`counting`)return e.kind===`exact`?e.rows:Math.max(e.rows,10001)},mr=g(`app/import`),hr=e=>typeof e==`object`&&!!e&&`date`in e,gr=e=>typeof e==`object`&&!!e&&`json`in e,_r=e=>e===null||typeof e==`string`&&e.trim()===``,vr=e=>e===null?``:hr(e)?e.date.replace(`T`,` `):gr(e)?JSON.stringify(e.json):typeof e==`boolean`?e?`TRUE`:`FALSE`:String(e),yr=e=>e<26?String.fromCharCode(65+e):yr(Math.floor(e/26)-1)+yr(e%26),br=(e,t)=>e[t]?.trim()?e[t]:mr(`column`,{letters:yr(t)}),xr=(e,t,n,r)=>{let i=Tn(t.headers),a=t.headers.map((e,n)=>({column:n,include:!0,name:i[n],label:br(t.headers,n).trim(),type:t.types[n].type,inferred:t.types[n],decimal:t.decimals[n]}));return{name:En(e,n,r)??``,pluralLabel:e.replace(/\.[^.]+$/,``).trim(),singularLabel:``,titleField:a.find(e=>e.type===`text`)?.name,fields:a}},Sr=e=>e.fields.filter(e=>e.include),Cr=(e,t,n)=>{let r=e.fields.find(e=>e.column===t),i=e.fields.map(e=>e.column===t?{...e,...n}:e),a=i.find(e=>e.column===t),o=r?.name===e.titleField,s=a.include&&a.type===`text`;return o?{...e,fields:i,titleField:s?a.name:void 0}:{...e,fields:i}},wr=`user_table_fields`,Tr=`table`,Er=(e,t)=>{let n=Sr(t).map((e,t)=>({op:`create`,resource:wr,data:{table_id:{$ref:Tr},name:e.name,label:e.label.trim(),type:e.type,position:t+1,...e.type===`decimal`&&{precision:e.decimal.precision,scale:e.decimal.scale}}})),r=t.titleField?[{op:`update`,resource:e,key:{$ref:Tr},etag:`*`,data:{title_field:t.titleField}}]:[];return[{op:`create`,resource:e,ref:Tr,data:{name:t.name,singular_label:t.singularLabel.trim(),plural_label:t.pluralLabel.trim()}},...n,...r]},Dr=(e,t)=>{let n=new Map(t.map(e=>[e.value,e.count]));return e.map(([e,t])=>({value:e,label:t,...n.get(e)!==void 0&&{count:n.get(e)}}))},Or=(e,t)=>[...new Set(t.filter(t=>!e.includes(t)))],kr=ne(),Ar=(e,t,n)=>{let r=H(),[i,a]=(0,Z.useState)({}),o=e=>!!e?.search?.length&&e.primaryKey.length===1,s=e=>{let n=t[e.name];return[e.primaryKey[0],...n?.titleFrom?n.titleFrom.fields:[me(e,n)]]},c=(e,r)=>{let i=t[e.name],a=String(r[e.primaryKey[0]]);return[a,i?.titleFrom?n(e,i,r,a):String(r[me(e,i)])]},l=tt({queries:e.map(({id:e,target:t})=>{let n=(i[e]??``).trim();return{queryKey:[`reference-search`,e,t?.name??``,n],enabled:o(t)&&n!==``,placeholderData:Ze,queryFn:async()=>(await r.list(t.name,{filter:y(kr.search(n)),fields:s(t),pageSize:20})).items}})});return e.map(({id:e,target:t},n)=>{if(!o(t))return{};let r=t=>a(n=>({...n,[e]:t}));return(i[e]??``).trim()===``?{onSearch:r}:{onSearch:r,matches:(l[n]?.data??[]).map(e=>c(t,e))}})},jr=24,Mr=({model:e,resources:t,views:n,view:i,state:a,extras:o,titleOf:s})=>{let c=H(),l=D(c),u=Qe(),d=ct(i,e),f=e=>i?.fields[e]?.label??V(e),p=n=>{let r=e.fields[n];return r?.type===`relation`&&r.relation?t[r.relation.resource]:void 0},h=e=>!!(e&&n[e.name]?.titleFrom),g=d.facets.flatMap(e=>(e.flags?e.options.map(e=>e.value):[e.id]).map(t=>({group:e.id,field:t}))),_=tt({queries:g.map(({group:t,field:r})=>{let i=dt(d,{...a,facets:{...a.facets,[t]:[]}},o),s=p(r),c=s?.primaryKey.length===1&&!h(s)?me(s,n[s.name]):void 0;return{queryKey:L.facets(e.name,r,i),queryFn:()=>l.facets(e.name,r,{filter:i,limit:50,...c&&{label:c}})}})}),v=(e,t)=>_[g.findIndex(n=>n.group===e&&n.field===t)],y=(e,t)=>v(e,t)?.data,b=e=>(y(e,e)??[]).flatMap(e=>e.value===null?[]:[String(e.value)]),x=tt({queries:d.facets.map(t=>{let r=p(t.id),i=Or(b(t.id),a.facets[t.id]??[]);return{queryKey:L.labels(`facet:${e.name}.${t.id}`,i.join(`,`)),enabled:!!r&&!h(r)&&i.length>0,queryFn:async()=>[...await ze(u,c,r,i,n[r.name])]}})}),S=tt({queries:d.facets.map(t=>{let r=p(t.id),i=r&&h(r)?pe(r,n[r.name]):void 0,o=[...new Set([...b(t.id),...a.facets[t.id]??[]])];return{queryKey:L.labels(`facet-title:${e.name}.${t.id}`,o.join(`,`)),enabled:i!==void 0&&o.length>0,queryFn:async()=>[...await m(c,r,i,o)]}})}),C=(e,t)=>{let r=p(e);return(S[t]?.data??[]).map(([e,t])=>[e,s(r,n[r.name],t,e)])},w=Ar(d.facets.map(e=>({id:e.id,target:e.combobox?p(e.id):void 0})),n,s),T=d.ranges??[],E=tt({queries:T.map(t=>{let n=dt(d,xt(a,t.id,void 0),o),r=_t(i,t.id)?jr:1;return{queryKey:L.histogram(e.name,t.id,r,n),queryFn:()=>l.histogram(e.name,t.id,{filter:n,buckets:r})}})});return{facets:d.facets.map((t,n)=>{if(t.flags){let e=e=>{let n=y(t.id,e);return n&&{count:n.find(e=>String(e.value)===`true`)?.count??0}},n=t.options.map(({value:t})=>({value:t,label:f(t),...e(t)})),r=t.options.some(({value:e})=>v(t.id,e)?.isError);return{...t,options:n,...r&&{failed:r}}}let a=e.fields[t.id],o=(y(t.id,t.id)??[]).flatMap(e=>e.label===void 0?[]:[[String(e.value),e.label]]),s=a?.type===`enum`?(a.enumValues??[]).map(e=>[e,r(e,i?.fields[t.id]?.valueLabels)]):[],c=new Map([...s,...o,...x[n]?.data??[],...C(t.id,n)]),l=(y(t.id,t.id)??[]).flatMap(e=>e.value===null?[]:[{value:String(e.value),label:c.get(String(e.value))??String(e.value),count:e.count}]),u=w[n],d=v(t.id,t.id)?.isError;return{...t,label:f(t.id),...d&&{failed:d},options:u.matches?Dr(u.matches,l):l,...c.size>0&&{labels:Object.fromEntries(c)},...u.onSearch&&{onSearch:u.onSearch}}}),ranges:T.flatMap((e,t)=>{let n=E[t];if(n?.isError)return[{...e,label:f(e.id),min:0,max:0,step:1,histogram:[],format:ht(i,e.id),failed:!0}];let r=n?.data;return!r||r.min===null||r.max===null?[]:[{...e,label:f(e.id),min:Math.floor(r.min),max:Math.ceil(r.max),step:Math.max(1,Math.round((r.max-r.min)/100)),histogram:_t(i,e.id)?r.buckets.map(e=>e.count):[],format:ht(i,e.id)}]}),...d.dateField&&{datePresets:d.datePresets??!0,dateField:d.dateField,dateKind:d.dateKind,...d.dateSecondary&&{dateSecondary:!0}},toggles:d.toggles?.map(e=>({...e,label:f(e.id)}))}},Nr=M(()=>Xe(()=>import(`./import-dialog-C6QghYOc.js`).then(e=>e.ImportDialog),__vite__mapDeps([0,1,2,3,4,5,6]))),Pr=M(()=>Xe(()=>import(`./import-table-dialog-BzpzE7wd.js`).then(e=>e.ImportTableDialog),__vite__mapDeps([7,1,2,3,4,5,6]))),Fr=({model:e})=>{let{resources:t,views:n}=_e(),r=ae(e.name),a=ae(wr),[o,s]=(0,Z.useState)(!1),c=n[e.name]?.import;return c===!1||!u(r,`create`)||c===`table`&&!u(a,`create`)?null:(0,X.jsxs)(X.Fragment,{children:[(0,X.jsxs)(i,{onClick:()=>s(!0),"aria-haspopup":`dialog`,children:[(0,X.jsx)(De,{className:`size-3.5`}),mr(c===`table`?`fromFile`:`import`)]}),o&&c===`table`&&(0,X.jsx)(Pr,{tables:e,resources:t,views:n,onClose:()=>s(!1)}),o&&c!==`table`&&(0,X.jsx)(Nr,{model:e,resources:t,views:n,canUpdate:u(r,`update`),onClose:()=>s(!1)})]})},Ir=()=>{let e=new Worker(new URL(`/assets/export-worker-CQwKM8Oc.js`,``+import.meta.url),{type:`module`,name:`protobase-export`}),t=[];return e.onmessage=e=>t.shift()?.resolve(e.data.bytes),e.onerror=e=>{e.preventDefault();let n=Error(Q(`couldNotBuild`,{message:e.message}));for(let e of t.splice(0))e.reject(n)},{send:n=>new Promise((r,i)=>{t.push({resolve:r,reject:i}),e.postMessage(n)}),close:()=>e.terminate()}},Lr={xlsx:{mime:`application/vnd.openxmlformats-officedocument.spreadsheetml.sheet`,extension:`.xlsx`,description:`workbook`},csv:{mime:`text/csv`,extension:`.csv`,description:`csvFile`}},Rr=/[\\/:*?"<>|\u0000-\u001f]/g,zr=(e,t,n=new Date)=>{let r=[n.getFullYear(),String(n.getMonth()+1).padStart(2,`0`),String(n.getDate()).padStart(2,`0`)].join(`-`);return`${e.replace(Rr,` `).trim()} ${r}${Lr[t].extension}`},Br=8e6,Vr=(e,t)=>{let n=new Blob([],{type:Lr[t].mime}),r=[],i=0,a=()=>{n=new Blob([n,...r],{type:Lr[t].mime}),r=[],i=0};return{write:async e=>{e.length!==0&&(r.push(e),i+=e.length,i>=Br&&a())},close:async()=>{a();let t=URL.createObjectURL(n),r=document.createElement(`a`);r.href=t,r.download=e,r.click(),setTimeout(()=>URL.revokeObjectURL(t),6e4)},abort:async()=>{r=[],n=new Blob([])}}},Hr=()=>globalThis.showSaveFilePicker,Ur=()=>typeof Hr()==`function`,Wr=async(e,t)=>{let n=Hr();if(!n)throw Error(`This browser cannot save a file as it is built`);let r=Lr[t],i;try{i=await n({suggestedName:e,types:[{description:Q(r.description),accept:{[r.mime]:[r.extension]}}]})}catch(e){if(e instanceof DOMException&&e.name===`AbortError`)return;throw e}let a=await i.createWritable();return{write:async e=>{e.length>0&&await a.write(e)},close:()=>a.close(),abort:()=>a.abort()}},Gr=M(()=>Xe(()=>import(`./export-dialog-DG5H_BHu.js`).then(e=>e.ExportDialog),__vite__mapDeps([8,1,2,3,4,5,9,10,11,12,13,14,15,16,17,18,19,20,21]))),Kr=M(()=>Xe(()=>import(`./export-dialog-DG5H_BHu.js`).then(e=>e.ExportProgressDialog),__vite__mapDeps([8,1,2,3,4,5,9,10,11,12,13,14,15,16,17,18,19,20,21]))),qr=(e,t)=>Ur()?Wr(e,t):Promise.resolve(Vr(e,t)),Jr=(e,t)=>{let n=t[e.primaryKey[0]];return typeof n==`object`&&n&&`id`in n?n.id:n},Yr=({model:e,view:t,resources:n,views:r,plural:i,filter:a,orderBy:o,createPort:s=Ir,createSink:c=qr})=>{let l=H(),u=w(),[d,f]=(0,Z.useState)({kind:`closed`}),p=(0,Z.useRef)(void 0),m=(0,Z.useRef)(void 0),h=et({queryKey:L.exportCount(e.name,a),enabled:d.kind===`settings`,queryFn:async()=>{let t=await l.list(e.name,{filter:a||void 0,pageSize:1,count:`exact`,fields:e.primaryKey});return t.totalSize===void 0?{kind:`estimate`,rows:t.totalSizeEstimate}:{kind:`exact`,rows:t.totalSize}}}).data??{kind:`counting`},g=(e,t=m.current)=>{let n=m.current;n&&n===t&&(m.current=void 0,n.settle(e?[]:n.rows))},_=(t=[])=>(g(!1),f({kind:`settings`,selected:dr(e)?t.map(t=>Jr(e,t)):[]}),new Promise(e=>{m.current={rows:t,settle:e}})),v=()=>{f({kind:`closed`}),g(!1)},y=async(d,_)=>{let v=zr(i,d.format),y=await c(v,d.format);if(!y)return;let x=m.current,S=ur(t,d.format),C=d.scope===`selected`?_.length:pr(h),w=C===void 0?void 0:Math.min(C,S),T=new AbortController;p.current=T,f({kind:`running`,done:0,total:w});try{let c=await Qn({client:l,resource:e.name,filters:d.scope===`selected`?fr(e,_):[a],orderBy:o,plan:{format:d.format,mode:d.mode,name:i,columns:lr(e,t,d.columns)},labels:d.mode===`shown`?b(n,r,e,d.columns):{},limit:S,port:s(),sink:y,signal:T.signal,onProgress:e=>T.signal.aborted||f({kind:`running`,done:e,total:w})});u.show({state:`success`,title:Q(`exported`,{count:j(c.rows),plural:i}),description:c.truncated?Q(`truncated`,{name:v,count:j(c.rows)}):v}),g(!0,x)}catch(e){if(e instanceof DOMException&&e.name===`AbortError`)return;if(!N(e))throw e;u.show({state:`error`,title:Q(`couldNotExport`,{plural:i}),description:e.message})}finally{p.current=void 0,f(e=>e.kind===`running`?{kind:`closed`}:e),g(!1,x)}},x=()=>{p.current?.abort(),v()},S=or(e),C=cr(e,t,S);return{open:_,dialogs:d.kind===`settings`?(0,X.jsx)(Gr,{plural:i,view:t,fields:S.map(e=>({name:e,label:C[e]})),initialColumns:sr(e,t),count:h,selected:d.selected.length>0?d.selected.length:void 0,open:!0,onExport:e=>void y(e,d.selected),onClose:v}):d.kind===`running`?(0,X.jsx)(Kr,{plural:i,done:d.done,total:d.total,onCancel:x}):null}},Xr=({state:e,onClearSearch:t,onClearFilters:n,create:r})=>(0,X.jsxs)(`div`,{className:`flex flex-col items-center gap-3 py-8 text-center text-muted-foreground`,children:[(0,X.jsx)(`p`,{children:e.message}),(e.clearSearch||e.clearFilters||e.create&&r)&&(0,X.jsxs)(`div`,{className:`flex flex-wrap justify-center gap-2`,children:[e.clearSearch&&(0,X.jsx)(i,{onClick:t,children:Y(`clearSearch`)}),e.clearFilters&&(0,X.jsx)(i,{onClick:n,children:Y(`clearFilters`)}),e.create&&r]})]}),Zr=({plural:e,search:t,filtered:n,scoped:r,canCreate:i})=>t?{message:Y(`noMatchSearch`,{plural:e,search:t}),clearSearch:!0,clearFilters:n,create:!1}:n?{message:Y(`noMatchFilters`,{plural:e}),clearSearch:!1,clearFilters:!0,create:!1}:r?{message:Y(`noMatch`,{plural:e}),clearSearch:!1,clearFilters:!1,create:!1}:{message:Y(`noneYet`,{plural:e}),clearSearch:!1,clearFilters:!1,create:i},Qr=(e,t)=>{},$r=({windowMs:e=1e3,comebacks:t=2,onHold:n=Qr}={})=>{let r,i=[],a;return(o,s)=>{if(a?.among.has(o))return a.value;if(a&&(a=void 0,i=[]),o===r||(r=o,i=i.filter(t=>s-t.at<=e),i.push({value:o,at:s,comeback:i.some(e=>e.value===o)}),i.filter(e=>e.comeback).length<t))return o;let c=new Set(i.slice(-2*t).map(e=>e.value));return a={value:Math.min(...c),among:c},n(a.value,[...c]),a.value}},ei=e=>Math.max(1,Math.floor((e+12)/252)),ti=(e,t)=>Math.max(0,(e-(t-1)*12)/t),ni=(e,t,n,r)=>({start:e*n,end:Math.max(0,Math.min(r,(t+1)*n)-1)}),ri=(e,t,n)=>{let r=e/t.rowHeight;return t.columns===n.columns?r*n.rowHeight:Math.floor(Math.floor(r)*t.columns/n.columns)*n.rowHeight},ii=(e,t)=>{let n=e/t.rowHeight;return Math.floor(n)*t.columns+n%1},ai=(e,t)=>Math.floor(Math.floor(e)/t)+e%1,oi=8,si=(e,t,n)=>{let r=e.get(t);if(r!==void 0&&r>=n)return e;let i=new Map(e);i.delete(t),i.set(t,n);for(let e of i.keys()){if(i.size<=oi)break;i.delete(e)}return i},ci=({source:e,label:t,initialIndex:n,onScrollIndex:r,minHeight:i,children:a})=>{let{total:o}=e,[s]=(0,Z.useState)(n),[c,l]=(0,Z.useState)(0),u=ei(c),d=ti(c,u),[f,p]=(0,Z.useState)(()=>new Map),m=Math.ceil(Math.max(i(d),f.get(d)??0)),h=m+12,g={columns:u,rowHeight:h},_=(0,Z.useRef)({layout:g,top:0}),v=_.current.top>0&&(_.current.layout.columns!==u||_.current.layout.rowHeight!==h),y=e=>v?ri(_.current.top,_.current.layout,g):e,b=d>0&&f.has(d),x=rt({total:Math.ceil(o/u),rowHeight:h,initialIndex:ai(s,u),settle:y,ready:b,onScroll:e=>r(ii(e,g))});(0,Z.useLayoutEffect)(()=>{v&&x.scrollTo(x.top),_.current={layout:g,top:x.started()?x.top:0}});let S=ni(x.first,x.last,u,o),C=$t({total:o,rowAt:e.rowAt,loadRows:e.loadRows,cachedRows:e.cachedRows,revision:e.revision,latencyMs:0},S.start,S.end),[w]=(0,Z.useState)(()=>$r());(0,Z.useLayoutEffect)(()=>{let e=x.ref.current;if(!e)return;let t=()=>l(w(e.clientWidth,performance.now())),n=new ResizeObserver(t);return n.observe(e),t(),()=>n.disconnect()},[w]);let T=(0,Z.useRef)(d);T.current=d;let[E]=(0,Z.useState)(()=>new ResizeObserver(e=>{let t=Math.max(...e.map(e=>e.borderBoxSize[0]?.blockSize??e.contentRect.height)),n=T.current;p(e=>si(e,n,t))}));(0,Z.useLayoutEffect)(()=>()=>E.disconnect(),[E]),(0,Z.useLayoutEffect)(()=>{let e=x.ref.current;if(b||d===0||!e)return;let t=[...e.querySelectorAll(`:scope > li[aria-posinset]`)];if(t.length===0)return;let n=Math.max(...t.map(e=>e.getBoundingClientRect().height));p(e=>si(e,d,n))});let D=(0,Z.useCallback)(e=>{if(e)return E.observe(e),()=>E.unobserve(e)},[E]);return(0,X.jsx)(`ul`,{ref:x.ref,className:`relative min-w-0 flex-auto`,"aria-label":t,style:{height:x.geometry.contentHeight},children:x.rows.flatMap(({index:e,offset:t})=>Array.from({length:u},(n,r)=>{let i=e*u+r;if(i>=o)return[];let s=C(i),c={top:t,left:r*(d+12),width:d,minHeight:m};return s?(0,X.jsx)(`li`,{ref:D,"aria-posinset":i+1,"aria-setsize":o,className:`absolute grid grid-cols-[minmax(0,1fr)]`,style:c,children:a(s)},s.id):(0,X.jsx)(`li`,{"aria-hidden":!0,className:`absolute grid grid-cols-[minmax(0,1fr)]`,style:c,children:(0,X.jsx)(B,{className:`h-full rounded-lg`})},`skeleton-${i}`)}))})},li=`grid grid-cols-[repeat(auto-fill,minmax(15rem,1fr))] gap-3`,ui=e=>e*.75,di=44,fi=({model:e,view:t,display:n,list:r,empty:i})=>{let a=t?.names?.plural??V(e.name),o=n.card===void 0&&(n.image!==void 0||n.photos!==void 0);return r.isLoading?(0,X.jsx)(`div`,{"aria-busy":!0,className:`min-h-0 flex-1 overflow-hidden ${li}`,children:Array.from({length:6},(e,t)=>(0,X.jsx)(B,{className:`h-24`},t))}):r.error?(0,X.jsx)(Re,{title:He(`couldNotLoadRows`),error:r.error}):!r.source||r.source.total===0?i??(0,X.jsx)(`p`,{className:`py-8 text-center text-muted-foreground`,children:He(`noneMatch`,{plural:a.toLowerCase()})}):(0,X.jsx)(ci,{source:r.source,label:a,initialIndex:r.initialIndex,onScrollIndex:r.onScrollIndex,minHeight:e=>(o?ui(e):0)+di,children:r=>(0,X.jsx)(Ht,{model:e,view:t,display:n,row:x(e,r)})})},pi=`protobase:list-places`,mi=50,hi=(e,t)=>`${e} ${t}`,gi=e=>{if(typeof e!=`object`||!e)return!1;let{entry:t,url:n,place:r}=e;return typeof t==`string`&&typeof n==`string`&&typeof r==`number`&&Number.isFinite(r)&&r>=0},_i=e=>v(()=>{let t=e.getItem(pi);if(t===null)return[];let n=JSON.parse(t);return Array.isArray(n)?n.filter(gi):[]},[]),vi=e=>{let t=new Map(_i(e).map(e=>[hi(e.entry,e.url),e]));return{placeOf:(e,n)=>{let r=t.get(hi(e,n));return r?r.place:[...t.values()].findLast(e=>e.url===n)?.place??0},save:(e,n,r)=>{let i=hi(e,n);t.delete(i),t.set(i,{entry:e,url:n,place:r});for(let e of[...t.keys()].slice(0,Math.max(0,t.size-mi)))t.delete(e)},persist:()=>v(()=>e.setItem(pi,JSON.stringify([...t.values()])),void 0)}},yi={getItem:()=>null,setItem:()=>{}},bi,xi=()=>bi??=vi(v(()=>window.sessionStorage,void 0)??yi),Si=()=>{let{entry:e,path:t,params:n}=h(),r=`${t}?${n.toString()}`,i=xi();(0,Z.useEffect)(()=>{let e=()=>i.persist(),t=()=>document.visibilityState===`hidden`&&i.persist();return window.addEventListener(`pagehide`,e),document.addEventListener(`visibilitychange`,t),()=>{window.removeEventListener(`pagehide`,e),document.removeEventListener(`visibilitychange`,t),i.persist()}},[i]);let a=(0,Z.useCallback)(t=>i.save(e,r,t),[i,e,r]);return{initialIndex:i.placeOf(e,r),remember:a}},Ci=e=>e.reduce((e,t)=>e+t.count,0),wi=e=>{let t=Math.floor(e.length/2),n=Ci(e.slice(0,t)),r=Ci(e.slice(e.length-t));return n===0?0:(r-n)/n*100},Ti=g(`activity-chart`),Ei=({title:e,defaultGranularity:t=`day`,data:n,granularity:r,onGranularityChange:i,periodLabel:a,state:o,className:s})=>{let[c,l]=(0,Z.useState)(t),u=r??c,d=i??l,f=wi(n),p=n.map(({at:e,count:t})=>({at:e,value:t,count:t}));return(0,X.jsxs)(`section`,{className:A(`rounded-lg border bg-background px-4 pb-2 pt-3`,s),children:[(0,X.jsxs)(`header`,{className:`flex flex-wrap items-center justify-between gap-2`,children:[(0,X.jsxs)(`div`,{className:`flex items-baseline gap-2`,children:[(0,X.jsx)(`h2`,{className:`font-semibold`,children:e}),o===void 0&&(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(`span`,{className:`font-semibold tabular-nums`,children:j(Ci(n))}),(0,X.jsxs)(`span`,{className:A(`text-xs font-medium tabular-nums`,f>=0?`text-success-text`:`text-danger-text`),children:[f>=0?`+`:`−`,Math.abs(f).toFixed(1),`%`]})]}),(0,X.jsx)(`span`,{className:`hidden text-xs text-muted-foreground sm:inline`,children:a??`last ${u===`day`?`30 days`:`12 weeks`}`})]}),(0,X.jsx)(Ee,{value:u,onChange:d,options:[{value:`day`,label:Ti(`day`)},{value:`week`,label:Ti(`week`)}]})]}),(0,X.jsxs)(`div`,{className:`mt-2`,children:[o===`failed`&&(0,X.jsx)(`p`,{className:`py-6 text-danger-text`,children:Ti(`couldNotLoad`)}),o===`loading`&&(0,X.jsx)(B,{className:`h-24 w-full`}),o===void 0&&(0,X.jsx)(Rt,{points:p,measure:{kind:`count`},bucket:u,type:`bar`,compact:!0})]})]})},Di={"7d":`last 7 days`,"30d":`last 30 days`,"90d":`last 90 days`,"1y":`last year`,all:`all time`},Oi=({resource:e,chart:t,title:n,filter:r})=>{let[i,a]=(0,Z.useState)(t.granularity===`week`?`week`:`day`),o=i===`week`?`90d`:t.range,s=Ae(e,{field:t.field,range:o,granularity:i,filter:r,timeZone:Te()}),c=s.data?.points.map(e=>({at:Date.parse(`${e.bucket}Z`),count:e.count}))??[];return(0,X.jsx)(Ei,{title:n,data:c,granularity:i,onGranularityChange:a,periodLabel:i===`week`?`last 12 weeks`:Di[o],state:s.isError?`failed`:s.isPending?`loading`:void 0})},ki=(e,t,n)=>{let r=e.sum??e.average;if(r===void 0)return n;let i=t?.fields[r]?.label??V(r);return e.sum===void 0?W(`average`,{label:i}):`${i}`},Ai=({model:e,view:t,chart:n,plural:r,filter:i})=>{let a=t?.fields[n.groupBy]?.label??V(n.groupBy);return(0,X.jsxs)(`section`,{className:`rounded-lg border bg-background px-4 pb-3 pt-3`,"aria-label":`${ki(n,t,r)} by ${a.toLowerCase()}`,children:[(0,X.jsxs)(`h2`,{className:`mb-2 font-semibold`,children:[ki(n,t,r),` by `,a.toLowerCase()]}),(0,X.jsx)(At,{model:e,view:t,groupBy:n.groupBy,type:n.type,sum:n.sum,average:n.average,limit:n.limit,filter:i})]})},ji=({value:e,onCommit:t,placeholder:n,className:r})=>{let[i,a]=(0,Z.useState)(e);return(0,Z.useEffect)(()=>a(e),[e]),(0,Z.useEffect)(()=>{if(i===e)return;let n=setTimeout(()=>t(i),350);return()=>clearTimeout(n)},[i,e,t]),(0,X.jsx)(le,{wrapperClassName:A(`min-w-0 flex-1 sm:w-72 sm:flex-initial`,r),leading:(0,X.jsx)(K,{className:`size-4`}),placeholder:n,"aria-label":Y(`search`),value:i,onChange:e=>a(e.target.value),onKeyDown:e=>e.key===`Enter`&&t(i)})},Mi=(e,t,n,r,i)=>{let a=n?.list?.relatedColumns??[];if(a.length===0)return e;let o=new Map(e.map(e=>[e.id,e]));return ge(t,n).flatMap(e=>{let t=o.get(e);if(t)return[t];let n=a.find(t=>t.name===e),s=n&&r[n.resource];if(!n||!s)return[];let c=n.label??V(n.name);return[{id:n.name,header:c,kind:`text`,width:160,minWidth:I(c,!1),sortable:!1,render:e=>(0,X.jsx)(bt,{column:n,records:e[n.name]??[],target:s,view:i[s.name],Card:Ht})}]})},Ni=({model:e,view:t,target:n,children:r})=>{let i=gt(e.name,t.listOf,!0),a=t.names?.plural??V(e.name),o=e=>(0,X.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col gap-3 px-5 py-4`,children:[(0,X.jsx)(Qt,{title:a,subtitle:t.help}),e]});if(i.error)return o((0,X.jsx)(Re,{title:ot(`couldNotLoadYour`,{plural:a.toLowerCase()}),error:i.error}));if(!i.data)return o((0,X.jsx)(`div`,{className:`grid grid-cols-[repeat(auto-fill,minmax(15rem,1fr))] gap-3`,children:Array.from({length:3},(e,t)=>(0,X.jsx)(B,{className:`h-24`},t))}));let s=Pt(n,i.data);return s?r(s):o((0,X.jsx)(`p`,{className:`py-8 text-center text-muted-foreground`,children:ot(`noneYet`,{plural:a.toLowerCase()})}))},Pi=({title:e,chips:t,label:n,required:r,initial:a=``,busy:o,onSave:s,onClose:c})=>{let l=(0,Z.useId)(),[u,d]=(0,Z.useState)(a),f=`${l}-form`;return(0,X.jsx)(U,{open:!0,title:e,onClose:c,actions:(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(i,{onClick:c,children:J(`cancel`)}),(0,X.jsx)(i,{type:`submit`,form:f,variant:`primary`,loading:o,children:J(`save`)})]}),children:(0,X.jsxs)(`form`,{id:f,className:`flex flex-col gap-4`,onSubmit:e=>{e.preventDefault(),s(u.trim()===``?null:u.trim())},children:[t.length>0&&(0,X.jsx)(Tt,{chips:t}),(0,X.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,X.jsxs)(`div`,{className:`flex items-baseline justify-between gap-2`,children:[(0,X.jsx)(`label`,{htmlFor:l,className:`font-medium`,children:n}),!r&&(0,X.jsx)(`span`,{id:`${l}-hint`,className:`text-xs text-muted-foreground`,children:J(`optional`)})]}),(0,X.jsx)(le,{id:l,value:u,required:r,pattern:r?`.*\\S.*`:void 0,"aria-describedby":r?void 0:`${l}-hint`,autoFocus:!0,autoComplete:`off`,onChange:e=>d(e.target.value)})]})]})})},$=ne(),Fi={start:0,end:0},Ii=(e,t)=>$.and(t,{kind:`present`,field:e.field,span:Fi}),Li=e=>{switch(e.kind){case`and`:case`or`:return{...e,args:e.args.map(Li)};case`not`:return Ri(e.arg);case`search`:case`present`:case`isNull`:case`related`:return e;default:return Ii(e,e)}},Ri=e=>{switch(e.kind){case`and`:return $.or(...e.args.map(Ri));case`or`:return $.and(...e.args.map(Ri));case`not`:return Li(e.arg);case`search`:case`present`:case`isNull`:case`related`:return $.not(e);default:return Ii(e,$.not(e))}},zi=e=>{let t=c(e);if(!t.ok)throw Error(`The filter cannot be read: ${t.errors.map(e=>e.message).join(`; `)}`);return t.ast},Bi=e=>e.kind===`and`||e.kind===`or`?e.args.some(Bi):e.kind===`not`?Bi(e.arg):e.kind===`related`,Vi=(e,t)=>![zi(e),zi(t)].some(e=>e&&Bi(e)),Hi=(e,t)=>{let n=zi(e);if(!n)return null;let r=zi(t),i=$.not(Li(n));return y(r?$.and(r,i):i)},Ui=(e,t)=>Hi(t,e),Wi=e=>e.key.startsWith(`extra:`)?`extra:${e.label}`:e.key,Gi=(e,t)=>{let n=new Map(e.map(e=>[Wi(e),e])),r=new Map(t.map(e=>[Wi(e),e])),i=e.filter(e=>!r.has(Wi(e))).map(e=>({kind:`removed`,label:e.label})),a=t.flatMap(e=>{let t=n.get(Wi(e));return t&&t.label!==e.label?[{kind:`changed`,label:e.label,before:t.label}]:[]}),o=t.filter(e=>!n.has(Wi(e))).map(e=>({kind:`added`,label:e.label}));return[...i,...a,...o]},Ki=(e,t,n,r)=>{let i=e-t;if(i===0)return J(`asMany`,{plural:r});let a=Math.abs(i)===1?n:r;return i>0?J(`more`,{count:i,noun:a}):J(`fewer`,{count:-i,noun:a})},qi=12,Ji={added:{word:`added`,className:`text-success-text`},removed:{word:`removed`,className:`text-danger-text`},changed:{word:`changed`,className:`text-primary-text`}},Yi=({changes:e})=>(0,X.jsx)(`ul`,{"aria-label":J(`filterChanges`),className:`divide-y rounded-md border`,children:e.map(e=>(0,X.jsxs)(`li`,{className:`grid grid-cols-[72px_1fr] gap-3 px-3 py-2`,children:[(0,X.jsx)(`span`,{className:`font-medium ${Ji[e.kind].className}`,children:J(Ji[e.kind].word)}),e.kind===`changed`?(0,X.jsxs)(`span`,{children:[(0,X.jsx)(`span`,{className:`text-muted-foreground line-through`,children:e.before}),` `,(0,X.jsx)(`span`,{className:`font-medium`,children:e.label})]}):(0,X.jsx)(`span`,{className:e.kind===`removed`?`text-muted-foreground line-through`:`font-medium`,children:e.label})]},`${e.kind}:${e.label}`))}),Xi=(e,t)=>{let n=et({...Ue(H(),e,t??``),enabled:t!==null});return t===null?0:n.data},Zi=(e,t,n)=>`${e} ${e===1?t:n}`,Qi=({model:e,view:t,title:n,filter:r,total:i,plural:a})=>{let s=t?.list?.displays?.find(e=>e.kind===`cards`);return(0,X.jsxs)(`section`,{"aria-label":n,className:`flex flex-col gap-2`,children:[(0,X.jsxs)(`h3`,{className:`font-semibold`,children:[n,` `,(0,X.jsxs)(`span`,{className:`font-normal text-muted-foreground`,children:[`(`,i??`…`,`)`]})]}),i!==void 0&&i>qi&&(0,X.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:J(`firstOf`,{limit:qi,total:i})}),r===null||i===0?(0,X.jsx)(`p`,{className:`text-muted-foreground`,children:J(`noPlural`,{plural:a})}):(0,X.jsx)(It,{model:e,view:t,filter:r,sort:o(e,t),limit:qi,display:s?.name??`table`,row:!0,link:!1,empty:`No ${a}.`})]})},$i=({model:e,view:t,before:n,after:r})=>{let i=(0,Z.useMemo)(()=>Hi(n,r),[n,r]),a=(0,Z.useMemo)(()=>Ui(n,r),[n,r]),o=Xi(e,i),s=Xi(e,a),c=(t?.names?.singular??V(e.name)).toLowerCase(),l=(t?.names?.plural??V(e.name)).toLowerCase();return(0,X.jsxs)(X.Fragment,{children:[o!==void 0&&s!==void 0?(0,X.jsxs)(`p`,{children:[(0,X.jsx)(`span`,{className:`font-semibold`,children:Ki(o,s,c,l)}),(0,X.jsxs)(`span`,{className:`text-muted-foreground`,children:[`: `,J(`addedRemoved`,{added:Zi(o,c,l),removed:s})]})]}):(0,X.jsx)(B,{className:`h-4 w-48`}),(0,X.jsx)(Qi,{model:e,view:t,title:J(`added`),filter:i,total:o,plural:l}),(0,X.jsx)(Qi,{model:e,view:t,title:J(`removed`),filter:a,total:s,plural:l})]})},ea=({model:e,view:t,title:n,before:r,after:a,saveNewLabel:o,updating:s,creating:c,onUpdate:l,onSaveNew:u,onCancel:d})=>{let f=Gi(it(e,r),it(e,a));return(0,X.jsx)(U,{open:!0,wide:!0,title:n,onClose:d,actions:(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(i,{onClick:d,children:J(`cancel`)}),(0,X.jsx)(i,{loading:c,disabled:s,onClick:u,children:o}),(0,X.jsx)(i,{variant:`primary`,loading:s,disabled:c,onClick:l,children:J(`update`)})]}),children:(0,X.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[f.length>0&&(0,X.jsx)(Yi,{changes:f}),Vi(r,a)?(0,X.jsx)($i,{model:e,view:t,before:r,after:a}):(0,X.jsx)(`p`,{className:`text-muted-foreground`,children:J(`noRecordsDiff`)})]})})},ta=()=>{let{address:e,set:t}=se();return{key:e?.kind===`list`?e.savedSearch:void 0,open:e=>t({savedSearch:e})}},na=e=>e instanceof Error?e.message:J(`somethingWrong`),ra=(e,t)=>{let n=_e(),r=H(),i=w(),a=We(),{href:o,open:s}=se(),c=ta(),{resource:l}=e,d=n.resources[l],f=n.views[l]?.searchesOf,p=n.permissions[l],m=d!==void 0&&f!==void 0&&p!==void 0&&u(p,`create`)&&u(p,`delete`),h=n.signIn?.[l]?.signIn,g=Et(l,m),v=e=>Oe(_(d,e)),y=f&&g.data?.find(e=>e[f.filter]===t),b=y||c.key===void 0||!p||!u(p,`update`)?void 0:g.data?.find(e=>v(e)===c.key),x=n.views[l]?.names,S=x?.plural??`saved searches`,C=f?.name===void 0?void 0:d?.fields[f.name],T=$e({mutationFn:e=>r.create(l,{[f.filter]:t,...f.name&&{[f.name]:e}}),onSuccess:e=>{c.open(v(e.record)),i.show({state:`success`,title:J(`searchSaved`),action:{label:J(`openPlural`,{plural:S}),href:o({kind:`list`,resource:l}),onNavigate:s}})},onError:e=>i.show({state:`error`,title:J(`couldNotSave`),description:na(e)}),onSettled:()=>a(l)}),E=$e({mutationFn:e=>r.remove(l,v(e)),onError:e=>i.show({state:`error`,title:J(`couldNotTakeOff`),description:na(e)}),onSettled:()=>a(l)}),D=$e({mutationFn:e=>r.update(l,v(e),{[f.filter]:t},e.etag??`*`),onSuccess:()=>i.show({state:`success`,title:J(`searchUpdated`)}),onError:e=>i.show({state:`error`,title:J(`couldNotUpdate`),description:na(e)}),onSettled:()=>a(l)}),O=T.isPending||E.isPending||D.isPending;return{mode:m?`save`:h?`sign-in`:void 0,prompt:h,saved:y!==void 0,opened:b&&{filter:String(b[f.filter]??``),name:f.name&&typeof b[f.name]==`string`&&b[f.name]!==``?String(b[f.name]):void 0},noun:(x?.singular??V(l)).toLowerCase(),naming:C&&{label:n.views[l]?.fields[C.name]?.label??V(C.name),required:!C.nullable},ready:g.data!==void 0&&!O,updating:D.isPending,creating:T.isPending,remove:()=>y&&E.mutate(y),saveNew:(e,t)=>T.mutate(e,t),update:e=>b&&D.mutate(b,e)}},ia=({model:e,view:t,search:n,filter:r,chips:o,className:s})=>{let c=ra(n,r),[l,u]=(0,Z.useState)(!1),[d,f]=(0,Z.useState)(!1),[m,h]=(0,Z.useState)();if(!c.mode)return null;let g=n.label??J(`saveSearch`);if(c.mode===`sign-in`)return(0,X.jsxs)(X.Fragment,{children:[(0,X.jsxs)(i,{className:s,"aria-haspopup":`dialog`,onClick:()=>u(!0),children:[(0,X.jsx)(a,{className:`size-3.5`,"aria-hidden":!0}),g]}),(0,X.jsx)(p,{as:`dialog`,prompt:c.prompt,open:l,onClose:()=>u(!1)})]});let _=e=>{f(!1),c.naming?h(e):c.saveNew(null)},v=m!==void 0&&c.naming&&(0,X.jsx)(Pi,{title:m,chips:o,label:c.naming.label,required:c.naming.required,busy:c.creating,onSave:e=>c.saveNew(e,{onSuccess:()=>h(void 0)}),onClose:()=>h(void 0)}),y=c.opened;if(y){let n=J(`saveAsNew`,{noun:c.noun});return(0,X.jsxs)(X.Fragment,{children:[(0,X.jsxs)(i,{className:s,"aria-haspopup":`dialog`,"aria-disabled":!c.ready,onClick:()=>c.ready&&f(!0),children:[(0,X.jsx)(vn,{className:`size-3.5`,"aria-hidden":!0}),(0,X.jsx)(`span`,{className:`max-w-60 truncate`,children:J(`updateName`,{name:y.name??c.noun})})]}),(0,X.jsxs)(i,{className:s,"aria-haspopup":c.naming?`dialog`:void 0,"aria-disabled":!c.ready,onClick:()=>c.ready&&_(n),children:[(0,X.jsx)(mn,{className:`size-3.5`,"aria-hidden":!0}),n]}),d&&(0,X.jsx)(ea,{model:e,view:t,title:y.name?J(`updateNameQuestion`,{name:y.name}):J(`updateNounQuestion`,{noun:c.noun}),before:y.filter,after:r,saveNewLabel:n,updating:c.updating,creating:c.creating,onUpdate:()=>c.update({onSuccess:()=>f(!1)}),onSaveNew:()=>_(n),onCancel:()=>f(!1)}),v]})}let b=c.saved?fn:a;return(0,X.jsxs)(X.Fragment,{children:[(0,X.jsxs)(i,{className:s,"aria-pressed":c.saved,"aria-haspopup":!c.saved&&c.naming?`dialog`:void 0,"aria-disabled":!c.ready,onClick:()=>c.ready&&(c.saved?c.remove():_(g)),children:[(0,X.jsx)(b,{className:c.saved?`size-3.5 text-primary`:`size-3.5`,"aria-hidden":!0}),g]}),v]})},aa=e=>e instanceof Error?e.message:J(`somethingWrong`),oa=({model:e,view:t,name:n,value:i,onChange:a})=>{let o=(0,Z.useId)(),s=e.fields[n],c=t.fields[n],l=c?.label??V(n);if(s?.type===`boolean`)return(0,X.jsx)(C,{checked:i===!0,onChange:a,label:l});if(s?.type!==`enum`)throw Error(`Not implemented: "${n}" is ${s?.type??`unknown`}, and a saved search's controls are enums or booleans`);return(0,X.jsxs)(`label`,{htmlFor:o,className:`flex items-center gap-2 text-muted-foreground`,children:[l,(0,X.jsx)(`select`,{id:o,value:String(i??``),onChange:e=>a(e.target.value),className:`h-8 rounded-md border border-border-strong bg-background px-2 text-foreground shadow-sm focus:border-primary focus:outline-none focus:ring-2 focus:ring-primary/20`,children:(s.enumValues??[]).map(e=>(0,X.jsx)(`option`,{value:e,children:r(e,c?.valueLabels)},e))})]})},sa=(e,t,n)=>Object.entries(n).map(([n,i])=>`${t.fields[n]?.label??V(n)}: ${e.fields[n]?.type===`boolean`?J(i===!0?`on`:`off`):r(String(i),t.fields[n]?.valueLabels)}`).join(`, `),ca=({model:e,view:t,recordKey:n,title:r,row:i,fields:a})=>{let o=H(),s=w(),c=We(),l=$e({mutationFn:t=>o.update(e.name,n,t,i.etag??`*`),onSuccess:(n,i)=>s.show({state:`success`,title:J(`saved`,{title:r}),description:sa(e,t,i)}),onError:e=>s.show({state:`error`,title:J(`couldNotChange`),description:aa(e)}),onSettled:()=>c(e.name)});return(0,X.jsx)(`div`,{className:`flex flex-wrap items-center gap-3`,children:a.map(n=>(0,X.jsx)(oa,{model:e,view:t,name:n,value:l.isPending&&n in(l.variables??{})?l.variables[n]:i[n],onChange:e=>l.mutate({[n]:e})},n))})},la=e=>e instanceof Error?e.message:J(`somethingWrong`),ua=({model:e,view:t,of:n,target:r,targetView:a,row:o,recordKey:s,canRename:c,onDelete:l})=>{let u=H(),d=w(),f=We(),[p,m]=(0,Z.useState)(!1),{name:h,chips:g,title:_,body:v}=Wt({model:e,of:n,target:r,targetView:a,row:o,recordKey:s}),y=$e({mutationFn:t=>u.update(e.name,s,{[n.name]:t},o.etag??`*`),onSuccess:()=>m(!1),onError:e=>d.show({state:`error`,title:J(`couldNotRename`),description:la(e)}),onSettled:()=>f(e.name)}),b=n.name===void 0?void 0:e.fields[n.name];return(0,X.jsxs)(`section`,{"aria-label":_,className:`flex flex-col gap-3 rounded-lg border bg-surface p-4`,children:[(0,X.jsxs)(`div`,{className:`flex flex-wrap items-start justify-between gap-3`,children:[(0,X.jsx)(`div`,{className:`flex min-w-0 flex-col gap-2`,children:(0,X.jsx)(`h2`,{className:`text-base font-semibold`,children:(0,X.jsx)(S,{to:{kind:`record`,resource:e.name,key:s},className:`hover:underline`,children:h??(0,X.jsx)(wt,{chips:g})})})}),(0,X.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[n.controls&&(0,X.jsx)(ca,{model:e,view:t,recordKey:s,title:_,row:o,fields:n.controls}),c&&b&&(0,X.jsx)(i,{variant:`ghost`,"aria-label":J(`renameTitle`,{title:_}),"aria-haspopup":`dialog`,onClick:()=>m(!0),children:(0,X.jsx)(Kt,{className:`size-3.5`,"aria-hidden":!0})}),l&&(0,X.jsx)(i,{variant:`ghost`,"aria-label":J(`deleteTitle`,{title:_}),onClick:()=>l(_),children:(0,X.jsx)(Zt,{className:`size-3.5`,"aria-hidden":!0})})]})]}),p&&b&&(0,X.jsx)(Pi,{title:J(`renameTitle`,{title:_}),chips:g,label:t.fields[b.name]?.label??V(b.name),required:!b.nullable,initial:h,busy:y.isPending,onSave:e=>y.mutate(e),onClose:()=>m(!1)}),(0,X.jsx)(Ut,{...v})]})},da=({model:e,view:t})=>{let{resources:n,views:r}=_e(),i=t.searchesOf,a=n[i.resource],o=r[i.resource],s=Et(e.name,!0),c=ae(e.name),l=qt({model:e,view:t}),d=t.names?.plural??V(e.name),f=e=>(0,X.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col gap-3 px-5 py-4`,children:[l.dialogs,(0,X.jsx)(Qt,{title:d,subtitle:t.help}),e]});if(!a)return f((0,X.jsx)(he,{title:J(`notFound`),children:J.rich(`noResource`,{resource:i.resource})}));if(s.error)return f((0,X.jsx)(Re,{title:J(`couldNotLoadYour`,{plural:d.toLowerCase()}),error:s.error}));if(!s.data)return f((0,X.jsx)(`div`,{className:`flex flex-col gap-3`,children:Array.from({length:2},(e,t)=>(0,X.jsx)(B,{className:`h-56`},t))}));if(s.data.length===0){let e=(o?.names?.plural??V(a.name)).toLowerCase();return f((0,X.jsx)(`p`,{className:`py-8 text-center text-muted-foreground`,children:J.rich(`noSavedYet`,{plural:d.toLowerCase(),list:(0,X.jsx)(S,{to:{kind:`list`,resource:a.name},className:`font-medium text-primary-text hover:underline`,children:e})})}))}return f((0,X.jsx)(`div`,{className:`flex flex-col gap-4`,children:s.data.map(n=>{let r=Oe(_(e,n)),s=u(c,`delete`)?e=>void l.start({key:r,title:e,etag:n.etag,snapshot:n}):void 0;return(0,X.jsx)(ua,{model:e,view:t,of:i,target:a,targetView:o,row:n,recordKey:r,canRename:u(c,`update`),onDelete:s},r)})}))},fa=({field:e,hints:t,resource:n,stored:r,onSave:i,close:a})=>{let[o,s]=(0,Z.useState)(()=>ee(e,r)),c=(0,Z.useRef)(null),u=(0,Z.useRef)(!1),d=!t?.widget&&(e.type===`boolean`||e.type===`enum`);(0,Z.useEffect)(()=>{c.current?.querySelector(`input, select, textarea, button, [tabindex]`)?.focus()},[]);let f=(t,n,s=o)=>{u.current||(u.current=!0,t&&l(e,s,r)&&i(je(e,s)),a(n))};return(0,X.jsx)(`div`,{ref:c,className:`w-full min-w-0`,onKeyDown:e=>{P(e.target)||(e.key===`Enter`?(e.preventDefault(),f(!0)):e.key===`Tab`?(e.preventDefault(),f(!0,e.shiftKey?-1:1)):e.key===`Escape`&&(e.preventDefault(),e.stopPropagation(),f(!1)))},onBlur:e=>{!c.current?.contains(e.relatedTarget)&&!P(e.relatedTarget)&&f(!0)},children:(0,X.jsx)(ye,{field:e,hints:t,value:o,stored:r,resource:n,onChange:e=>{s(e),d&&f(!0,void 0,e)}})})},pa=g(`app/list-edit`),ma=e=>{let t=H(),n=Qe(),r=w(),[i,a]=(0,Z.useState)(new Map),o=(0,Z.useRef)(i),s=(0,Z.useRef)(new Map),c=(e,t)=>{o.current=new Map(o.current).set(e,{...o.current.get(e),...t}),a(o.current)},l=async(i,a,s)=>{let l=_(e,i),u=String(o.current.get(i.id)?.etag??i.etag);try{let r=await t.update(e.name,l,{[a]:s},u);c(i.id,{[a]:r.record[a],etag:r.etag}),n.setQueryData(L.record(e.name,Oe(l)),r),n.invalidateQueries({queryKey:[`page`,e.name]}),n.invalidateQueries({queryKey:[`list`,e.name]}),n.invalidateQueries({queryKey:[`map`,e.name]}),n.invalidateQueries({queryKey:[`count`,e.name]})}catch(n){if(!N(n))throw c(i.id,{[a]:i[a]}),n;let o=n.status===412,s=o?await t.get(e.name,l):void 0;c(i.id,s?{[a]:s.record[a],etag:s.etag}:{[a]:i[a]});let u=n.errors.find(e=>e.field===a)?.message??n.message;r.show({state:`error`,title:pa(o?`changedBySomeoneElse`:`couldNotSave`),description:u})}};return{patches:i,save:(e,t,n)=>{c(e.id,{[t]:n});let r=(s.current.get(e.id)??Promise.resolve()).then(()=>l(e,t,n));return s.current.set(e.id,r.catch(()=>void 0)),r}}},ha=(e,t,n)=>{let r=ma(e),i=t?.list?.editable??[];return{editor:i.length>0&&u(n,`update`)?{editable:(t,n)=>i.includes(n)&&e.fields[n]!==void 0&&F(e.fields[n])&&ue(t,`update`),render:(n,i,a)=>(0,X.jsx)(fa,{field:e.fields[i],hints:t?.fields[i],resource:e.name,stored:n[i],onSave:e=>void r.save(n,i,e),close:a})}:void 0,patches:r.patches}},ga=ne(),_a=e=>e.find(e=>e.kind===`search`),va=({address:e})=>{let{resources:t,views:n,signIn:r}=_e(),i=t[e.resource],a=r?.[e.resource];if(!i)return a?(0,X.jsx)(p,{as:`page`,prompt:a.signIn}):(0,X.jsx)(he,{title:W(`notFound`),children:W(`noResource`,{name:e.resource})});let o=xe(n[e.resource],e.list);if(e.list!==void 0&&!o)return(0,X.jsx)(he,{title:W(`notFound`),children:Y(`noList`,{name:e.list})});if(o?.searchesOf)return(0,X.jsx)(da,{model:i,view:o});let s=R(t,n,e.resource,e.list);if(o&&s.listOf){let t=s.model;return(0,X.jsx)(Ni,{model:i,view:o,target:t,children:n=>(0,X.jsx)(ya,{model:t,address:e,scope:n,heading:{title:o.names?.plural??V(i.name),subtitle:o.help}})})}return(0,X.jsx)(ya,{model:i,address:e})},ya=({model:e,address:t,scope:n,heading:r})=>{let a=_e(),{set:o,listTo:c,go:l,href:d}=se(),p=e.name,m=xe(a.views[p],t.list),h=(0,Z.useMemo)(()=>ct(m,e),[m,e]),{fields:g}=Me(),v=(0,Z.useMemo)(()=>Mi(de(Ne(Ie(e,m),e,m,g),e,a.resources,a.views),e,m,a.resources,a.views),[e,m,g,a.resources,a.views]),y=t.filter,b=(0,Z.useMemo)(()=>pt(h,y),[h,y]),C=b.ok?b.state:Gt,w=b.ok?b.extras:[],{orderBy:D,filterLayout:O}=t,k=re(),ee=f(),[te,A]=(0,Z.useState)(!1),j=n?[...w,n]:w,ne=s(),M=Mr({model:e,resources:a.resources,views:a.views,view:m,state:C,extras:j,titleOf:ne}),N=n?dt(h,C,j):b.ok?y:``,P=(0,Z.useMemo)(()=>oe(e,m,v.map(e=>e.id)),[e,m,v]),le=(0,Z.useMemo)(()=>st(m,a.resources,a.views,P),[m,a.resources,a.views,P]),F=en({resources:a.resources,views:a.views,model:e,columns:P,filter:N,orderBy:D,related:le}),I=Be(e,m,t.display),L=ae(p),R=n?void 0:rn(e,L),[fe,pe]=(0,Z.useState)(!1),z=fe&&R!==void 0,me=!I&&!z&&nn(m,R,D,N),he=z||I?.kind!==`map`;E(he);let B=an(e,F.page,F.key,I?.kind===`custom`),ye=Si(),Te=ie(e,m),Ee=e=>({key:e.id,title:String(typeof e[Te]==`object`?e[Te].name:e[Te]??e.id),etag:typeof e.etag==`string`?e.etag:void 0,snapshot:e}),De=m?.names?.singular??V(p),Oe=ha(e,m,L),{state:H}=Ce(),Ae=Yt(e),je=qt({model:e,view:m,restore:Ae,onReview:e=>l({kind:`record`,resource:p,key:e.key})}),Pe=Mt(e),Fe=m?.actions.some(e=>e.run?.kind===`delete`)??!1,U=(e,t=w)=>o({filter:dt(h,e,t)}),ze=_a(w),W=e=>{let t=w.filter(e=>e.kind!==`search`);U(C,e?[...t,ga.search(e)]:t)},G=m?.names?.plural??V(p),K=I?.kind===`calendar`||I?.kind===`timeline`||I?.kind===`board`&&Ve(e)?void 0:I,He=K&&(0,X.jsx)(Dt,{model:e,view:m,display:K,orderBy:D,onChange:e=>o({orderBy:e})}),Ue=e.search?.length?(0,X.jsx)(ji,{value:ze?.kind===`search`?ze.text:``,onCommit:W,placeholder:Y(`searchPlural`,{plural:G}),className:k?void 0:`min-h-11`}):null,We=(0,X.jsx)(Xn,{layout:O,config:M,value:C,onChange:U,leading:O===`bar`?He:void 0,trailing:Ue}),Ge=O===`bar`?We:(0,X.jsx)(Jn,{groups:[He?[He]:[]],trailing:Ue}),qe=yt(M,C),Je=(0,X.jsx)(On,{scroll:!0,chips:qe,onRemove:e=>U(ut(C,e)),onClear:()=>U(Gt)}),Ye=K&&(0,X.jsx)(Fn,{title:Y(`sort`),children:(0,X.jsx)(Dt,{model:e,view:m,display:K,orderBy:D,onChange:e=>o({orderBy:e}),className:`min-h-11 w-full`})}),Xe=(0,X.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,X.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,X.jsxs)(i,{className:`min-h-11`,onClick:()=>A(!0),"aria-haspopup":`dialog`,children:[(0,X.jsx)(bn,{className:`size-3.5`}),qe.length>0?Y(`filtersCount`,{count:qe.length}):Y(`filters`)]}),Ue??(0,X.jsx)(`div`,{className:`min-w-0 flex-1`,children:Je})]}),Ue&&Je,(0,X.jsx)(Le,{title:Y(`filters`),open:te,onClose:()=>A(!1),children:(0,X.jsx)(Xn,{layout:`panel`,fullWidth:!0,config:M,value:C,onChange:U,leading:Ye})})]}),Ze=!n&&ce(m,a.pages,L)&&(0,X.jsxs)(S,{to:{kind:`create`,resource:p},className:we({variant:`primary`}),children:[(0,X.jsx)(Se,{className:`size-3.5`}),Y(`newRecord`,{singular:De})]}),Qe=m?.saveSearch&&!n&&b.ok&&y&&(0,X.jsx)(ia,{model:e,view:m,search:m.saveSearch,filter:y,chips:mt(e,m,y,Nt(M))}),$e=!n&&(0,X.jsx)(Fr,{model:e}),et=Yr({model:e,view:m,resources:a.resources,views:a.views,plural:G,filter:N,orderBy:D}),tt=ar(m)&&(0,X.jsxs)(i,{onClick:()=>et.open(),...!k&&{"aria-label":Y(`export`),title:Y(`export`)},children:[(0,X.jsx)(be,{className:`size-3.5`}),k&&Y(`export`)]}),rt=R&&!me&&(0,X.jsx)(Xt,{sorting:z,onChange:pe,iconOnly:!k}),it=t=>!z&&(0,X.jsx)(Bt,{view:m,choices:ve(e,m,ee),value:I?.name??`table`,onChange:e=>o({display:e}),menu:t}),at=tn(e),ot=t=>{at(x(e,t).record),l({kind:`record`,resource:p,key:_(e,t)})},lt=async e=>{let t=e.map(Ee),n=await je.startBulk(t);return e.filter((e,r)=>n.includes(t[r]))},q=F.source?(0,X.jsx)(vt,{columns:v,source:F.source,sort:ke(D),onSortChange:e=>o({orderBy:T(e)}),onOpenRow:ot,rowLink:t=>({href:d({kind:`record`,resource:p,key:_(e,t)}),onFollow:()=>ot(t)}),cellEditor:Oe.editor,rowPatches:Oe.patches,initialScrollIndex:ye.initialIndex,onScrollIndex:ye.remember,rowActions:[{label:Y(`openRecord`,{singular:De}),onSelect:ot},...Pe.rowActions,...u(L,`delete`)&&!Fe?[{label:Y(`delete`),destructive:!0,available:e=>ue(e,`delete`),onSelect:e=>void je.start(Ee(e))}]:[]],bulkActions:[...ar(m)&&dr(e)?[{label:e=>Y(`exportCount`,{count:e}),onRun:e=>et.open(e)}]:[],...Pe.bulkActions,...u(L,`delete`)?[{label:e=>Y(`deleteCount`,{count:e}),destructive:!0,onRun:e=>lt(e)}]:[]],rowNumbers:!1,pinKey:H.kind===`signed-in`?Ot(H.user.id,Ke(p,t.list)):void 0,scroll:`parent`,className:`flex-1`}):(0,X.jsx)(`div`,{"aria-busy":!0,className:`flex-1 rounded-lg border bg-surface`}),ft={...F,initialIndex:ye.initialIndex,onScrollIndex:ye.remember},ht=Zr({plural:G,search:ze?.kind===`search`?ze.text:``,filtered:qe.length>0,scoped:!!n||w.some(e=>e.kind!==`search`),canCreate:!!Ze}),gt=(0,X.jsx)(Xr,{state:ht,onClearSearch:()=>W(``),onClearFilters:()=>U(Gt),create:Ze}),_t=z?(0,X.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[(0,X.jsx)(`p`,{className:`text-muted-foreground`,children:Y(`dragToSort`)}),(0,X.jsx)(Jt,{model:e,view:m,field:R,filter:``,columns:ge(e,m)})]}):me?(0,X.jsx)(Jt,{model:e,view:m,field:R,filter:``,columns:ge(e,m),sort:{value:ke(D),onChange:e=>o({orderBy:T(e)})}}):I?I.kind===`cards`?(0,X.jsx)(fi,{model:e,view:m,display:I,list:ft,empty:gt},F.key.join(` `)):I.kind===`map`?(0,X.jsx)(jt,{model:e,view:m,display:I,filter:N,orderBy:D,fields:P,at:t.map,onMove:e=>o({map:e}),flush:!0}):I.kind===`board`?(0,X.jsx)(kt,{model:e,view:m,display:I,fields:P,filter:N,orderBy:D}):I.kind===`calendar`?(0,X.jsx)(Lt,{model:e,view:m,display:I,fields:P,filter:N,at:t.calendar,linkTo:e=>c({calendar:e})}):I.kind===`timeline`?(0,X.jsx)(Ft,{model:e,view:m,display:I,fields:P,filter:N,at:t.timeline,linkTo:e=>c({timeline:e})}):(0,X.jsx)(Vt,{display:I,list:B}):F.source?.total===0&&!F.error?gt:q;return(0,X.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col gap-3 px-5 py-4`,children:[je.dialogs,et.dialogs,Pe.prompt,(0,X.jsx)(Qt,{title:r?.title??G,subtitle:r?r.subtitle:m?.help,subtitleBelow:!0,actions:(0,X.jsxs)(X.Fragment,{children:[it(!k),rt,Qe,$e,tt,Ze]})}),!b.ok&&(0,X.jsx)(Re,{title:Y(`unreadableFilter`),error:Error(b.errors.map(e=>e.message).join(`; `))}),F.error&&!I&&!z&&(0,X.jsx)(Re,{title:Y(`couldNotLoadRows`),error:F.error}),m?.chart&&!z&&(nt(m.chart)?(0,X.jsx)(Ai,{model:e,view:m,chart:m.chart,plural:G,filter:N}):(0,X.jsx)(Oi,{resource:p,chart:m.chart,title:Y(`created`,{plural:G}),filter:N})),!z&&(k?Ge:Xe),k&&O===`panel`&&!z?(0,X.jsxs)(`div`,{className:`flex min-h-0 flex-1 gap-4`,children:[(0,X.jsx)(`div`,{className:he?`sticky top-[calc(var(--pb-sticky-top,0px)+1rem)] flex max-h-[calc(100dvh-var(--pb-sticky-top,0px)-var(--pb-sticky-bottom,0px)-2rem)] shrink-0 self-start`:`flex shrink-0`,children:We}),_t]}):_t]})};export{va as ListPage,xr as a,_r as c,mr as d,pr as f,un as h,Sr as i,hr as l,Q as m,wr as n,vr as o,ur as p,Cr as r,br as s,Er as t,gr as u};
|
|
4
|
-
//# debugId=02ee1fbf-5896-479e-9616-324b061eaa5d
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
(function(){try{var e=typeof globalThis<`u`?globalThis:typeof window<`u`?window:typeof global<`u`?global:typeof self<`u`?self:{};e._sentryModuleMetadata=e._sentryModuleMetadata||{},e._sentryModuleMetadata[new e.Error().stack]=function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];if(n!=null)for(var r in n)n.hasOwnProperty(r)&&(e[r]=n[r])}return e}({},e._sentryModuleMetadata[new e.Error().stack],{"_sentryBundlerPluginAppKey:protobase-app":!0})}catch{}})();import{o as e}from"./rolldown-runtime-DFwUHQ4A.js";import{i as t,t as n}from"./react-CuiNlnus.js";import{$s as r,Aa as i,Ga as a,Jo as o,Uo as s,Vc as c,Wa as l,Wo as u,Ya as d,do as f,ds as p,ms as m,qa as h,tc as g}from"./app-B48LQpC1.js";import{o as _}from"./vendor-t7Q7QbPu.js";import{t as v}from"./page-header-Ddz2r5ic.js";import{n as y,t as b}from"./person-row-CB2jyi4a.js";var x=e(t(),1),S=e(n(),1),C=e=>e?.role===`owner`?[`owner`,`admin`,`member`]:[`admin`,`member`],w=({member:e,current:t,status:n,presence:i,onChanged:o})=>{let{session:s,organizations:c}=p(),u=t.organization.id,{busy:m,error:g,run:_}=l(),v=c?.roles??[],x=e.id===t.memberId,w=C(t),T=e.role===`owner`&&t.role!==`owner`,E=v.filter(e=>e.membership);return(0,S.jsx)(b,{name:e.name,email:e.email,self:x,error:g,...(n||i)&&{status:(0,S.jsx)(f,{status:n,presence:i})},actions:(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(`select`,{"aria-label":d(`roleOf`,{name:e.name}),value:e.role,disabled:m||T,onChange:t=>void _(async()=>{await s.organizations.setRole(u,e.id,t.target.value),o()}),className:`h-7 rounded-md border border-border-strong bg-background px-2 text-body`,children:(T?[e.role]:w).map(e=>(0,S.jsx)(`option`,{value:e,children:h(e)},e))}),!x&&(0,S.jsx)(r,{size:`sm`,variant:`danger`,loading:m,disabled:T,onClick:()=>void _(async()=>{await s.organizations.removeMember(u,e.id),o()}),children:d(`remove`)})]}),children:(0,S.jsx)(y,{roles:E,selected:e.appRoles,grantable:a(v,t),disabled:m,onChange:t=>void _(async()=>{await s.organizations.setAppRoles(e.id,t),o()})})})},T=({current:e,statuses:t,presence:n})=>{let{session:r}=p(),a=e?.organization?.id,l=_({queryKey:c.organizationMembers(a??``),queryFn:()=>r.organizations.members(a),enabled:!!a,retry:!1}),f=l.data,h=l.error?l.error instanceof m?o(l.error):d(`couldNotReadMembers`):void 0,{refetch:y}=l,b=(0,x.useCallback)(()=>void y(),[y]);return e?.organization?(0,S.jsxs)(`div`,{className:`mx-auto flex w-full max-w-3xl flex-col gap-4 px-4 py-6 md:px-6`,children:[(0,S.jsx)(v,{title:d(`members`),subtitle:d(`whoWorks`,{organization:e.organization.name})}),(0,S.jsxs)(s,{title:d(`members`),description:d(`membersDescription`),children:[(0,S.jsx)(u,{message:h}),f?(0,S.jsx)(`ul`,{className:`divide-y rounded-md border`,children:f.map(r=>(0,S.jsx)(w,{member:r,current:e,status:t?.find(e=>e.userId===r.userId),presence:i(n,r.userId),onChanged:b},`${r.id}/${r.role}/${r.appRoles.join()}`))}):!h&&(0,S.jsxs)(`div`,{className:`flex items-center gap-2 text-muted-foreground`,children:[(0,S.jsx)(g,{}),` `,d(`loading`)]})]})]}):null};export{T as MembersPage,C as assignableOrganizationRoles};
|
|
2
|
-
//# debugId=f5b8c84e-6518-46eb-95b8-208a327deac6
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
(function(){try{var e=typeof globalThis<`u`?globalThis:typeof window<`u`?window:typeof global<`u`?global:typeof self<`u`?self:{};e._sentryModuleMetadata=e._sentryModuleMetadata||{},e._sentryModuleMetadata[new e.Error().stack]=function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];if(n!=null)for(var r in n)n.hasOwnProperty(r)&&(e[r]=n[r])}return e}({},e._sentryModuleMetadata[new e.Error().stack],{"_sentryBundlerPluginAppKey:protobase-app":!0})}catch{}})();import{Ca as e,Fl as t,Hc as n,Hi as r,Il as i,Rs as a,Zc as o,il as s,ji as c,li as l}from"./app-B48LQpC1.js";var u=(t,n)=>{let r=t.position;if(!r||!e(n,`update`))return;let i=t.fields[r.field];return i&&!i.readOnly?r.field:void 0},d=(e,t)=>e.position?.within===void 0?u(e,t):void 0,f=(e,t,n)=>t.position?.within!==void 0&&e.field===t.position.within&&!e.through&&!e.from&&!e.filter?u(t,n):void 0,p=(e,t,n,r)=>{if(t===void 0||e?.list?.drag?.rank!==!0||r!==``)return!1;let i=c(n);return i.columnId===t&&i.direction===`asc`},m=n(`app/hand-order`),h=(e,t,{title:n,place:r})=>!a(e)||e.status!==412?{state:`error`,title:t,description:l(e)}:n===void 0?{state:`warning`,title:t,description:m(`orderChangedSince`,{place:r})}:{state:`warning`,title:m(`notSaved`,{title:n}),description:m(`orderChangedThere`,{place:r})},g=(e,t,n)=>t.flatMap(({before:t,record:i,etag:a})=>{let o=n.filter(e=>Object.hasOwn(t,e)&&t[e]!==i[e]);return o.length===0?[]:[{op:`update`,resource:e.name,key:r(e,i),data:Object.fromEntries(o.map(e=>[e,t[e]])),etag:a}]}),_=async(e,t,n)=>{let r=[],i=``;do{let a=await e.search(t,{filter:n,pageSize:100,...i&&{pageToken:i}});r.push(...a.items),i=a.nextPageToken}while(i);return r},v=(e,t)=>t===void 0?e:`(${e}) AND (${t})`,y=async(e,n,a,c)=>{let l=n.position?.after;if(!l)return{after:[],before:[]};let u=n.primaryKey[0],d=r(n,c),f=e=>s([e]),p=await _(e,l.resource,v(i(t.or(t.eq(l.field,d),t.eq(l.key,d))),l.filter)),m=(e,t)=>p.flatMap(n=>f(n[e])===f(d)&&f(n[t])!==f(d)?[n[t]]:[]),h=m(l.field,l.key),g=m(l.key,l.field),[y,b]=await Promise.all([_(e,n.name,v(i(t.in(u,[d,...h])),l.while)),g.length===0?[]:_(e,n.name,i(t.in(u,g)))]),x=e=>{let t=s(r(n,e));return{key:t,rank:e[n.position.field],title:o(n,a,e,t)}},S=y.some(e=>f(e[u])===f(d));return{after:y.filter(e=>f(e[u])!==f(d)).map(x),before:S?b.map(x):[]}},b=(e,t,n,i,a,o=!1)=>{let s=t=>i[t]?r(e,i[t]):null,c=o&&a===i.length-1;return{op:`move`,resource:e.name,field:t,key:r(e,i[a]),after:s(a-1),...!c&&{before:s(a+1)},...n&&{filter:n}}},x=(e,t)=>{let n=new Map;for(let r of e)if(r.op===`reorder`||r.op===`move`)for(let e of r.records){let r=t(e.record);n.has(r)||n.set(r,e.previous)}return n},S=n(`app/rank-after`);export{g as a,p as c,y as i,d as l,x as n,h as o,b as r,m as s,S as t,f as u};
|
|
2
|
-
//# debugId=255cf1d4-18b5-4cb9-a07c-36f8819dab2a
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
(function(){try{var e=typeof globalThis<`u`?globalThis:typeof window<`u`?window:typeof global<`u`?global:typeof self<`u`?self:{};e._sentryModuleMetadata=e._sentryModuleMetadata||{},e._sentryModuleMetadata[new e.Error().stack]=function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];if(n!=null)for(var r in n)n.hasOwnProperty(r)&&(e[r]=n[r])}return e}({},e._sentryModuleMetadata[new e.Error().stack],{"_sentryBundlerPluginAppKey:protobase-app":!0})}catch{}})();import{o as e}from"./rolldown-runtime-DFwUHQ4A.js";import{i as t,t as n}from"./react-CuiNlnus.js";import{$s as r,Ea as i,Ka as a,M as o,So as s,Uo as c,Wa as l,Wo as u,Ya as d,Zs as f,ds as p,is as m,ns as h,qa as g}from"./app-B48LQpC1.js";import{t as _}from"./page-header-Ddz2r5ic.js";var v=e(t(),1),y=e(n(),1),b=({organization:e,editable:t,onSaved:n})=>{let{session:i}=p(),[a,o]=(0,v.useState)(e.name),[f,m]=(0,v.useState)(e.slug),{busy:h,error:g,run:_}=l(),b=a.trim()!==e.name||f!==e.slug;return(0,y.jsxs)(c,{title:d(`details`),description:d(t?`detailsEditable`:`detailsReadOnly`),children:[(0,y.jsx)(u,{message:g}),(0,y.jsxs)(`form`,{className:`flex flex-col gap-2 sm:flex-row`,onSubmit:t=>{t.preventDefault(),_(async()=>{await i.organizations.rename(e.id,{name:a.trim(),slug:f}),n()})},children:[(0,y.jsx)(s,{"aria-label":d(`name`),value:a,disabled:!t,onChange:e=>o(e.target.value),wrapperClassName:`flex-1`}),(0,y.jsx)(s,{"aria-label":d(`slug`),value:f,disabled:!t,onChange:e=>m(e.target.value),wrapperClassName:`sm:w-48`}),t&&(0,y.jsx)(r,{type:`submit`,variant:`primary`,loading:h,disabled:!b||!a.trim(),children:d(`save`)})]})]})},x=({organization:e,memberId:t})=>{let{session:n}=p(),[i,a]=(0,v.useState)([]),[o,s]=(0,v.useState)(``),{busy:f,error:m,run:h}=l();return(0,v.useEffect)(()=>{n.organizations.members(e.id).then(e=>a(e.filter(e=>e.id!==t)),()=>a([]))},[n,e.id,t]),(0,y.jsxs)(c,{title:d(`handOver`),description:d(`handOverDescription`),children:[(0,y.jsx)(u,{message:m}),(0,y.jsxs)(`div`,{className:`flex flex-col gap-2 sm:flex-row`,children:[(0,y.jsxs)(`select`,{"aria-label":d(`newOwner`),value:o,onChange:e=>s(e.target.value),className:`h-8 flex-1 rounded-md border border-border-strong bg-background px-2`,children:[(0,y.jsx)(`option`,{value:``,children:d(`chooseMember`)}),i.map(e=>(0,y.jsxs)(`option`,{value:e.id,children:[e.name,` (`,e.email,`)`]},e.id))]}),(0,y.jsx)(r,{loading:f,disabled:!o,onClick:()=>void h(async()=>{await n.organizations.transferOwnership(o),window.location.reload()}),children:d(`handOver`)})]})]})},S=({organization:e,basePath:t})=>{let{session:n}=p(),[a,o]=(0,v.useState)(!1),[m,h]=(0,v.useState)(``),{busy:g,error:_,run:b}=l(),x=()=>b(async()=>{await n.organizations.remove(e.id),i(t)});return(0,y.jsxs)(c,{title:d(`deleteOrganization`),description:d(`deleteDescription`),children:[(0,y.jsx)(u,{message:a?void 0:_}),(0,y.jsx)(r,{variant:`danger`,onClick:()=>o(!0),children:d(`deleteOrganization`)}),a&&(0,y.jsxs)(f,{title:d(`deleteTitle`,{name:e.name}),description:d(`deleteConfirm`),onClose:()=>o(!1),actions:(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(r,{onClick:()=>o(!1),children:d(`cancel`)}),(0,y.jsx)(r,{variant:`danger`,loading:g,disabled:m!==e.name,onClick:()=>void x(),children:d(`delete`)})]}),children:[(0,y.jsx)(u,{message:_}),(0,y.jsx)(s,{"aria-label":d(`organizationName`),value:m,onChange:e=>h(e.target.value)})]})]})},C=({editable:e})=>{let t=m(),[n,r]=(0,v.useState)(),{busy:i,error:a,run:s}=l();return(0,v.useEffect)(()=>{t.callGuests.allowed().then(r)},[t]),n===void 0?null:(0,y.jsxs)(c,{title:d(`guestLinks`),description:d(`guestLinksDescription`),children:[(0,y.jsx)(u,{message:a}),(0,y.jsxs)(`label`,{className:`flex items-center gap-2 text-sm text-foreground`,children:[(0,y.jsx)(o,{checked:n,label:d(`guestLinksAllowed`),...e&&!i&&{onChange:e=>void s(async()=>{await t.callGuests.setAllowed(e),r(e)})}}),d(`guestLinksAllowed`)]})]})},w=({organization:e,basePath:t,owner:n})=>{let{session:a}=p(),{busy:o,error:s,run:f}=l();return(0,y.jsxs)(c,{title:d(`leave`),description:d(n?`leaveOwner`:`leaveMember`),children:[(0,y.jsx)(u,{message:s}),(0,y.jsx)(r,{loading:o,onClick:()=>void f(async()=>{await a.organizations.leave(e.id),i(t)}),children:d(`leaveName`,{name:e.name})})]})},T=({current:e,basePath:t,onChanged:n})=>{let r=h().data?.calls===!0,i=e?.organization;if(!i)return(0,y.jsx)(`div`,{className:`mx-auto w-full max-w-3xl px-4 py-6 md:px-6`,children:(0,y.jsx)(_,{title:d(`organization`),subtitle:d(`noOrganization`)})});let o=e.role===`owner`;return(0,y.jsxs)(`div`,{className:`mx-auto flex w-full max-w-3xl flex-col gap-4 px-4 py-6 md:px-6`,children:[(0,y.jsx)(_,{title:i.name,subtitle:e.role?d(`youAre`,{role:g(e.role).toLowerCase()}):d(`throughGlobalRoles`)}),(0,y.jsx)(b,{organization:i,editable:a(e),onSaved:n},`${i.name}/${i.slug}`),r&&e.role&&(0,y.jsx)(C,{editable:a(e)}),o&&e.memberId&&(0,y.jsx)(x,{organization:i,memberId:e.memberId}),e.role&&(0,y.jsx)(w,{organization:i,basePath:t,owner:o}),o&&(0,y.jsx)(S,{organization:i,basePath:t})]})};export{T as OrganizationPage};
|
|
2
|
-
//# debugId=113199cc-3d1d-438a-adb6-cba8ffd2ddf3
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
(function(){try{var e=typeof globalThis<`u`?globalThis:typeof window<`u`?window:typeof global<`u`?global:typeof self<`u`?self:{};e._sentryModuleMetadata=e._sentryModuleMetadata||{},e._sentryModuleMetadata[new e.Error().stack]=function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];if(n!=null)for(var r in n)n.hasOwnProperty(r)&&(e[r]=n[r])}return e}({},e._sentryModuleMetadata[new e.Error().stack],{"_sentryBundlerPluginAppKey:protobase-app":!0})}catch{}})();import{o as e}from"./rolldown-runtime-DFwUHQ4A.js";import{i as t,t as n}from"./react-CuiNlnus.js";import{$s as r,Ba as i,Ea as a,Gc as o,Ja as s,Ko as c,So as l,Uo as u,Wa as d,Wo as f,Ya as p,ds as m}from"./app-B48LQpC1.js";import{t as h}from"./page-header-Ddz2r5ic.js";import{n as g,t as _}from"./use-paged-search-CI7t7XI0.js";var v=e(t(),1),y=e(n(),1),b=({organization:e,current:t,busy:n,onOpen:i})=>(0,y.jsxs)(`li`,{className:`flex items-center gap-3 px-3 py-2.5`,children:[(0,y.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[(0,y.jsx)(`span`,{className:`block truncate font-medium`,children:e.name}),(0,y.jsx)(`span`,{className:`block text-xs text-muted-foreground`,children:e.slug})]}),t?(0,y.jsx)(c,{tone:`green`,children:p(`current`)}):(0,y.jsx)(r,{size:`sm`,loading:n,onClick:i,children:p(`open`)})]}),x=({basePath:e,currentId:t})=>{let{session:n}=m(),[r,i]=(0,v.useState)(``),o=(0,v.useCallback)((e,t)=>n.organizations.search(e,t).then(e=>({items:e.organizations,total:e.total})),[n]),s=_(o,r),{busy:c,error:l,run:u}=d();return(0,y.jsx)(g,{title:p(`allOrganizations`),description:p(`allOrganizationsDescription`),searchLabel:p(`findOrganization`),placeholder:p(`nameOrSlug`),query:r,onQuery:i,list:s,error:l,renderRow:r=>(0,y.jsx)(b,{organization:r,current:r.id===t,busy:c,onOpen:()=>void u(async()=>{await n.organizations.switchTo(r.id),a(e)})},r.id)})},S=e=>e.normalize(`NFKD`).replace(/[̀-ͯ]/g,``).toLowerCase().replace(/[^a-z0-9]+/g,`-`).replace(/^-+|-+$/g,``).slice(0,63),C=({basePath:e})=>{let{session:t}=m(),[n,i]=(0,v.useState)(``),[o,s]=(0,v.useState)(),{busy:c,error:h,run:g}=d(),_=()=>g(async()=>{await t.organizations.create({name:n.trim(),slug:o??S(n)}),a(e)});return(0,y.jsxs)(u,{title:p(`newOrganization`),description:p(`newOrganizationDescription`),children:[(0,y.jsx)(f,{message:h}),(0,y.jsxs)(`form`,{className:`flex flex-col gap-2 sm:flex-row`,onSubmit:e=>{e.preventDefault(),_()},children:[(0,y.jsx)(l,{"aria-label":p(`name`),placeholder:p(`name`),value:n,onChange:e=>i(e.target.value),wrapperClassName:`flex-1`}),(0,y.jsx)(l,{"aria-label":p(`slug`),placeholder:`slug`,value:o??S(n),onChange:e=>s(e.target.value),wrapperClassName:`sm:w-48`}),(0,y.jsx)(r,{type:`submit`,variant:`primary`,loading:c,disabled:!n.trim(),children:p(`create`)})]})]})},w=({basePath:e})=>{let{session:t,organizations:n}=m(),[i,c]=(0,v.useState)([]),{busy:l,error:h,run:g}=d();if((0,v.useEffect)(()=>{t.organizations.myInvitations().then(c,()=>c([]))},[t]),i.length===0)return null;let _=n?.roles??[],b=n=>g(async()=>{await t.organizations.acceptMine(n),a(e)});return(0,y.jsxs)(u,{title:p(`invitationsForYou`),description:p(`invitationsForYouDescription`),children:[(0,y.jsx)(f,{message:h}),(0,y.jsx)(`ul`,{className:`divide-y rounded-md border`,children:i.map(e=>(0,y.jsxs)(`li`,{className:`flex items-center gap-3 px-3 py-2.5`,children:[(0,y.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[(0,y.jsx)(`span`,{className:`font-medium`,children:e.organizationName??p(`anOrganization`)}),`: `,e.appRoles.map(e=>s(_,e)).join(`, `)||p(`noAppRoles`),(0,y.jsx)(`span`,{className:`block text-xs text-muted-foreground`,children:p(`until`,{date:new Date(e.expiresAt).toLocaleDateString(o())})})]}),(0,y.jsx)(r,{size:`sm`,variant:`primary`,loading:l,onClick:()=>void b(e.id),children:p(`accept`)})]},e.id))})]})},T=({state:e,basePath:t})=>{let{session:n,organizations:r,state:o}=m(),{busy:s,error:c,run:l}=d(),g=o.kind===`signed-in`?o.user:void 0,_=r?.create===`everyone`||g!==void 0&&i(g),v=e.current?.organization?.id;return(0,y.jsxs)(`div`,{className:`mx-auto flex w-full max-w-3xl flex-col gap-4 px-4 py-6 md:px-6`,children:[(0,y.jsx)(h,{title:p(`organizations`),subtitle:p(`organizationsSubtitle`)}),(0,y.jsxs)(u,{title:p(`yourOrganizations`),description:e.organizations.length>0?p(`memberOf`):p(`notMember`),children:[(0,y.jsx)(f,{message:c??e.error}),e.organizations.length>0&&(0,y.jsx)(`ul`,{className:`divide-y rounded-md border`,children:e.organizations.map(e=>(0,y.jsx)(b,{organization:e,current:e.id===v,busy:s,onOpen:()=>void l(async()=>{await n.organizations.switchTo(e.id),a(t)})},e.id))})]}),(0,y.jsx)(w,{basePath:t}),_&&(0,y.jsx)(C,{basePath:t}),(e.current?.globalRoles.length??0)>0&&(0,y.jsx)(x,{basePath:t,currentId:v})]})};export{T as OrganizationsPage};
|
|
2
|
-
//# debugId=9ee8dc25-ed70-42f6-b2df-0177c2af6f82
|