@dxos/plugin-space 0.9.1-main.c7dcc2e112 → 0.9.1-staging.ee54ba693a
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/lib/neutral/{CreateObjectDialog-4VMOUKM7.mjs → CreateObjectDialog-5454N3FJ.mjs} +22 -7
- package/dist/lib/neutral/CreateObjectDialog-5454N3FJ.mjs.map +7 -0
- package/dist/lib/neutral/DefaultProperties-5SAWQC6I.mjs +58 -0
- package/dist/lib/neutral/DefaultProperties-5SAWQC6I.mjs.map +7 -0
- package/dist/lib/neutral/{JoinDialog-QZGNRJ4P.mjs → JoinDialog-ATNUCNL2.mjs} +7 -31
- package/dist/lib/neutral/JoinDialog-ATNUCNL2.mjs.map +7 -0
- package/dist/lib/neutral/{MembersContainer-OWCAMBKS.mjs → MembersContainer-C4ZTP6ZW.mjs} +9 -5
- package/dist/lib/neutral/MembersContainer-C4ZTP6ZW.mjs.map +7 -0
- package/dist/lib/neutral/{MenuFooter-QCNFUIAO.mjs → MenuFooter-FWE5LFM4.mjs} +3 -3
- package/dist/lib/neutral/{RelatedArticle-YRCRBIYU.mjs → RelatedArticle-Z777WVDW.mjs} +1 -2
- package/dist/lib/neutral/RelatedArticle-Z777WVDW.mjs.map +7 -0
- package/dist/lib/neutral/{RenamePopover-XBZAKNM7.mjs → RenamePopover-AZT2KPOF.mjs} +13 -5
- package/dist/lib/neutral/RenamePopover-AZT2KPOF.mjs.map +7 -0
- package/dist/lib/neutral/{SchemaContainer-2NK5YB5O.mjs → SchemaContainer-4GJKQBXM.mjs} +8 -4
- package/dist/lib/neutral/SchemaContainer-4GJKQBXM.mjs.map +7 -0
- package/dist/lib/neutral/{SmallPresenceLive-L4H7WJOA.mjs → SmallPresenceLive-FW3AMEY5.mjs} +2 -2
- package/dist/lib/neutral/{SpaceHomeArticle-ZV7EERLS.mjs → SpaceHomeArticle-Y47TLZ72.mjs} +2 -2
- package/dist/lib/neutral/{SpaceHomeArticle-ZV7EERLS.mjs.map → SpaceHomeArticle-Y47TLZ72.mjs.map} +1 -1
- package/dist/lib/neutral/{SpaceHomeRecent-ZR4LIIUD.mjs → SpaceHomeRecent-S57AO3EV.mjs} +11 -5
- package/dist/lib/neutral/{SpaceHomeRecent-ZR4LIIUD.mjs.map → SpaceHomeRecent-S57AO3EV.mjs.map} +3 -3
- package/dist/lib/neutral/SpacePlugin.mjs +1 -1
- package/dist/lib/neutral/{SpacePresence-PDTEDHDE.mjs → SpacePresence-T37WH43Y.mjs} +2 -2
- package/dist/lib/neutral/SpaceSettings-6CZF7GEO.mjs +60 -0
- package/dist/lib/neutral/SpaceSettings-6CZF7GEO.mjs.map +7 -0
- package/dist/lib/neutral/{SpaceSettingsContainer-QAFQ4LWC.mjs → SpaceSettingsContainer-72CJWELM.mjs} +39 -36
- package/dist/lib/neutral/SpaceSettingsContainer-72CJWELM.mjs.map +7 -0
- package/dist/lib/neutral/TypeCollectionArticle-W76ADS2G.mjs +143 -0
- package/dist/lib/neutral/TypeCollectionArticle-W76ADS2G.mjs.map +7 -0
- package/dist/lib/neutral/{add-object-S64XELC3.mjs → add-object-H2N4AOQJ.mjs} +10 -10
- package/dist/lib/neutral/add-object-H2N4AOQJ.mjs.map +7 -0
- package/dist/lib/neutral/{add-relation-GWSE42BU.mjs → add-relation-BGTLART5.mjs} +3 -3
- package/dist/lib/neutral/{add-type-C3KYE6PI.mjs → add-type-JIDLRANR.mjs} +3 -3
- package/dist/lib/neutral/{add-type-C3KYE6PI.mjs.map → add-type-JIDLRANR.mjs.map} +1 -1
- package/dist/lib/neutral/{app-graph-builder-TMAD2ZTH.mjs → app-graph-builder-7H2KOD4B.mjs} +187 -163
- package/dist/lib/neutral/app-graph-builder-7H2KOD4B.mjs.map +7 -0
- package/dist/lib/neutral/capabilities/index.mjs +9 -9
- package/dist/lib/neutral/capabilities/node.mjs +2 -2
- package/dist/lib/neutral/{chunk-PSCIOT7Q.mjs → chunk-52ASDNRA.mjs} +2 -3
- package/dist/lib/neutral/{chunk-PSCIOT7Q.mjs.map → chunk-52ASDNRA.mjs.map} +3 -3
- package/dist/lib/neutral/{chunk-2RPQHHD7.mjs → chunk-C2ULK22J.mjs} +1 -1
- package/dist/lib/neutral/{chunk-DSYEB2UN.mjs → chunk-F5KLUP2P.mjs} +7 -2
- package/dist/lib/neutral/chunk-F5KLUP2P.mjs.map +7 -0
- package/dist/lib/neutral/{chunk-F2VJ6VBV.mjs → chunk-LMUG6PEJ.mjs} +3 -4
- package/dist/lib/neutral/chunk-LMUG6PEJ.mjs.map +7 -0
- package/dist/lib/neutral/{chunk-2LTGSUGQ.mjs → chunk-RAAHDTVF.mjs} +8 -4
- package/dist/lib/neutral/chunk-RAAHDTVF.mjs.map +7 -0
- package/dist/lib/neutral/{chunk-LY6XK5MV.mjs → chunk-SPWAMXNR.mjs} +2 -2
- package/dist/lib/neutral/{chunk-LY6XK5MV.mjs.map → chunk-SPWAMXNR.mjs.map} +3 -3
- package/dist/lib/neutral/chunk-U5WTDOMV.mjs +8 -0
- package/dist/lib/neutral/chunk-V7JALUM3.mjs +9 -0
- package/dist/lib/neutral/chunk-V7JALUM3.mjs.map +7 -0
- package/dist/lib/neutral/{close-YZHFYPUN.mjs → close-5WEQZRNK.mjs} +3 -3
- package/dist/lib/neutral/components/index.mjs +18 -19
- package/dist/lib/neutral/components/index.mjs.map +4 -4
- package/dist/lib/neutral/constants.mjs +16 -0
- package/dist/lib/neutral/constants.mjs.map +7 -0
- package/dist/lib/neutral/containers/index.mjs +18 -14
- package/dist/lib/neutral/containers/index.mjs.map +3 -3
- package/dist/lib/neutral/{create-XKU2W6QC.mjs → create-QZ47FHQU.mjs} +4 -4
- package/dist/lib/neutral/{create-XKU2W6QC.mjs.map → create-QZ47FHQU.mjs.map} +3 -3
- package/dist/lib/neutral/{create-object-22WUOWZQ.mjs → create-object-ZU6FZW5X.mjs} +1 -6
- package/dist/lib/neutral/create-object-ZU6FZW5X.mjs.map +7 -0
- package/dist/lib/neutral/{delete-EFM7CAVO.mjs → delete-SPCU2VFM.mjs} +3 -3
- package/dist/lib/neutral/{delete-field-ONAPFFO5.mjs → delete-field-TAKJVEAD.mjs} +3 -3
- package/dist/lib/neutral/{duplicate-object-OJRPFV5I.mjs → duplicate-object-BUPZOO6S.mjs} +3 -3
- package/dist/lib/neutral/{export-space-M5RNVUQX.mjs → export-space-S5SCAL4M.mjs} +3 -3
- package/dist/lib/neutral/{get-share-link-FUQBJPSQ.mjs → get-share-link-CLM5IQRL.mjs} +3 -3
- package/dist/lib/neutral/{identity-created-QMV4DANW.mjs → identity-created-BEYMLBK4.mjs} +2 -2
- package/dist/lib/neutral/{identity-created-QMV4DANW.mjs.map → identity-created-BEYMLBK4.mjs.map} +3 -3
- package/dist/lib/neutral/{import-space-L3AUIARM.mjs → import-space-LJQK3KT7.mjs} +3 -3
- package/dist/lib/neutral/index.mjs +7 -3
- package/dist/lib/neutral/join-FSODYIOC.mjs +54 -0
- package/dist/lib/neutral/join-FSODYIOC.mjs.map +7 -0
- package/dist/lib/neutral/meta.json +1 -1
- package/dist/lib/neutral/{migrate-WPUISBC4.mjs → migrate-WHM6LU7L.mjs} +4 -4
- package/dist/lib/neutral/{migrate-WPUISBC4.mjs.map → migrate-WHM6LU7L.mjs.map} +3 -3
- package/dist/lib/neutral/{navigation-handler-IKXZGMII.mjs → navigation-handler-ZF7MV2HL.mjs} +16 -10
- package/dist/lib/neutral/navigation-handler-ZF7MV2HL.mjs.map +7 -0
- package/dist/lib/neutral/{navigation-resolver-VBPGMFCE.mjs → navigation-resolver-KBESOSWU.mjs} +5 -5
- package/dist/lib/neutral/navigation-resolver-KBESOSWU.mjs.map +7 -0
- package/dist/lib/neutral/{open-RRYULTSY.mjs → open-JCXTL3SK.mjs} +3 -3
- package/dist/lib/neutral/{open-create-object-BRUVFZSY.mjs → open-create-object-WAIAU7TA.mjs} +6 -6
- package/dist/lib/neutral/{open-create-space-ARLQWW65.mjs → open-create-space-VU47FWPZ.mjs} +6 -6
- package/dist/lib/neutral/{open-import-space-65H57JXX.mjs → open-import-space-GUHIEWYB.mjs} +6 -6
- package/dist/lib/neutral/{open-members-677P6KD3.mjs → open-members-MLLBHKUU.mjs} +3 -3
- package/dist/lib/neutral/{open-settings-PRBSGO6D.mjs → open-settings-DTPZF4U4.mjs} +3 -3
- package/dist/lib/neutral/operations/index.mjs +3 -3
- package/dist/lib/neutral/plugin.mjs +3 -3
- package/dist/lib/neutral/{react-surface-5EQ6X4CL.mjs → react-surface-LRA7GIFN.mjs} +33 -14
- package/dist/lib/neutral/react-surface-LRA7GIFN.mjs.map +7 -0
- package/dist/lib/neutral/{remove-objects-PWJJI36V.mjs → remove-objects-WEO66EDS.mjs} +3 -3
- package/dist/lib/neutral/{rename-4727PKI4.mjs → rename-Q6UNCBIM.mjs} +6 -6
- package/dist/lib/neutral/{rename-object-FXUAB5FN.mjs → rename-object-2UCEGU7U.mjs} +6 -6
- package/dist/lib/neutral/{restore-field-3ICSIHGA.mjs → restore-field-6CQAFOXY.mjs} +3 -3
- package/dist/lib/neutral/{restore-objects-V2BTEWN3.mjs → restore-objects-3VINLP7C.mjs} +3 -3
- package/dist/lib/neutral/{share-ZOZPAUGI.mjs → share-A4WPILNF.mjs} +3 -3
- package/dist/lib/neutral/{snapshot-ZC5PU55W.mjs → snapshot-HBYMAPA7.mjs} +3 -3
- package/dist/lib/neutral/{spaces-ready-EXPCJD4N.mjs → spaces-ready-GWMSU72V.mjs} +4 -4
- package/dist/lib/neutral/{spaces-ready-EXPCJD4N.mjs.map → spaces-ready-GWMSU72V.mjs.map} +3 -3
- package/dist/lib/neutral/testing.mjs +1 -1
- package/dist/lib/neutral/translations.mjs +14 -6
- package/dist/lib/neutral/translations.mjs.map +2 -2
- package/dist/lib/neutral/types/index.mjs +1 -1
- package/dist/lib/neutral/{wait-for-object-WURK2SLQ.mjs → wait-for-object-U6P2NNWY.mjs} +3 -3
- package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts +1 -1
- package/dist/types/src/capabilities/app-graph-builder/extensions/collections.d.ts +15 -33
- package/dist/types/src/capabilities/app-graph-builder/extensions/collections.d.ts.map +1 -1
- package/dist/types/src/capabilities/app-graph-builder/extensions/companions.d.ts.map +1 -1
- package/dist/types/src/capabilities/app-graph-builder/extensions/database.d.ts +15 -33
- package/dist/types/src/capabilities/app-graph-builder/extensions/database.d.ts.map +1 -1
- package/dist/types/src/capabilities/app-graph-builder/extensions/settings.d.ts +3 -2
- package/dist/types/src/capabilities/app-graph-builder/extensions/settings.d.ts.map +1 -1
- package/dist/types/src/capabilities/app-graph-builder/extensions/shared.d.ts +1 -4
- package/dist/types/src/capabilities/app-graph-builder/extensions/shared.d.ts.map +1 -1
- package/dist/types/src/capabilities/app-graph-builder/extensions/spaces.d.ts +17 -4
- package/dist/types/src/capabilities/app-graph-builder/extensions/spaces.d.ts.map +1 -1
- package/dist/types/src/capabilities/create-object.d.ts +1 -33
- package/dist/types/src/capabilities/create-object.d.ts.map +1 -1
- package/dist/types/src/capabilities/navigation-handler/navigation-handler.d.ts +1 -2
- package/dist/types/src/capabilities/navigation-handler/navigation-handler.d.ts.map +1 -1
- package/dist/types/src/capabilities/navigation-resolver.d.ts +1 -2
- package/dist/types/src/capabilities/navigation-resolver.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-root.d.ts +1 -5
- package/dist/types/src/capabilities/react-root.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
- package/dist/types/src/capabilities/repair.d.ts +1 -2
- package/dist/types/src/capabilities/repair.d.ts.map +1 -1
- package/dist/types/src/capabilities/settings.d.ts +1 -3
- package/dist/types/src/capabilities/settings.d.ts.map +1 -1
- package/dist/types/src/capabilities/spaces-ready.d.ts +1 -1
- package/dist/types/src/capabilities/state.d.ts +1 -13
- package/dist/types/src/capabilities/state.d.ts.map +1 -1
- package/dist/types/src/capabilities/undo-mappings.d.ts +2 -3
- package/dist/types/src/capabilities/undo-mappings.d.ts.map +1 -1
- package/dist/types/src/components/ForeignKeys/ForeignKeys.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts +2 -2
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/containers/CreateObjectDialog/CreateObjectDialog.d.ts.map +1 -1
- package/dist/types/src/containers/CreateObjectDialog/CreateObjectDialog.stories.d.ts +122 -52
- package/dist/types/src/containers/CreateObjectDialog/CreateObjectDialog.stories.d.ts.map +1 -1
- package/dist/types/src/containers/CreateSpaceDialog/CreateSpaceDialog.stories.d.ts +122 -52
- package/dist/types/src/containers/CreateSpaceDialog/CreateSpaceDialog.stories.d.ts.map +1 -1
- package/dist/types/src/containers/DefaultProperties/DefaultProperties.d.ts +15 -0
- package/dist/types/src/containers/DefaultProperties/DefaultProperties.d.ts.map +1 -0
- package/dist/types/src/containers/DefaultProperties/index.d.ts +2 -0
- package/dist/types/src/containers/DefaultProperties/index.d.ts.map +1 -0
- package/dist/types/src/containers/JoinDialog/JoinDialog.d.ts.map +1 -1
- package/dist/types/src/containers/JoinDialog/JoinDialog.stories.d.ts +122 -52
- package/dist/types/src/containers/JoinDialog/JoinDialog.stories.d.ts.map +1 -1
- package/dist/types/src/containers/MembersContainer/MembersContainer.d.ts.map +1 -1
- package/dist/types/src/containers/RelatedArticle/RelatedArticle.d.ts.map +1 -1
- package/dist/types/src/containers/RenamePopover/RenamePopover.d.ts +5 -1
- package/dist/types/src/containers/RenamePopover/RenamePopover.d.ts.map +1 -1
- package/dist/types/src/containers/RenamePopover/index.d.ts +1 -1
- package/dist/types/src/containers/RenamePopover/index.d.ts.map +1 -1
- package/dist/types/src/containers/SchemaContainer/SchemaContainer.d.ts.map +1 -1
- package/dist/types/src/containers/SpaceHomeRecent/SpaceHomeRecent.d.ts.map +1 -1
- package/dist/types/src/containers/SpacePresence/SpacePresence.d.ts.map +1 -1
- package/dist/types/src/containers/SpacePresence/SpacePresence.stories.d.ts +122 -52
- package/dist/types/src/containers/SpacePresence/SpacePresence.stories.d.ts.map +1 -1
- package/dist/types/src/containers/SpacePresence/index.d.ts +1 -1
- package/dist/types/src/containers/SpacePresence/index.d.ts.map +1 -1
- package/dist/types/src/containers/SpaceSettings/SpaceSettings.d.ts +11 -0
- package/dist/types/src/containers/SpaceSettings/SpaceSettings.d.ts.map +1 -0
- package/dist/types/src/{components → containers}/SpaceSettings/SpaceSettings.stories.d.ts +123 -53
- package/dist/types/src/{components → containers}/SpaceSettings/SpaceSettings.stories.d.ts.map +1 -1
- package/dist/types/src/{components → containers}/SpaceSettings/index.d.ts.map +1 -1
- package/dist/types/src/containers/SpaceSettingsContainer/SpaceSettingsContainer.stories.d.ts +122 -52
- package/dist/types/src/containers/SpaceSettingsContainer/SpaceSettingsContainer.stories.d.ts.map +1 -1
- package/dist/types/src/containers/SyncStatus/SyncStatus.stories.d.ts +122 -52
- package/dist/types/src/containers/SyncStatus/SyncStatus.stories.d.ts.map +1 -1
- package/dist/types/src/containers/TypeCollectionArticle/TypeCollectionArticle.d.ts +16 -0
- package/dist/types/src/containers/TypeCollectionArticle/TypeCollectionArticle.d.ts.map +1 -0
- package/dist/types/src/containers/TypeCollectionArticle/TypeCollectionArticle.stories.d.ts +21 -0
- package/dist/types/src/containers/TypeCollectionArticle/TypeCollectionArticle.stories.d.ts.map +1 -0
- package/dist/types/src/containers/TypeCollectionArticle/index.d.ts +2 -0
- package/dist/types/src/containers/TypeCollectionArticle/index.d.ts.map +1 -0
- package/dist/types/src/containers/index.d.ts +4 -1
- package/dist/types/src/containers/index.d.ts.map +1 -1
- package/dist/types/src/errors.d.ts +33 -0
- package/dist/types/src/errors.d.ts.map +1 -0
- package/dist/types/src/index.d.ts +1 -0
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts +4 -0
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/operations/definitions.d.ts +9 -37
- package/dist/types/src/operations/definitions.d.ts.map +1 -1
- package/dist/types/src/operations/join.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +122 -52
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/Settings.d.ts +3 -1
- package/dist/types/src/types/Settings.d.ts.map +1 -1
- package/dist/types/src/types/capabilities.d.ts +1 -1
- package/dist/types/src/types/capabilities.d.ts.map +1 -1
- package/dist/types/src/util.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +70 -59
- package/src/SpacePlugin.ts +3 -3
- package/src/capabilities/app-graph-builder/extensions/collections.ts +45 -52
- package/src/capabilities/app-graph-builder/extensions/companions.ts +3 -2
- package/src/capabilities/app-graph-builder/extensions/database.ts +108 -84
- package/src/capabilities/app-graph-builder/extensions/settings.ts +8 -5
- package/src/capabilities/app-graph-builder/extensions/shared.test.ts +13 -9
- package/src/capabilities/app-graph-builder/extensions/shared.ts +2 -5
- package/src/capabilities/app-graph-builder/extensions/spaces.ts +32 -6
- package/src/capabilities/create-object.ts +0 -5
- package/src/capabilities/identity-created.ts +1 -1
- package/src/capabilities/navigation-handler/navigation-handler.ts +14 -4
- package/src/capabilities/navigation-resolver.ts +8 -8
- package/src/capabilities/react-surface.tsx +39 -13
- package/src/capabilities/spaces-ready.ts +1 -1
- package/src/components/ForeignKeys/ForeignKeys.tsx +20 -19
- package/src/components/index.ts +3 -3
- package/src/containers/CreateObjectDialog/CreateObjectDialog.stories.tsx +1 -1
- package/src/containers/CreateObjectDialog/CreateObjectDialog.tsx +38 -3
- package/src/containers/DefaultProperties/DefaultProperties.tsx +69 -0
- package/src/containers/DefaultProperties/index.ts +5 -0
- package/src/containers/JoinDialog/JoinDialog.tsx +8 -21
- package/src/containers/MembersContainer/MembersContainer.tsx +37 -33
- package/src/containers/RelatedArticle/RelatedArticle.tsx +1 -2
- package/src/containers/RenamePopover/RenamePopover.tsx +18 -5
- package/src/containers/RenamePopover/index.ts +1 -1
- package/src/containers/SchemaContainer/SchemaContainer.tsx +21 -17
- package/src/containers/SpaceHomeArticle/SpaceHomeArticle.tsx +1 -1
- package/src/containers/SpaceHomeRecent/SpaceHomeRecent.tsx +12 -10
- package/src/containers/SpacePresence/SpacePresence.tsx +22 -20
- package/src/containers/SpacePresence/index.ts +1 -1
- package/src/{components → containers}/SpaceSettings/SpaceSettings.stories.tsx +1 -1
- package/src/containers/SpaceSettings/SpaceSettings.tsx +75 -0
- package/src/containers/SpaceSettingsContainer/SpaceSettingsContainer.tsx +115 -106
- package/src/containers/TypeCollectionArticle/TypeCollectionArticle.stories.tsx +116 -0
- package/src/containers/TypeCollectionArticle/TypeCollectionArticle.tsx +162 -0
- package/src/containers/TypeCollectionArticle/index.ts +5 -0
- package/src/containers/index.ts +4 -1
- package/src/errors.ts +11 -0
- package/src/index.ts +1 -0
- package/src/operations/add-object.ts +6 -5
- package/src/operations/add-type.ts +1 -1
- package/src/operations/create.ts +2 -2
- package/src/operations/definitions.ts +1 -2
- package/src/operations/join.ts +19 -0
- package/src/operations/migrate.ts +1 -1
- package/src/translations.ts +15 -6
- package/src/types/Settings.ts +10 -1
- package/src/types/capabilities.ts +1 -1
- package/src/util.ts +0 -1
- package/dist/lib/neutral/CreateObjectDialog-4VMOUKM7.mjs.map +0 -7
- package/dist/lib/neutral/JoinDialog-QZGNRJ4P.mjs.map +0 -7
- package/dist/lib/neutral/MembersContainer-OWCAMBKS.mjs.map +0 -7
- package/dist/lib/neutral/ObjectProperties-BF6KGFFC.mjs +0 -33
- package/dist/lib/neutral/ObjectProperties-BF6KGFFC.mjs.map +0 -7
- package/dist/lib/neutral/RelatedArticle-YRCRBIYU.mjs.map +0 -7
- package/dist/lib/neutral/RenamePopover-XBZAKNM7.mjs.map +0 -7
- package/dist/lib/neutral/SchemaContainer-2NK5YB5O.mjs.map +0 -7
- package/dist/lib/neutral/SpaceSettings-IVTCSLNT.mjs +0 -37
- package/dist/lib/neutral/SpaceSettings-IVTCSLNT.mjs.map +0 -7
- package/dist/lib/neutral/SpaceSettingsContainer-QAFQ4LWC.mjs.map +0 -7
- package/dist/lib/neutral/add-object-S64XELC3.mjs.map +0 -7
- package/dist/lib/neutral/app-graph-builder-TMAD2ZTH.mjs.map +0 -7
- package/dist/lib/neutral/chunk-2LTGSUGQ.mjs.map +0 -7
- package/dist/lib/neutral/chunk-DSYEB2UN.mjs.map +0 -7
- package/dist/lib/neutral/chunk-F2VJ6VBV.mjs.map +0 -7
- package/dist/lib/neutral/chunk-I5JXVBXX.mjs +0 -8
- package/dist/lib/neutral/create-object-22WUOWZQ.mjs.map +0 -7
- package/dist/lib/neutral/join-VY3QYBU7.mjs +0 -28
- package/dist/lib/neutral/join-VY3QYBU7.mjs.map +0 -7
- package/dist/lib/neutral/navigation-handler-IKXZGMII.mjs.map +0 -7
- package/dist/lib/neutral/navigation-resolver-VBPGMFCE.mjs.map +0 -7
- package/dist/lib/neutral/react-surface-5EQ6X4CL.mjs.map +0 -7
- package/dist/types/src/components/SpaceSettings/SpaceSettings.d.ts +0 -8
- package/dist/types/src/components/SpaceSettings/SpaceSettings.d.ts.map +0 -1
- package/dist/types/src/containers/ObjectProperties/ObjectProperties.d.ts +0 -10
- package/dist/types/src/containers/ObjectProperties/ObjectProperties.d.ts.map +0 -1
- package/dist/types/src/containers/ObjectProperties/index.d.ts +0 -2
- package/dist/types/src/containers/ObjectProperties/index.d.ts.map +0 -1
- package/src/components/SpaceSettings/SpaceSettings.tsx +0 -56
- package/src/containers/ObjectProperties/ObjectProperties.tsx +0 -32
- package/src/containers/ObjectProperties/index.ts +0 -5
- /package/dist/lib/neutral/{MenuFooter-QCNFUIAO.mjs.map → MenuFooter-FWE5LFM4.mjs.map} +0 -0
- /package/dist/lib/neutral/{SmallPresenceLive-L4H7WJOA.mjs.map → SmallPresenceLive-FW3AMEY5.mjs.map} +0 -0
- /package/dist/lib/neutral/{SpacePresence-PDTEDHDE.mjs.map → SpacePresence-T37WH43Y.mjs.map} +0 -0
- /package/dist/lib/neutral/{add-relation-GWSE42BU.mjs.map → add-relation-BGTLART5.mjs.map} +0 -0
- /package/dist/lib/neutral/{chunk-2RPQHHD7.mjs.map → chunk-C2ULK22J.mjs.map} +0 -0
- /package/dist/lib/neutral/{chunk-I5JXVBXX.mjs.map → chunk-U5WTDOMV.mjs.map} +0 -0
- /package/dist/lib/neutral/{close-YZHFYPUN.mjs.map → close-5WEQZRNK.mjs.map} +0 -0
- /package/dist/lib/neutral/{delete-EFM7CAVO.mjs.map → delete-SPCU2VFM.mjs.map} +0 -0
- /package/dist/lib/neutral/{delete-field-ONAPFFO5.mjs.map → delete-field-TAKJVEAD.mjs.map} +0 -0
- /package/dist/lib/neutral/{duplicate-object-OJRPFV5I.mjs.map → duplicate-object-BUPZOO6S.mjs.map} +0 -0
- /package/dist/lib/neutral/{export-space-M5RNVUQX.mjs.map → export-space-S5SCAL4M.mjs.map} +0 -0
- /package/dist/lib/neutral/{get-share-link-FUQBJPSQ.mjs.map → get-share-link-CLM5IQRL.mjs.map} +0 -0
- /package/dist/lib/neutral/{import-space-L3AUIARM.mjs.map → import-space-LJQK3KT7.mjs.map} +0 -0
- /package/dist/lib/neutral/{open-RRYULTSY.mjs.map → open-JCXTL3SK.mjs.map} +0 -0
- /package/dist/lib/neutral/{open-create-object-BRUVFZSY.mjs.map → open-create-object-WAIAU7TA.mjs.map} +0 -0
- /package/dist/lib/neutral/{open-create-space-ARLQWW65.mjs.map → open-create-space-VU47FWPZ.mjs.map} +0 -0
- /package/dist/lib/neutral/{open-import-space-65H57JXX.mjs.map → open-import-space-GUHIEWYB.mjs.map} +0 -0
- /package/dist/lib/neutral/{open-members-677P6KD3.mjs.map → open-members-MLLBHKUU.mjs.map} +0 -0
- /package/dist/lib/neutral/{open-settings-PRBSGO6D.mjs.map → open-settings-DTPZF4U4.mjs.map} +0 -0
- /package/dist/lib/neutral/{remove-objects-PWJJI36V.mjs.map → remove-objects-WEO66EDS.mjs.map} +0 -0
- /package/dist/lib/neutral/{rename-4727PKI4.mjs.map → rename-Q6UNCBIM.mjs.map} +0 -0
- /package/dist/lib/neutral/{rename-object-FXUAB5FN.mjs.map → rename-object-2UCEGU7U.mjs.map} +0 -0
- /package/dist/lib/neutral/{restore-field-3ICSIHGA.mjs.map → restore-field-6CQAFOXY.mjs.map} +0 -0
- /package/dist/lib/neutral/{restore-objects-V2BTEWN3.mjs.map → restore-objects-3VINLP7C.mjs.map} +0 -0
- /package/dist/lib/neutral/{share-ZOZPAUGI.mjs.map → share-A4WPILNF.mjs.map} +0 -0
- /package/dist/lib/neutral/{snapshot-ZC5PU55W.mjs.map → snapshot-HBYMAPA7.mjs.map} +0 -0
- /package/dist/lib/neutral/{wait-for-object-WURK2SLQ.mjs.map → wait-for-object-U6P2NNWY.mjs.map} +0 -0
- /package/dist/types/src/{components → containers}/SpaceSettings/index.d.ts +0 -0
- /package/src/{components → containers}/SpaceSettings/index.ts +0 -0
|
@@ -7,40 +7,43 @@ import * as Option from 'effect/Option';
|
|
|
7
7
|
import React, { type ComponentProps, useCallback } from 'react';
|
|
8
8
|
|
|
9
9
|
import { Capabilities, Capability } from '@dxos/app-framework';
|
|
10
|
-
import { Surface, useAtomCapability, useOperationInvoker } from '@dxos/app-framework/ui';
|
|
10
|
+
import { Surface, useAtomCapability, useOperationInvoker, useSettingsState } from '@dxos/app-framework/ui';
|
|
11
11
|
import { AppAnnotation } from '@dxos/app-toolkit';
|
|
12
12
|
import { AppSurface, useActiveSpace, useTypeOptions } from '@dxos/app-toolkit/ui';
|
|
13
|
-
import { Annotation, Collection, Database,
|
|
13
|
+
import { Annotation, Collection, Database, Obj, Type } from '@dxos/echo';
|
|
14
14
|
import { SchemaEx } from '@dxos/effect';
|
|
15
15
|
import { type Space, SpaceState, getSpace, isSpace, useSpaces } from '@dxos/react-client/echo';
|
|
16
16
|
import { Input } from '@dxos/react-ui';
|
|
17
17
|
import { type FormFieldRendererProps, SelectField } from '@dxos/react-ui-form';
|
|
18
18
|
import { HuePicker, IconPicker } from '@dxos/react-ui-pickers';
|
|
19
19
|
import { ViewAnnotation } from '@dxos/schema';
|
|
20
|
+
import { Position } from '@dxos/util';
|
|
20
21
|
|
|
21
|
-
import { SpaceSettings } from '#components';
|
|
22
22
|
import {
|
|
23
23
|
CollectionArticle,
|
|
24
24
|
CollectionSection,
|
|
25
25
|
CreateObjectDialog,
|
|
26
26
|
CreateSpaceDialog,
|
|
27
|
+
DefaultProperties,
|
|
27
28
|
ImportSpaceDialog,
|
|
28
29
|
InlineSyncStatus,
|
|
29
30
|
JoinDialog,
|
|
30
31
|
MembersContainer,
|
|
31
32
|
MenuFooter,
|
|
32
33
|
ObjectCardStack,
|
|
33
|
-
ObjectProperties,
|
|
34
34
|
RecordArticle,
|
|
35
35
|
RelatedArticle,
|
|
36
36
|
RenamePopover,
|
|
37
|
+
type RenameSubject,
|
|
37
38
|
SchemaContainer,
|
|
38
39
|
SmallPresenceLive,
|
|
39
40
|
SpaceHomeArticle,
|
|
40
41
|
SpaceHomeRecent,
|
|
41
42
|
SpacePresence,
|
|
43
|
+
SpaceSettings,
|
|
42
44
|
SpaceSettingsContainer,
|
|
43
45
|
SyncStatus,
|
|
46
|
+
TypeCollectionArticle,
|
|
44
47
|
ViewEditor,
|
|
45
48
|
} from '#containers';
|
|
46
49
|
import { meta } from '#meta';
|
|
@@ -48,9 +51,10 @@ import { SpaceOperation } from '#operations';
|
|
|
48
51
|
import {
|
|
49
52
|
HueAnnotationId,
|
|
50
53
|
IconAnnotationId,
|
|
54
|
+
Settings,
|
|
55
|
+
SPACE_HOME_NODE_TYPE,
|
|
51
56
|
SpaceCapabilities,
|
|
52
57
|
SpaceHomeContent,
|
|
53
|
-
SPACE_HOME_NODE_TYPE,
|
|
54
58
|
type TypeInputOptions,
|
|
55
59
|
TypeInputOptionsAnnotationId,
|
|
56
60
|
} from '#types';
|
|
@@ -84,26 +88,48 @@ export default Capability.makeModule(
|
|
|
84
88
|
}),
|
|
85
89
|
Surface.create({
|
|
86
90
|
id: 'collectionFallback',
|
|
87
|
-
position:
|
|
91
|
+
position: Position.last,
|
|
88
92
|
filter: AppSurface.object(AppSurface.Article, Collection.Collection),
|
|
89
93
|
component: ({ data }) => <CollectionArticle attendableId={data.attendableId} subject={data.subject} />,
|
|
90
94
|
}),
|
|
91
95
|
Surface.create({
|
|
92
96
|
id: 'recordArticle',
|
|
93
|
-
position:
|
|
97
|
+
position: Position.last,
|
|
94
98
|
filter: AppSurface.subject(AppSurface.Article, Obj.isObject),
|
|
95
99
|
component: ({ data }) => <RecordArticle subject={data.subject} />,
|
|
96
100
|
}),
|
|
101
|
+
Surface.create({
|
|
102
|
+
id: 'typeCollection',
|
|
103
|
+
filter: AppSurface.subject(AppSurface.Article, Type.isType),
|
|
104
|
+
component: ({ data, role }) => {
|
|
105
|
+
const space = isSpace(data.properties?.space) ? data.properties.space : undefined;
|
|
106
|
+
if (!space) {
|
|
107
|
+
return null;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
return (
|
|
111
|
+
<TypeCollectionArticle
|
|
112
|
+
role={role}
|
|
113
|
+
space={space}
|
|
114
|
+
typeUri={Type.getURI(data.subject)}
|
|
115
|
+
attendableId={data.attendableId}
|
|
116
|
+
/>
|
|
117
|
+
);
|
|
118
|
+
},
|
|
119
|
+
}),
|
|
97
120
|
Surface.create({
|
|
98
121
|
id: 'pluginSettings',
|
|
99
122
|
filter: AppSurface.settings(AppSurface.Article, meta.profile.key),
|
|
100
|
-
component: () => {
|
|
123
|
+
component: ({ data: { subject } }) => {
|
|
101
124
|
const spaces = useSpaces();
|
|
102
125
|
const { invokePromise } = useOperationInvoker();
|
|
126
|
+
const { settings, updateSettings } = useSettingsState<Settings.Settings>(subject.atom);
|
|
103
127
|
return (
|
|
104
128
|
<SpaceSettings
|
|
105
129
|
spaces={spaces}
|
|
106
130
|
onOpenSpaceSettings={(space: Space) => invokePromise(SpaceOperation.OpenSettings, { space })}
|
|
131
|
+
settings={settings}
|
|
132
|
+
onSettingsChange={updateSettings}
|
|
107
133
|
/>
|
|
108
134
|
);
|
|
109
135
|
},
|
|
@@ -114,7 +140,7 @@ export default Capability.makeModule(
|
|
|
114
140
|
AppSurface.literal(AppSurface.Article, 'settings'),
|
|
115
141
|
AppSurface.companion(AppSurface.Article),
|
|
116
142
|
),
|
|
117
|
-
component: ({ ref, data, role }) => <
|
|
143
|
+
component: ({ ref, data, role }) => <DefaultProperties role={role} subject={data.companionTo} ref={ref} />,
|
|
118
144
|
}),
|
|
119
145
|
Surface.create({
|
|
120
146
|
id: 'companion.related',
|
|
@@ -138,7 +164,7 @@ export default Capability.makeModule(
|
|
|
138
164
|
}),
|
|
139
165
|
Surface.create({
|
|
140
166
|
id: 'spaceSettingsMembers',
|
|
141
|
-
position:
|
|
167
|
+
position: Position.first,
|
|
142
168
|
filter: AppSurface.literal(AppSurface.Article, `${meta.profile.key}.members`),
|
|
143
169
|
component: () => {
|
|
144
170
|
const space = useActiveSpace();
|
|
@@ -305,7 +331,7 @@ export default Capability.makeModule(
|
|
|
305
331
|
}),
|
|
306
332
|
Surface.create({
|
|
307
333
|
id: RENAME_POPOVER,
|
|
308
|
-
filter: AppSurface.component<
|
|
334
|
+
filter: AppSurface.component<RenameSubject>(AppSurface.Popover, RENAME_POPOVER),
|
|
309
335
|
component: ({ data }) => <RenamePopover subject={data.props} />,
|
|
310
336
|
}),
|
|
311
337
|
Surface.create({
|
|
@@ -324,7 +350,7 @@ export default Capability.makeModule(
|
|
|
324
350
|
// TODO(wittjosiah): Attention glyph for non-echo items should be handled elsewhere.
|
|
325
351
|
Surface.create({
|
|
326
352
|
id: 'navtreePresenceFallback',
|
|
327
|
-
position:
|
|
353
|
+
position: Position.last,
|
|
328
354
|
filter: Surface.makeFilter(AppSurface.NavtreeItemEnd),
|
|
329
355
|
component: ({ data }) => <SmallPresenceLive id={data.id} open={data.open} />,
|
|
330
356
|
}),
|
|
@@ -336,7 +362,7 @@ export default Capability.makeModule(
|
|
|
336
362
|
}),
|
|
337
363
|
Surface.create({
|
|
338
364
|
id: 'navbarPresence',
|
|
339
|
-
position:
|
|
365
|
+
position: Position.first,
|
|
340
366
|
filter: AppSurface.subject(
|
|
341
367
|
AppSurface.NavbarEnd,
|
|
342
368
|
(value): value is Space | Obj.Unknown => isSpace(value) || Obj.isObject(value),
|
|
@@ -12,7 +12,7 @@ import { SubscriptionList } from '@dxos/async';
|
|
|
12
12
|
import { Annotation, Collection, Filter, Obj, Type } from '@dxos/echo';
|
|
13
13
|
import { SPACE_ID_LENGTH, parseId } from '@dxos/keys';
|
|
14
14
|
import { log } from '@dxos/log';
|
|
15
|
-
import {
|
|
15
|
+
import { Migrations, MigrationVersionAnnotation } from '@dxos/migrations';
|
|
16
16
|
import { AttentionCapabilities } from '@dxos/plugin-attention';
|
|
17
17
|
import { ClientCapabilities } from '@dxos/plugin-client';
|
|
18
18
|
import { Graph } from '@dxos/plugin-graph';
|
|
@@ -5,7 +5,8 @@
|
|
|
5
5
|
import React, { useCallback } from 'react';
|
|
6
6
|
|
|
7
7
|
import { type Key } from '@dxos/echo';
|
|
8
|
-
import { IconButton,
|
|
8
|
+
import { IconButton, useTranslation } from '@dxos/react-ui';
|
|
9
|
+
import { Listbox } from '@dxos/react-ui-list';
|
|
9
10
|
|
|
10
11
|
import { meta } from '#meta';
|
|
11
12
|
|
|
@@ -17,11 +18,13 @@ export type ForeignKeysProps = {
|
|
|
17
18
|
// TODO(wittjosiah): This is a clone of `TokenManager`. Consider a form variant for arrays of read-only objects.
|
|
18
19
|
export const ForeignKeys = ({ keys, onDelete }: ForeignKeysProps) => {
|
|
19
20
|
return (
|
|
20
|
-
<
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
21
|
+
<Listbox.Root>
|
|
22
|
+
<Listbox.Content classNames='gap-2'>
|
|
23
|
+
{keys.map((key) => (
|
|
24
|
+
<KeyItem key={key.id} forignKey={key} onDelete={onDelete} />
|
|
25
|
+
))}
|
|
26
|
+
</Listbox.Content>
|
|
27
|
+
</Listbox.Root>
|
|
25
28
|
);
|
|
26
29
|
};
|
|
27
30
|
|
|
@@ -38,20 +41,18 @@ const KeyItem = ({ forignKey, onDelete }: KeyItemProps) => {
|
|
|
38
41
|
}, [forignKey, onDelete]);
|
|
39
42
|
|
|
40
43
|
return (
|
|
41
|
-
<
|
|
42
|
-
<
|
|
44
|
+
<Listbox.Item id={forignKey.id} classNames='px-2 gap-2'>
|
|
45
|
+
<div className='flex flex-col grow truncate'>
|
|
43
46
|
<div>{forignKey.source}</div>
|
|
44
47
|
<div className='text-description text-sm truncate'>{forignKey.id}</div>
|
|
45
|
-
</
|
|
46
|
-
<
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
</ListItem.Endcap>
|
|
55
|
-
</ListItem.Root>
|
|
48
|
+
</div>
|
|
49
|
+
<IconButton
|
|
50
|
+
iconOnly
|
|
51
|
+
icon='ph--x--regular'
|
|
52
|
+
variant='ghost'
|
|
53
|
+
label={t('delete-key.button')}
|
|
54
|
+
onClick={handleDelete}
|
|
55
|
+
/>
|
|
56
|
+
</Listbox.Item>
|
|
56
57
|
);
|
|
57
58
|
};
|
package/src/components/index.ts
CHANGED
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
// Copyright 2023 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import { type ComponentType, lazy } from 'react';
|
|
6
|
-
|
|
7
5
|
export * from './AwaitingObject';
|
|
8
6
|
export * from './CreateObjectPanel';
|
|
9
7
|
export * from './ForeignKeys';
|
|
10
8
|
export * from './SyncStatus';
|
|
11
9
|
|
|
12
|
-
|
|
10
|
+
// TODO(wittjosiah): Remove.
|
|
11
|
+
export { RENAME_POPOVER } from '../constants';
|
|
12
|
+
export type { RenameCallback, RenameSubject } from '../containers/RenamePopover';
|
|
@@ -13,7 +13,7 @@ import { type Space } from '@dxos/react-client/echo';
|
|
|
13
13
|
import { Dialog } from '@dxos/react-ui';
|
|
14
14
|
import { withLayout, withTheme } from '@dxos/react-ui/testing';
|
|
15
15
|
|
|
16
|
-
import { type CreateObjectOption, type Metadata
|
|
16
|
+
import { type CreateObjectOption, CreateObjectPanel, type Metadata } from '#components';
|
|
17
17
|
import { translations } from '#translations';
|
|
18
18
|
|
|
19
19
|
const mockOptions: CreateObjectOption[] = [
|
|
@@ -18,7 +18,7 @@ import { invariant } from '@dxos/invariant';
|
|
|
18
18
|
import { useClient } from '@dxos/react-client';
|
|
19
19
|
import { useQuery, useSpaces } from '@dxos/react-client/echo';
|
|
20
20
|
import { Dialog, toLocalizedString, useTranslation } from '@dxos/react-ui';
|
|
21
|
-
import { ViewAnnotation } from '@dxos/schema';
|
|
21
|
+
import { CollectionItemAnnotation, ViewAnnotation } from '@dxos/schema';
|
|
22
22
|
|
|
23
23
|
import { makeCreateObjectEntryForDatabaseType } from '#capabilities';
|
|
24
24
|
import { type CreateObjectOption, CreateObjectPanel, type CreateObjectPanelProps } from '#components';
|
|
@@ -126,10 +126,35 @@ export const CreateObjectDialog = ({
|
|
|
126
126
|
return set;
|
|
127
127
|
}, [typeByTypename]);
|
|
128
128
|
|
|
129
|
+
// Types eligible to live inside a collection: collections themselves, plus types carrying
|
|
130
|
+
// CollectionItemAnnotation. Used to filter the create dialog when targeting a collection.
|
|
131
|
+
const collectionItemTypenames = useMemo(() => {
|
|
132
|
+
const set = new Set<string>();
|
|
133
|
+
const collectionTypename = Type.getTypename(Collection.Collection);
|
|
134
|
+
for (const [name, type] of typeByTypename) {
|
|
135
|
+
if (
|
|
136
|
+
name === collectionTypename ||
|
|
137
|
+
CollectionItemAnnotation.get(Type.getSchema(type)).pipe(Option.getOrElse(() => false))
|
|
138
|
+
) {
|
|
139
|
+
set.add(name);
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
return set;
|
|
143
|
+
}, [typeByTypename]);
|
|
144
|
+
|
|
145
|
+
// When creating into a collection, offer only collection-eligible types (mirrors the `views` filter).
|
|
146
|
+
const collectionTarget = Collection.isCollection(target);
|
|
147
|
+
|
|
129
148
|
const options = useMemo<CreateObjectOption[]>(
|
|
130
149
|
() =>
|
|
131
150
|
createObjectEntries
|
|
132
|
-
.filter((entry) =>
|
|
151
|
+
.filter((entry) =>
|
|
152
|
+
views === true
|
|
153
|
+
? viewTypenames.has(entry.id)
|
|
154
|
+
: collectionTarget
|
|
155
|
+
? collectionItemTypenames.has(entry.id)
|
|
156
|
+
: true,
|
|
157
|
+
)
|
|
133
158
|
.map((entry) => {
|
|
134
159
|
const type = typeByTypename.get(entry.id);
|
|
135
160
|
const schema = type && Type.getSchema(type);
|
|
@@ -146,7 +171,17 @@ export const CreateObjectDialog = ({
|
|
|
146
171
|
description: isDatabase ? spaceLabel : undefined,
|
|
147
172
|
};
|
|
148
173
|
}),
|
|
149
|
-
[
|
|
174
|
+
[
|
|
175
|
+
createObjectEntries,
|
|
176
|
+
views,
|
|
177
|
+
viewTypenames,
|
|
178
|
+
collectionTarget,
|
|
179
|
+
collectionItemTypenames,
|
|
180
|
+
typeByTypename,
|
|
181
|
+
t,
|
|
182
|
+
pluginNameByEntryId,
|
|
183
|
+
spaceLabel,
|
|
184
|
+
],
|
|
150
185
|
);
|
|
151
186
|
|
|
152
187
|
const handleCreateObject = useCallback<NonNullable<CreateObjectPanelProps['onCreateObject']>>(
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Effect from 'effect/Effect';
|
|
6
|
+
import React, { forwardRef, useCallback, useMemo } from 'react';
|
|
7
|
+
|
|
8
|
+
import { Capability } from '@dxos/app-framework';
|
|
9
|
+
import { Surface, useCapabilities, useOperationInvoker, usePluginManager } from '@dxos/app-framework/ui';
|
|
10
|
+
import { AppSurface } from '@dxos/app-toolkit/ui';
|
|
11
|
+
import { Operation } from '@dxos/compute';
|
|
12
|
+
import { type Database, type Obj } from '@dxos/echo';
|
|
13
|
+
import { Panel, Toolbar } from '@dxos/react-ui';
|
|
14
|
+
import { type CreateEntryOverride, ObjectProperties } from '@dxos/react-ui-form';
|
|
15
|
+
|
|
16
|
+
import { SpaceCapabilities } from '#types';
|
|
17
|
+
|
|
18
|
+
export type DefaultPropertiesProps = AppSurface.ObjectPropertiesProps<Obj.Unknown>;
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Generic object-properties companion rendered for any object: a schema-driven {@link ObjectProperties}
|
|
22
|
+
* form plus the `object-properties` surface, so plugins whose properties are plain editable fields need
|
|
23
|
+
* not register a bespoke surface (mirrors `DefaultSettings` for plugin settings).
|
|
24
|
+
*/
|
|
25
|
+
export const DefaultProperties = forwardRef<HTMLDivElement, DefaultPropertiesProps>(
|
|
26
|
+
({ role, subject: object }, forwardedRef) => {
|
|
27
|
+
const manager = usePluginManager();
|
|
28
|
+
const operationInvoker = useOperationInvoker();
|
|
29
|
+
const createEntries = useCapabilities(SpaceCapabilities.CreateObjectEntry);
|
|
30
|
+
const data = useMemo<AppSurface.ObjectPropertiesData>(() => ({ subject: object }), [object]);
|
|
31
|
+
|
|
32
|
+
const resolveCreateEntry = useCallback(
|
|
33
|
+
(typename: string): CreateEntryOverride | undefined => {
|
|
34
|
+
const entry = createEntries.find((createEntry) => createEntry.id === typename);
|
|
35
|
+
if (!entry?.inputSchema && !entry?.createObject) {
|
|
36
|
+
return undefined;
|
|
37
|
+
}
|
|
38
|
+
return {
|
|
39
|
+
inputSchema: entry.inputSchema,
|
|
40
|
+
createObject: async (values: any, db: Database.Database): Promise<Obj.Unknown> => {
|
|
41
|
+
const result = await entry
|
|
42
|
+
.createObject(values, { db, target: db })
|
|
43
|
+
.pipe(
|
|
44
|
+
Effect.provideService(Capability.Service, manager.capabilities),
|
|
45
|
+
Effect.provideService(Operation.Service, operationInvoker),
|
|
46
|
+
Effect.runPromise,
|
|
47
|
+
);
|
|
48
|
+
return result.object;
|
|
49
|
+
},
|
|
50
|
+
};
|
|
51
|
+
},
|
|
52
|
+
[createEntries, manager, operationInvoker],
|
|
53
|
+
);
|
|
54
|
+
|
|
55
|
+
return (
|
|
56
|
+
<Panel.Root role={role} ref={forwardedRef}>
|
|
57
|
+
<Panel.Toolbar>
|
|
58
|
+
<Toolbar.Root className='dx-document' />
|
|
59
|
+
</Panel.Toolbar>
|
|
60
|
+
<Panel.Content>
|
|
61
|
+
<ObjectProperties object={object} resolveCreateEntry={resolveCreateEntry}>
|
|
62
|
+
{/* TODO(burdon): Ambiguous naming since providers only replace parts; can't update Toolbar, etc. Consider DefaultSettings pattern. */}
|
|
63
|
+
<Surface.Surface type={AppSurface.ObjectProperties} data={data} />
|
|
64
|
+
</ObjectProperties>
|
|
65
|
+
</Panel.Content>
|
|
66
|
+
</Panel.Root>
|
|
67
|
+
);
|
|
68
|
+
},
|
|
69
|
+
);
|
|
@@ -6,9 +6,7 @@ import React, { useCallback } from 'react';
|
|
|
6
6
|
|
|
7
7
|
import { useOperationInvoker } from '@dxos/app-framework/ui';
|
|
8
8
|
import { LayoutOperation, Paths } from '@dxos/app-toolkit';
|
|
9
|
-
import { useAppGraph } from '@dxos/app-toolkit/ui';
|
|
10
9
|
import { Trigger } from '@dxos/async';
|
|
11
|
-
import { Graph } from '@dxos/plugin-graph';
|
|
12
10
|
import { ObservabilityOperation } from '@dxos/plugin-observability';
|
|
13
11
|
import { useClient } from '@dxos/react-client';
|
|
14
12
|
import { type Space } from '@dxos/react-client/echo';
|
|
@@ -28,7 +26,6 @@ export type JoinDialogProps = JoinPanelProps & {
|
|
|
28
26
|
export const JoinDialog = ({ navigableCollections, onDone, ...props }: JoinDialogProps) => {
|
|
29
27
|
const { invokePromise } = useOperationInvoker();
|
|
30
28
|
const client = useClient();
|
|
31
|
-
const { graph } = useAppGraph();
|
|
32
29
|
const { t } = useTranslation(meta.profile.key);
|
|
33
30
|
|
|
34
31
|
const handleDone = useCallback(
|
|
@@ -61,23 +58,13 @@ export const JoinDialog = ({ navigableCollections, onDone, ...props }: JoinDialo
|
|
|
61
58
|
space = await trigger.wait();
|
|
62
59
|
}
|
|
63
60
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
await Promise.all([
|
|
72
|
-
invokePromise(LayoutOperation.Open, { subject: [target] }),
|
|
73
|
-
invokePromise(LayoutOperation.Expose, { subject: target }),
|
|
74
|
-
]);
|
|
75
|
-
} else {
|
|
76
|
-
await invokePromise(LayoutOperation.Open, {
|
|
77
|
-
subject: [Paths.getSpaceHomePath(space.id)],
|
|
78
|
-
workspace: Paths.getSpacePath(space.id),
|
|
79
|
-
});
|
|
80
|
-
}
|
|
61
|
+
// TODO(wittjosiah): `result.target` is ignored so acceptance navigates to the space home
|
|
62
|
+
// immediately; revisit how to incorporate the target once immediate navigation is settled.
|
|
63
|
+
await invokePromise(LayoutOperation.Open, {
|
|
64
|
+
subject: [Paths.getSpaceHomePath(space.id)],
|
|
65
|
+
workspace: Paths.getSpacePath(space.id),
|
|
66
|
+
navigation: 'immediate',
|
|
67
|
+
});
|
|
81
68
|
|
|
82
69
|
onDone?.(result);
|
|
83
70
|
|
|
@@ -90,7 +77,7 @@ export const JoinDialog = ({ navigableCollections, onDone, ...props }: JoinDialo
|
|
|
90
77
|
});
|
|
91
78
|
}
|
|
92
79
|
},
|
|
93
|
-
[invokePromise, client,
|
|
80
|
+
[invokePromise, client, navigableCollections, onDone],
|
|
94
81
|
);
|
|
95
82
|
|
|
96
83
|
// TODO(burdon): Move JoinHeading into Dialog.Heading.
|
|
@@ -15,7 +15,7 @@ import { useConfig } from '@dxos/react-client';
|
|
|
15
15
|
import { useSpaceInvitations } from '@dxos/react-client/echo';
|
|
16
16
|
import { type CancellableInvitationObservable, Invitation, InvitationEncoder } from '@dxos/react-client/invitations';
|
|
17
17
|
import { Button, Clipboard, Icon, useId, useTranslation } from '@dxos/react-ui';
|
|
18
|
-
import {
|
|
18
|
+
import { Form } from '@dxos/react-ui-form';
|
|
19
19
|
import {
|
|
20
20
|
type ActionMenuItem,
|
|
21
21
|
AuthCode,
|
|
@@ -123,38 +123,42 @@ export const MembersContainer = ({ space, createInvitationUrl }: MembersContaine
|
|
|
123
123
|
|
|
124
124
|
return (
|
|
125
125
|
<Clipboard.Provider>
|
|
126
|
-
<
|
|
127
|
-
<
|
|
128
|
-
<
|
|
129
|
-
<
|
|
130
|
-
<
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
126
|
+
<Form.Root variant='settings'>
|
|
127
|
+
<Form.Viewport scroll>
|
|
128
|
+
<Form.Content>
|
|
129
|
+
<Form.Section title={t('members-verbose.label')} description={t('members.description')}>
|
|
130
|
+
<Form.Group>
|
|
131
|
+
<div role='group' className='min-w-0'>
|
|
132
|
+
<h3 className='text-lg mb-2'>{t('members.label')}</h3>
|
|
133
|
+
<SpaceMemberList spaceKey={space.key} includeSelf />
|
|
134
|
+
</div>
|
|
135
|
+
<div role='group' className='min-w-0'>
|
|
136
|
+
<h3 className='text-lg mb-2'>{t('invitations.label')}</h3>
|
|
137
|
+
{selectedInvitation && <InvitationSection {...selectedInvitation} onBack={handleBack} />}
|
|
138
|
+
{!selectedInvitation && (
|
|
139
|
+
<>
|
|
140
|
+
<p className='text-description mb-2'>{t('space-invitation.description')}</p>
|
|
141
|
+
<InvitationList
|
|
142
|
+
className='mb-2'
|
|
143
|
+
send={handleSend}
|
|
144
|
+
invitations={visibleInvitations ?? []}
|
|
145
|
+
onClickRemove={(invitation) => invitation.cancel()}
|
|
146
|
+
createInvitationUrl={createInvitationUrl}
|
|
147
|
+
/>
|
|
148
|
+
<BifurcatedAction
|
|
149
|
+
actions={inviteActions}
|
|
150
|
+
activeAction={activeAction}
|
|
151
|
+
onChangeActiveAction={setActiveAction as Dispatch<SetStateAction<string>>}
|
|
152
|
+
data-testid='membersContainer.createInvitation'
|
|
153
|
+
/>
|
|
154
|
+
</>
|
|
155
|
+
)}
|
|
156
|
+
</div>
|
|
157
|
+
</Form.Group>
|
|
158
|
+
</Form.Section>
|
|
159
|
+
</Form.Content>
|
|
160
|
+
</Form.Viewport>
|
|
161
|
+
</Form.Root>
|
|
158
162
|
</Clipboard.Provider>
|
|
159
163
|
);
|
|
160
164
|
};
|
|
@@ -14,7 +14,6 @@ import { Menu } from '@dxos/react-ui-menu';
|
|
|
14
14
|
import { useRelatedObjects } from '#hooks';
|
|
15
15
|
import { meta } from '#meta';
|
|
16
16
|
|
|
17
|
-
// TODO(burdon): Companion type.
|
|
18
17
|
export type RelatedArticleProps = Pick<
|
|
19
18
|
AppSurface.ObjectArticleProps<Obj.Unknown, {}, Obj.Unknown>,
|
|
20
19
|
'role' | 'companionTo'
|
|
@@ -31,7 +30,7 @@ export const RelatedArticle = ({ role, companionTo }: RelatedArticleProps) => {
|
|
|
31
30
|
<Toolbar.Root />
|
|
32
31
|
</Panel.Toolbar>
|
|
33
32
|
<Panel.Content asChild>
|
|
34
|
-
<Masonry.Content
|
|
33
|
+
<Masonry.Content centered>
|
|
35
34
|
<Masonry.Viewport items={items} />
|
|
36
35
|
</Masonry.Content>
|
|
37
36
|
</Panel.Content>
|
|
@@ -13,13 +13,23 @@ import { Input, useTranslation } from '@dxos/react-ui';
|
|
|
13
13
|
|
|
14
14
|
import { meta } from '#meta';
|
|
15
15
|
|
|
16
|
-
export type
|
|
16
|
+
export type RenameCallback = { initialValue: string; onRename: (name: string) => void };
|
|
17
|
+
export type RenameSubject = Space | Entity.Unknown | RenameCallback;
|
|
17
18
|
|
|
18
|
-
const
|
|
19
|
-
(
|
|
19
|
+
const isRenameCallback = (subject: RenameSubject): subject is RenameCallback =>
|
|
20
|
+
typeof (subject as RenameCallback).onRename === 'function';
|
|
21
|
+
|
|
22
|
+
const getName = (subject: RenameSubject): string => {
|
|
23
|
+
if (isRenameCallback(subject)) {
|
|
24
|
+
return subject.initialValue;
|
|
25
|
+
}
|
|
26
|
+
return (isSpace(subject) ? subject.properties.name : Entity.getLabel(subject)) ?? '';
|
|
27
|
+
};
|
|
20
28
|
|
|
21
29
|
const setName = (subject: RenameSubject, name: string): void => {
|
|
22
|
-
if (
|
|
30
|
+
if (isRenameCallback(subject)) {
|
|
31
|
+
subject.onRename(name);
|
|
32
|
+
} else if (isSpace(subject)) {
|
|
23
33
|
Obj.update(subject.properties, (properties) => {
|
|
24
34
|
properties.name = name;
|
|
25
35
|
});
|
|
@@ -30,12 +40,15 @@ const setName = (subject: RenameSubject, name: string): void => {
|
|
|
30
40
|
|
|
31
41
|
export type RenamePopoverProps = { subject: RenameSubject };
|
|
32
42
|
|
|
43
|
+
// TODO(wittjosiah): Move RenamePopover, RenameSubject, RenameCallback, and RENAME_POPOVER to @dxos/app-toolkit
|
|
44
|
+
// so any plugin can use the rename popover without depending on plugin-space.
|
|
45
|
+
|
|
33
46
|
/**
|
|
34
47
|
* Inline rename popover anchored to a navtree row. Commits on Enter or when dismissed; Escape cancels.
|
|
35
48
|
*/
|
|
36
49
|
export const RenamePopover = ({ subject }: RenamePopoverProps) => {
|
|
37
50
|
const { t } = useTranslation(meta.profile.key);
|
|
38
|
-
const space = isSpace(subject);
|
|
51
|
+
const space = !isRenameCallback(subject) && isSpace(subject);
|
|
39
52
|
const { invokePromise } = useOperationInvoker();
|
|
40
53
|
const [name, setNameState] = useState(() => getName(subject));
|
|
41
54
|
|