@dxos/plugin-space 0.8.4-main.3c1ae3b → 0.8.4-main.3eb6e50203
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/browser/CollectionArticle-XXLUNK3F.mjs +127 -0
- package/dist/lib/browser/CollectionArticle-XXLUNK3F.mjs.map +7 -0
- package/dist/lib/browser/ObjectCardStack-CXNBCSMR.mjs +148 -0
- package/dist/lib/browser/ObjectCardStack-CXNBCSMR.mjs.map +7 -0
- package/dist/lib/browser/ObjectDetails-HXV4IQEM.mjs +143 -0
- package/dist/lib/browser/ObjectDetails-HXV4IQEM.mjs.map +7 -0
- package/dist/lib/browser/RecordArticle-36LDKFWF.mjs +108 -0
- package/dist/lib/browser/RecordArticle-36LDKFWF.mjs.map +7 -0
- package/dist/lib/browser/app-graph-builder-GLV46QSI.mjs +530 -0
- package/dist/lib/browser/app-graph-builder-GLV46QSI.mjs.map +7 -0
- package/dist/lib/browser/app-graph-serializer-VOLRDNVE.mjs +85 -0
- package/dist/lib/browser/app-graph-serializer-VOLRDNVE.mjs.map +7 -0
- package/dist/lib/browser/{chunk-POFUXISV.mjs → chunk-7D63MVRS.mjs} +6 -5
- package/dist/lib/browser/chunk-7D63MVRS.mjs.map +7 -0
- package/dist/lib/browser/{chunk-5CSSKOWR.mjs → chunk-A7ZCVQGZ.mjs} +43 -45
- package/dist/lib/browser/chunk-A7ZCVQGZ.mjs.map +7 -0
- package/dist/lib/browser/chunk-ASV6DYFH.mjs +19 -0
- package/dist/lib/browser/chunk-ASV6DYFH.mjs.map +7 -0
- package/dist/lib/browser/chunk-CMLRMQNM.mjs +1889 -0
- package/dist/lib/browser/chunk-CMLRMQNM.mjs.map +7 -0
- package/dist/lib/browser/{chunk-VZBIIYFM.mjs → chunk-HSMQFM57.mjs} +1 -1
- package/dist/lib/browser/chunk-HSMQFM57.mjs.map +7 -0
- package/dist/lib/browser/chunk-KGLWYGIF.mjs +715 -0
- package/dist/lib/browser/chunk-KGLWYGIF.mjs.map +7 -0
- package/dist/lib/browser/chunk-NF3ZFAB4.mjs +13 -0
- package/dist/lib/browser/chunk-NF3ZFAB4.mjs.map +7 -0
- package/dist/lib/browser/{chunk-IJCMB5B5.mjs → chunk-WAOJLA2S.mjs} +195 -196
- package/dist/lib/browser/chunk-WAOJLA2S.mjs.map +7 -0
- package/dist/lib/browser/cli/index.mjs +851 -0
- package/dist/lib/browser/cli/index.mjs.map +7 -0
- package/dist/lib/browser/identity-created-VCFYLSBB.mjs +23 -0
- package/dist/lib/browser/identity-created-VCFYLSBB.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +215 -189
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/operation-resolver-PJJ3PCM7.mjs +830 -0
- package/dist/lib/browser/operation-resolver-PJJ3PCM7.mjs.map +7 -0
- package/dist/lib/browser/react-root-ITWAPZIY.mjs +30 -0
- package/dist/lib/browser/react-root-ITWAPZIY.mjs.map +7 -0
- package/dist/lib/browser/react-surface-6GD6K4I4.mjs +383 -0
- package/dist/lib/browser/react-surface-6GD6K4I4.mjs.map +7 -0
- package/dist/lib/browser/{repair-CNLE35NF.mjs → repair-DKU4TUD2.mjs} +16 -10
- package/dist/lib/browser/repair-DKU4TUD2.mjs.map +7 -0
- package/dist/lib/browser/settings-M2DMD2ZA.mjs +34 -0
- package/dist/lib/browser/settings-M2DMD2ZA.mjs.map +7 -0
- package/dist/lib/browser/spaces-ready-XWJUJ43N.mjs +243 -0
- package/dist/lib/browser/spaces-ready-XWJUJ43N.mjs.map +7 -0
- package/dist/lib/browser/state-V637BLIM.mjs +58 -0
- package/dist/lib/browser/state-V637BLIM.mjs.map +7 -0
- package/dist/lib/browser/types/index.mjs +10 -8
- package/dist/lib/node-esm/CollectionArticle-KFFKKP37.mjs +128 -0
- package/dist/lib/node-esm/CollectionArticle-KFFKKP37.mjs.map +7 -0
- package/dist/lib/node-esm/ObjectCardStack-EHXPNRQW.mjs +149 -0
- package/dist/lib/node-esm/ObjectCardStack-EHXPNRQW.mjs.map +7 -0
- package/dist/lib/node-esm/ObjectDetails-N73UI4ZL.mjs +144 -0
- package/dist/lib/node-esm/ObjectDetails-N73UI4ZL.mjs.map +7 -0
- package/dist/lib/node-esm/RecordArticle-CMEXNNOZ.mjs +109 -0
- package/dist/lib/node-esm/RecordArticle-CMEXNNOZ.mjs.map +7 -0
- package/dist/lib/node-esm/app-graph-builder-KCEHEKVS.mjs +531 -0
- package/dist/lib/node-esm/app-graph-builder-KCEHEKVS.mjs.map +7 -0
- package/dist/lib/node-esm/app-graph-serializer-7C4MV5NB.mjs +86 -0
- package/dist/lib/node-esm/app-graph-serializer-7C4MV5NB.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-2NM62ORP.mjs +1890 -0
- package/dist/lib/node-esm/chunk-2NM62ORP.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-AX3UGL5D.mjs → chunk-5N3YIAXD.mjs} +6 -5
- package/dist/lib/node-esm/chunk-5N3YIAXD.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-UMZ7G6G4.mjs → chunk-A5A7M37T.mjs} +43 -45
- package/dist/lib/node-esm/chunk-A5A7M37T.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-CVXULIYC.mjs +20 -0
- package/dist/lib/node-esm/chunk-CVXULIYC.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-3D4NGZPW.mjs → chunk-FB5YNROS.mjs} +195 -196
- package/dist/lib/node-esm/chunk-FB5YNROS.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-NYSDQPNM.mjs +716 -0
- package/dist/lib/node-esm/chunk-NYSDQPNM.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-PG7DNOEX.mjs +15 -0
- package/dist/lib/node-esm/chunk-PG7DNOEX.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-BDEFTL6K.mjs → chunk-SL4BJSUG.mjs} +1 -1
- package/dist/lib/node-esm/chunk-SL4BJSUG.mjs.map +7 -0
- package/dist/lib/node-esm/cli/index.mjs +852 -0
- package/dist/lib/node-esm/cli/index.mjs.map +7 -0
- package/dist/lib/node-esm/identity-created-2SJABVJD.mjs +25 -0
- package/dist/lib/node-esm/identity-created-2SJABVJD.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +215 -189
- package/dist/lib/node-esm/index.mjs.map +4 -4
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/operation-resolver-2K7N4KYC.mjs +831 -0
- package/dist/lib/node-esm/operation-resolver-2K7N4KYC.mjs.map +7 -0
- package/dist/lib/node-esm/react-root-GIQAKDQ2.mjs +31 -0
- package/dist/lib/node-esm/react-root-GIQAKDQ2.mjs.map +7 -0
- package/dist/lib/node-esm/react-surface-KWP2DNFG.mjs +384 -0
- package/dist/lib/node-esm/react-surface-KWP2DNFG.mjs.map +7 -0
- package/dist/lib/node-esm/{repair-EHZS6MFY.mjs → repair-C2H6JQCL.mjs} +16 -10
- package/dist/lib/node-esm/repair-C2H6JQCL.mjs.map +7 -0
- package/dist/lib/node-esm/settings-VCPCNBOY.mjs +35 -0
- package/dist/lib/node-esm/settings-VCPCNBOY.mjs.map +7 -0
- package/dist/lib/node-esm/spaces-ready-5JOGEWON.mjs +244 -0
- package/dist/lib/node-esm/spaces-ready-5JOGEWON.mjs.map +7 -0
- package/dist/lib/node-esm/state-5MCEPWN3.mjs +59 -0
- package/dist/lib/node-esm/state-5MCEPWN3.mjs.map +7 -0
- package/dist/lib/node-esm/types/index.mjs +10 -8
- package/dist/types/src/SpacePlugin.d.ts +3 -15
- package/dist/types/src/SpacePlugin.d.ts.map +1 -1
- package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts +7 -0
- package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts.map +1 -0
- package/dist/types/src/capabilities/app-graph-builder/index.d.ts +3 -0
- package/dist/types/src/capabilities/app-graph-builder/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/app-graph-serializer/app-graph-serializer.d.ts +5 -0
- package/dist/types/src/capabilities/app-graph-serializer/app-graph-serializer.d.ts.map +1 -0
- package/dist/types/src/capabilities/app-graph-serializer/index.d.ts +3 -0
- package/dist/types/src/capabilities/app-graph-serializer/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/identity-created/identity-created.d.ts +5 -0
- package/dist/types/src/capabilities/identity-created/identity-created.d.ts.map +1 -0
- package/dist/types/src/capabilities/identity-created/index.d.ts +3 -0
- package/dist/types/src/capabilities/identity-created/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/index.d.ts +10 -20
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/operation-resolver/index.d.ts +6 -0
- package/dist/types/src/capabilities/operation-resolver/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts +9 -0
- package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-root/index.d.ts +6 -0
- package/dist/types/src/capabilities/react-root/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-root/react-root.d.ts +9 -0
- package/dist/types/src/capabilities/react-root/react-root.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-surface/index.d.ts +5 -0
- package/dist/types/src/capabilities/react-surface/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-surface/react-surface.d.ts +8 -0
- package/dist/types/src/capabilities/react-surface/react-surface.d.ts.map +1 -0
- package/dist/types/src/capabilities/repair/index.d.ts +3 -0
- package/dist/types/src/capabilities/repair/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/repair/repair.d.ts +6 -0
- package/dist/types/src/capabilities/repair/repair.d.ts.map +1 -0
- package/dist/types/src/capabilities/settings/index.d.ts +7 -0
- package/dist/types/src/capabilities/settings/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/settings/settings.d.ts +10 -0
- package/dist/types/src/capabilities/settings/settings.d.ts.map +1 -0
- package/dist/types/src/capabilities/spaces-ready/index.d.ts +3 -0
- package/dist/types/src/capabilities/spaces-ready/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/spaces-ready/spaces-ready.d.ts +5 -0
- package/dist/types/src/capabilities/spaces-ready/spaces-ready.d.ts.map +1 -0
- package/dist/types/src/capabilities/state/index.d.ts +13 -0
- package/dist/types/src/capabilities/state/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/state/state.d.ts +17 -0
- package/dist/types/src/capabilities/state/state.d.ts.map +1 -0
- package/dist/types/src/cli/commands/database/add.d.ts +17 -0
- package/dist/types/src/cli/commands/database/add.d.ts.map +1 -0
- package/dist/types/src/cli/commands/database/index.d.ts +3 -0
- package/dist/types/src/cli/commands/database/index.d.ts.map +1 -0
- package/dist/types/src/cli/commands/database/query/index.d.ts +2 -0
- package/dist/types/src/cli/commands/database/query/index.d.ts.map +1 -0
- package/dist/types/src/cli/commands/database/query/query.d.ts +13 -0
- package/dist/types/src/cli/commands/database/query/query.d.ts.map +1 -0
- package/dist/types/src/cli/commands/database/query/query.test.d.ts +2 -0
- package/dist/types/src/cli/commands/database/query/query.test.d.ts.map +1 -0
- package/dist/types/src/cli/commands/database/remove.d.ts +9 -0
- package/dist/types/src/cli/commands/database/remove.d.ts.map +1 -0
- package/dist/types/src/cli/commands/database/stats.d.ts +6 -0
- package/dist/types/src/cli/commands/database/stats.d.ts.map +1 -0
- package/dist/types/src/cli/commands/database/util.d.ts +14 -0
- package/dist/types/src/cli/commands/database/util.d.ts.map +1 -0
- package/dist/types/src/cli/commands/index.d.ts +4 -0
- package/dist/types/src/cli/commands/index.d.ts.map +1 -0
- package/dist/types/src/cli/commands/queue/index.d.ts +7 -0
- package/dist/types/src/cli/commands/queue/index.d.ts.map +1 -0
- package/dist/types/src/cli/commands/queue/query.d.ts +8 -0
- package/dist/types/src/cli/commands/queue/query.d.ts.map +1 -0
- package/dist/types/src/cli/commands/queue/util.d.ts +6 -0
- package/dist/types/src/cli/commands/queue/util.d.ts.map +1 -0
- package/dist/types/src/cli/commands/space/close/close.d.ts +12 -0
- package/dist/types/src/cli/commands/space/close/close.d.ts.map +1 -0
- package/dist/types/src/cli/commands/space/close/index.d.ts +2 -0
- package/dist/types/src/cli/commands/space/close/index.d.ts.map +1 -0
- package/dist/types/src/cli/commands/space/create/create.d.ts +12 -0
- package/dist/types/src/cli/commands/space/create/create.d.ts.map +1 -0
- package/dist/types/src/cli/commands/space/create/create.test.d.ts +2 -0
- package/dist/types/src/cli/commands/space/create/create.test.d.ts.map +1 -0
- package/dist/types/src/cli/commands/space/create/index.d.ts +2 -0
- package/dist/types/src/cli/commands/space/create/index.d.ts.map +1 -0
- package/dist/types/src/cli/commands/space/index.d.ts +31 -0
- package/dist/types/src/cli/commands/space/index.d.ts.map +1 -0
- package/dist/types/src/cli/commands/space/info/index.d.ts +2 -0
- package/dist/types/src/cli/commands/space/info/index.d.ts.map +1 -0
- package/dist/types/src/cli/commands/space/info/info.d.ts +13 -0
- package/dist/types/src/cli/commands/space/info/info.d.ts.map +1 -0
- package/dist/types/src/cli/commands/space/info/info.test.d.ts +2 -0
- package/dist/types/src/cli/commands/space/info/info.test.d.ts.map +1 -0
- package/dist/types/src/cli/commands/space/join/index.d.ts +2 -0
- package/dist/types/src/cli/commands/space/join/index.d.ts.map +1 -0
- package/dist/types/src/cli/commands/space/join/join.d.ts +14 -0
- package/dist/types/src/cli/commands/space/join/join.d.ts.map +1 -0
- package/dist/types/src/cli/commands/space/join/util.d.ts +17 -0
- package/dist/types/src/cli/commands/space/join/util.d.ts.map +1 -0
- package/dist/types/src/cli/commands/space/list/index.d.ts +2 -0
- package/dist/types/src/cli/commands/space/list/index.d.ts.map +1 -0
- package/dist/types/src/cli/commands/space/list/list.d.ts +7 -0
- package/dist/types/src/cli/commands/space/list/list.d.ts.map +1 -0
- package/dist/types/src/cli/commands/space/list/list.test.d.ts +2 -0
- package/dist/types/src/cli/commands/space/list/list.test.d.ts.map +1 -0
- package/dist/types/src/cli/commands/space/members/index.d.ts +2 -0
- package/dist/types/src/cli/commands/space/members/index.d.ts.map +1 -0
- package/dist/types/src/cli/commands/space/members/members.d.ts +13 -0
- package/dist/types/src/cli/commands/space/members/members.d.ts.map +1 -0
- package/dist/types/src/cli/commands/space/members/members.test.d.ts +2 -0
- package/dist/types/src/cli/commands/space/members/members.test.d.ts.map +1 -0
- package/dist/types/src/cli/commands/space/members/util.d.ts +9 -0
- package/dist/types/src/cli/commands/space/members/util.d.ts.map +1 -0
- package/dist/types/src/cli/commands/space/open/index.d.ts +2 -0
- package/dist/types/src/cli/commands/space/open/index.d.ts.map +1 -0
- package/dist/types/src/cli/commands/space/open/open.d.ts +12 -0
- package/dist/types/src/cli/commands/space/open/open.d.ts.map +1 -0
- package/dist/types/src/cli/commands/space/schema/index.d.ts +8 -0
- package/dist/types/src/cli/commands/space/schema/index.d.ts.map +1 -0
- package/dist/types/src/cli/commands/space/schema/list/index.d.ts +2 -0
- package/dist/types/src/cli/commands/space/schema/list/index.d.ts.map +1 -0
- package/dist/types/src/cli/commands/space/schema/list/list.d.ts +15 -0
- package/dist/types/src/cli/commands/space/schema/list/list.d.ts.map +1 -0
- package/dist/types/src/cli/commands/space/schema/list/list.test.d.ts +2 -0
- package/dist/types/src/cli/commands/space/schema/list/list.test.d.ts.map +1 -0
- package/dist/types/src/cli/commands/space/schema/list/util.d.ts +15 -0
- package/dist/types/src/cli/commands/space/schema/list/util.d.ts.map +1 -0
- package/dist/types/src/cli/commands/space/share/index.d.ts +2 -0
- package/dist/types/src/cli/commands/space/share/index.d.ts.map +1 -0
- package/dist/types/src/cli/commands/space/share/share.d.ts +19 -0
- package/dist/types/src/cli/commands/space/share/share.d.ts.map +1 -0
- package/dist/types/src/cli/commands/space/sync/index.d.ts +2 -0
- package/dist/types/src/cli/commands/space/sync/index.d.ts.map +1 -0
- package/dist/types/src/cli/commands/space/sync/sync.d.ts +6 -0
- package/dist/types/src/cli/commands/space/sync/sync.d.ts.map +1 -0
- package/dist/types/src/cli/commands/space/sync/sync.test.d.ts +2 -0
- package/dist/types/src/cli/commands/space/sync/sync.test.d.ts.map +1 -0
- package/dist/types/src/cli/index.d.ts +2 -0
- package/dist/types/src/cli/index.d.ts.map +1 -0
- package/dist/types/src/cli/plugin.d.ts +4 -0
- package/dist/types/src/cli/plugin.d.ts.map +1 -0
- package/dist/types/src/components/AwaitingObject.d.ts.map +1 -1
- package/dist/types/src/components/CollectionArticle.d.ts +6 -3
- package/dist/types/src/components/CollectionArticle.d.ts.map +1 -1
- package/dist/types/src/components/CollectionSection.d.ts +1 -1
- package/dist/types/src/components/CollectionSection.d.ts.map +1 -1
- package/dist/types/src/components/CreateDialog/CreateObjectDialog.d.ts +2 -2
- package/dist/types/src/components/CreateDialog/CreateObjectDialog.d.ts.map +1 -1
- package/dist/types/src/components/CreateDialog/CreateObjectDialog.stories.d.ts +17 -7
- package/dist/types/src/components/CreateDialog/CreateObjectDialog.stories.d.ts.map +1 -1
- package/dist/types/src/components/CreateDialog/CreateObjectPanel.d.ts +9 -5
- package/dist/types/src/components/CreateDialog/CreateObjectPanel.d.ts.map +1 -1
- package/dist/types/src/components/CreateDialog/CreateSpaceDialog.d.ts.map +1 -1
- package/dist/types/src/components/JoinDialog/JoinDialog.d.ts.map +1 -1
- package/dist/types/src/components/MembersContainer/MembersContainer.d.ts.map +1 -1
- package/dist/types/src/components/MembersContainer/MembersContainer.stories.d.ts +11 -2
- package/dist/types/src/components/MembersContainer/MembersContainer.stories.d.ts.map +1 -1
- package/dist/types/src/components/MenuFooter.d.ts +1 -1
- package/dist/types/src/components/MenuFooter.d.ts.map +1 -1
- package/dist/types/src/components/ObjectCardStack/ObjectCardStack.d.ts +1 -1
- package/dist/types/src/components/ObjectCardStack/ObjectCardStack.d.ts.map +1 -1
- package/dist/types/src/components/ObjectCardStack/ObjectForm.d.ts +1 -1
- package/dist/types/src/components/ObjectCardStack/ObjectForm.d.ts.map +1 -1
- package/dist/types/src/components/ObjectDetails/BaseObjectSettings.d.ts +1 -1
- package/dist/types/src/components/ObjectDetails/BaseObjectSettings.d.ts.map +1 -1
- package/dist/types/src/components/ObjectDetails/BaseObjectSettings.stories.d.ts +9 -0
- package/dist/types/src/components/ObjectDetails/BaseObjectSettings.stories.d.ts.map +1 -1
- package/dist/types/src/components/ObjectDetails/ObjectDetails.d.ts +6 -5
- package/dist/types/src/components/ObjectDetails/ObjectDetails.d.ts.map +1 -1
- package/dist/types/src/components/ObjectRenamePopover/ObjectRenamePopover.d.ts +1 -1
- package/dist/types/src/components/ObjectRenamePopover/ObjectRenamePopover.d.ts.map +1 -1
- package/dist/types/src/components/RecordArticle.d.ts +2 -2
- package/dist/types/src/components/RecordArticle.d.ts.map +1 -1
- package/dist/types/src/components/RecordArticle.stories.d.ts +11 -2
- package/dist/types/src/components/RecordArticle.stories.d.ts.map +1 -1
- package/dist/types/src/components/SchemaContainer.d.ts.map +1 -1
- package/dist/types/src/components/SpacePluginSettings.d.ts +4 -2
- package/dist/types/src/components/SpacePluginSettings.d.ts.map +1 -1
- package/dist/types/src/components/SpacePresence/SpacePresence.d.ts +4 -4
- package/dist/types/src/components/SpacePresence/SpacePresence.d.ts.map +1 -1
- package/dist/types/src/components/SpacePresence/SpacePresence.stories.d.ts +9 -0
- package/dist/types/src/components/SpacePresence/SpacePresence.stories.d.ts.map +1 -1
- package/dist/types/src/components/SpaceRenamePopover/SpaceRenamePopover.d.ts.map +1 -1
- package/dist/types/src/components/SpaceSettings/SpaceSettingsContainer.d.ts +4 -1
- package/dist/types/src/components/SpaceSettings/SpaceSettingsContainer.d.ts.map +1 -1
- package/dist/types/src/components/SpaceSettings/SpaceSettingsContainer.stories.d.ts +13 -1
- package/dist/types/src/components/SpaceSettings/SpaceSettingsContainer.stories.d.ts.map +1 -1
- package/dist/types/src/components/SyncStatus/SyncStatus.stories.d.ts +9 -0
- package/dist/types/src/components/SyncStatus/SyncStatus.stories.d.ts.map +1 -1
- package/dist/types/src/components/ViewEditor.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts +11 -6
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/constants.d.ts +6 -0
- package/dist/types/src/constants.d.ts.map +1 -0
- package/dist/types/src/helpers/query.d.ts +3 -3
- package/dist/types/src/helpers/query.d.ts.map +1 -1
- package/dist/types/src/hooks/useActiveSpace.d.ts +2 -2
- package/dist/types/src/hooks/useActiveSpace.d.ts.map +1 -1
- package/dist/types/src/hooks/usePath.d.ts +2 -2
- package/dist/types/src/hooks/usePath.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +1 -2
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts +2 -2
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +9 -0
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/capabilities.d.ts +71 -0
- package/dist/types/src/types/capabilities.d.ts.map +1 -0
- package/dist/types/src/types/events.d.ts +9 -0
- package/dist/types/src/types/events.d.ts.map +1 -0
- package/dist/types/src/types/index.d.ts +2 -0
- package/dist/types/src/types/index.d.ts.map +1 -1
- package/dist/types/src/types/types.d.ts +643 -354
- package/dist/types/src/types/types.d.ts.map +1 -1
- package/dist/types/src/util.d.ts +36 -31
- package/dist/types/src/util.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +83 -69
- package/src/SpacePlugin.ts +174 -194
- package/src/capabilities/app-graph-builder/app-graph-builder.ts +621 -0
- package/src/capabilities/app-graph-builder/index.ts +7 -0
- package/src/capabilities/app-graph-serializer/app-graph-serializer.ts +83 -0
- package/src/capabilities/app-graph-serializer/index.ts +7 -0
- package/src/capabilities/identity-created/identity-created.ts +29 -0
- package/src/capabilities/identity-created/index.ts +7 -0
- package/src/capabilities/index.ts +10 -14
- package/src/capabilities/operation-resolver/index.ts +7 -0
- package/src/capabilities/operation-resolver/operation-resolver.ts +762 -0
- package/src/capabilities/react-root/index.ts +7 -0
- package/src/capabilities/react-root/react-root.tsx +25 -0
- package/src/capabilities/react-surface/index.ts +7 -0
- package/src/capabilities/react-surface/react-surface.tsx +377 -0
- package/src/capabilities/repair/index.ts +7 -0
- package/src/capabilities/{repair.ts → repair/repair.ts} +21 -11
- package/src/capabilities/settings/index.ts +7 -0
- package/src/capabilities/settings/settings.ts +33 -0
- package/src/capabilities/spaces-ready/index.ts +7 -0
- package/src/capabilities/spaces-ready/spaces-ready.ts +290 -0
- package/src/capabilities/state/index.ts +7 -0
- package/src/capabilities/state/state.ts +64 -0
- package/src/cli/commands/database/add.ts +115 -0
- package/src/cli/commands/database/index.ts +16 -0
- package/src/cli/commands/database/query/index.ts +5 -0
- package/src/cli/commands/database/query/query.test.ts +55 -0
- package/src/cli/commands/database/query/query.ts +44 -0
- package/src/cli/commands/database/remove.ts +51 -0
- package/src/cli/commands/database/stats.ts +44 -0
- package/src/cli/commands/database/util.ts +32 -0
- package/src/cli/commands/index.ts +7 -0
- package/src/cli/commands/queue/index.ts +12 -0
- package/src/cli/commands/queue/query.ts +45 -0
- package/src/cli/commands/queue/util.ts +19 -0
- package/src/cli/commands/space/close/close.ts +40 -0
- package/src/cli/commands/space/close/index.ts +5 -0
- package/src/cli/commands/space/create/create.test.ts +67 -0
- package/src/cli/commands/space/create/create.ts +61 -0
- package/src/cli/commands/space/create/index.ts +5 -0
- package/src/cli/commands/space/index.ts +21 -0
- package/src/cli/commands/space/info/index.ts +5 -0
- package/src/cli/commands/space/info/info.test.ts +47 -0
- package/src/cli/commands/space/info/info.ts +37 -0
- package/src/cli/commands/space/join/index.ts +5 -0
- package/src/cli/commands/space/join/join.ts +122 -0
- package/src/cli/commands/space/join/util.ts +82 -0
- package/src/cli/commands/space/list/index.ts +5 -0
- package/src/cli/commands/space/list/list.test.ts +36 -0
- package/src/cli/commands/space/list/list.ts +30 -0
- package/src/cli/commands/space/members/index.ts +5 -0
- package/src/cli/commands/space/members/members.test.ts +46 -0
- package/src/cli/commands/space/members/members.ts +40 -0
- package/src/cli/commands/space/members/util.ts +29 -0
- package/src/cli/commands/space/open/index.ts +5 -0
- package/src/cli/commands/space/open/open.ts +39 -0
- package/src/cli/commands/space/schema/index.ts +12 -0
- package/src/cli/commands/space/schema/list/index.ts +5 -0
- package/src/cli/commands/space/schema/list/list.test.ts +42 -0
- package/src/cli/commands/space/schema/list/list.ts +64 -0
- package/src/cli/commands/space/schema/list/util.ts +39 -0
- package/src/cli/commands/space/share/index.ts +5 -0
- package/src/cli/commands/space/share/share.ts +112 -0
- package/src/cli/commands/space/sync/index.ts +5 -0
- package/src/cli/commands/space/sync/sync.test.ts +12 -0
- package/src/cli/commands/space/sync/sync.ts +33 -0
- package/src/cli/index.ts +5 -0
- package/src/cli/plugin.ts +88 -0
- package/src/components/AwaitingObject.tsx +14 -10
- package/src/components/CollectionArticle.tsx +142 -19
- package/src/components/CollectionSection.tsx +1 -1
- package/src/components/CreateDialog/CreateObjectDialog.stories.tsx +28 -22
- package/src/components/CreateDialog/CreateObjectDialog.tsx +55 -60
- package/src/components/CreateDialog/CreateObjectPanel.tsx +102 -52
- package/src/components/CreateDialog/CreateSpaceDialog.tsx +34 -51
- package/src/components/JoinDialog/JoinDialog.tsx +26 -52
- package/src/components/MembersContainer/MembersContainer.stories.tsx +3 -3
- package/src/components/MembersContainer/MembersContainer.tsx +76 -81
- package/src/components/MenuFooter.tsx +1 -1
- package/src/components/ObjectCardStack/ObjectCardStack.tsx +13 -10
- package/src/components/ObjectCardStack/ObjectForm.tsx +34 -27
- package/src/components/ObjectDetails/BaseObjectSettings.stories.tsx +8 -8
- package/src/components/ObjectDetails/BaseObjectSettings.tsx +35 -31
- package/src/components/ObjectDetails/ObjectDetails.tsx +9 -11
- package/src/components/ObjectRenamePopover/ObjectRenamePopover.tsx +9 -13
- package/src/components/RecordArticle.stories.tsx +14 -13
- package/src/components/RecordArticle.tsx +47 -37
- package/src/components/SchemaContainer.tsx +20 -17
- package/src/components/SpacePluginSettings.tsx +42 -35
- package/src/components/SpacePresence/SpacePresence.stories.tsx +1 -1
- package/src/components/SpacePresence/SpacePresence.tsx +15 -16
- package/src/components/SpaceRenamePopover/SpaceRenamePopover.tsx +11 -12
- package/src/components/SpaceSettings/SpaceSettingsContainer.stories.tsx +5 -5
- package/src/components/SpaceSettings/SpaceSettingsContainer.tsx +165 -182
- package/src/components/SyncStatus/InlineSyncStatus.tsx +1 -1
- package/src/components/SyncStatus/SyncStatus.stories.tsx +1 -1
- package/src/components/SyncStatus/SyncStatus.tsx +1 -1
- package/src/components/SyncStatus/save-tracker.ts +2 -2
- package/src/components/ViewEditor.tsx +16 -12
- package/src/constants.ts +11 -0
- package/src/helpers/query.ts +7 -6
- package/src/hooks/useActiveSpace.ts +8 -5
- package/src/hooks/useInputSurfaceLookup.tsx +3 -3
- package/src/hooks/usePath.ts +4 -4
- package/src/index.ts +1 -2
- package/src/meta.ts +2 -2
- package/src/translations.ts +4 -2
- package/src/types/capabilities.ts +73 -0
- package/src/types/events.ts +16 -0
- package/src/types/index.ts +2 -0
- package/src/types/types.ts +533 -245
- package/src/util.tsx +222 -230
- package/dist/lib/browser/CollectionArticle-WTHWY4YS.mjs +0 -31
- package/dist/lib/browser/CollectionArticle-WTHWY4YS.mjs.map +0 -7
- package/dist/lib/browser/ObjectCardStack-TE7AWPMH.mjs +0 -144
- package/dist/lib/browser/ObjectCardStack-TE7AWPMH.mjs.map +0 -7
- package/dist/lib/browser/ObjectDetails-666IBRHE.mjs +0 -144
- package/dist/lib/browser/ObjectDetails-666IBRHE.mjs.map +0 -7
- package/dist/lib/browser/RecordArticle-2PFEBPXY.mjs +0 -116
- package/dist/lib/browser/RecordArticle-2PFEBPXY.mjs.map +0 -7
- package/dist/lib/browser/app-graph-builder-USKWFIDK.mjs +0 -551
- package/dist/lib/browser/app-graph-builder-USKWFIDK.mjs.map +0 -7
- package/dist/lib/browser/app-graph-serializer-SXIQ425K.mjs +0 -80
- package/dist/lib/browser/app-graph-serializer-SXIQ425K.mjs.map +0 -7
- package/dist/lib/browser/chunk-5CSSKOWR.mjs.map +0 -7
- package/dist/lib/browser/chunk-C6DAPIFF.mjs +0 -20
- package/dist/lib/browser/chunk-C6DAPIFF.mjs.map +0 -7
- package/dist/lib/browser/chunk-E4BEMEZ3.mjs +0 -399
- package/dist/lib/browser/chunk-E4BEMEZ3.mjs.map +0 -7
- package/dist/lib/browser/chunk-IJCMB5B5.mjs.map +0 -7
- package/dist/lib/browser/chunk-POFUXISV.mjs.map +0 -7
- package/dist/lib/browser/chunk-VZBIIYFM.mjs.map +0 -7
- package/dist/lib/browser/chunk-WJXU4GKV.mjs +0 -19
- package/dist/lib/browser/chunk-WJXU4GKV.mjs.map +0 -7
- package/dist/lib/browser/chunk-XKQCDLXX.mjs +0 -2103
- package/dist/lib/browser/chunk-XKQCDLXX.mjs.map +0 -7
- package/dist/lib/browser/identity-created-NAXTPQXE.mjs +0 -23
- package/dist/lib/browser/identity-created-NAXTPQXE.mjs.map +0 -7
- package/dist/lib/browser/intent-resolver-QEIM7NQT.mjs +0 -769
- package/dist/lib/browser/intent-resolver-QEIM7NQT.mjs.map +0 -7
- package/dist/lib/browser/react-root-T6ZETLD2.mjs +0 -30
- package/dist/lib/browser/react-root-T6ZETLD2.mjs.map +0 -7
- package/dist/lib/browser/react-surface-MLN5BZ2G.mjs +0 -374
- package/dist/lib/browser/react-surface-MLN5BZ2G.mjs.map +0 -7
- package/dist/lib/browser/repair-CNLE35NF.mjs.map +0 -7
- package/dist/lib/browser/settings-EGTCHS7U.mjs +0 -24
- package/dist/lib/browser/settings-EGTCHS7U.mjs.map +0 -7
- package/dist/lib/browser/spaces-ready-YS4BBZXW.mjs +0 -208
- package/dist/lib/browser/spaces-ready-YS4BBZXW.mjs.map +0 -7
- package/dist/lib/browser/state-C7N6EDDZ.mjs +0 -47
- package/dist/lib/browser/state-C7N6EDDZ.mjs.map +0 -7
- package/dist/lib/node-esm/CollectionArticle-KHXYT3SH.mjs +0 -32
- package/dist/lib/node-esm/CollectionArticle-KHXYT3SH.mjs.map +0 -7
- package/dist/lib/node-esm/ObjectCardStack-AAKMAQ6T.mjs +0 -145
- package/dist/lib/node-esm/ObjectCardStack-AAKMAQ6T.mjs.map +0 -7
- package/dist/lib/node-esm/ObjectDetails-TZ5YKXGN.mjs +0 -145
- package/dist/lib/node-esm/ObjectDetails-TZ5YKXGN.mjs.map +0 -7
- package/dist/lib/node-esm/RecordArticle-SSJ7PULS.mjs +0 -117
- package/dist/lib/node-esm/RecordArticle-SSJ7PULS.mjs.map +0 -7
- package/dist/lib/node-esm/app-graph-builder-QRQ5EQLB.mjs +0 -552
- package/dist/lib/node-esm/app-graph-builder-QRQ5EQLB.mjs.map +0 -7
- package/dist/lib/node-esm/app-graph-serializer-P2X4W7LI.mjs +0 -81
- package/dist/lib/node-esm/app-graph-serializer-P2X4W7LI.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-3D4NGZPW.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-AX3UGL5D.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-BDEFTL6K.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-H4JILUJK.mjs +0 -20
- package/dist/lib/node-esm/chunk-H4JILUJK.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-QQQE2ZCX.mjs +0 -400
- package/dist/lib/node-esm/chunk-QQQE2ZCX.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-UMZ7G6G4.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-WWGV5FJM.mjs +0 -21
- package/dist/lib/node-esm/chunk-WWGV5FJM.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-XD532BVR.mjs +0 -2104
- package/dist/lib/node-esm/chunk-XD532BVR.mjs.map +0 -7
- package/dist/lib/node-esm/identity-created-OXLKCJE3.mjs +0 -25
- package/dist/lib/node-esm/identity-created-OXLKCJE3.mjs.map +0 -7
- package/dist/lib/node-esm/intent-resolver-ZWCBVABN.mjs +0 -770
- package/dist/lib/node-esm/intent-resolver-ZWCBVABN.mjs.map +0 -7
- package/dist/lib/node-esm/react-root-SKB4UJ4K.mjs +0 -31
- package/dist/lib/node-esm/react-root-SKB4UJ4K.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-BVZGNSBB.mjs +0 -375
- package/dist/lib/node-esm/react-surface-BVZGNSBB.mjs.map +0 -7
- package/dist/lib/node-esm/repair-EHZS6MFY.mjs.map +0 -7
- package/dist/lib/node-esm/settings-N3F6JCIR.mjs +0 -25
- package/dist/lib/node-esm/settings-N3F6JCIR.mjs.map +0 -7
- package/dist/lib/node-esm/spaces-ready-U2K5P4LB.mjs +0 -209
- package/dist/lib/node-esm/spaces-ready-U2K5P4LB.mjs.map +0 -7
- package/dist/lib/node-esm/state-45TXZQJ6.mjs +0 -48
- package/dist/lib/node-esm/state-45TXZQJ6.mjs.map +0 -7
- package/dist/types/src/capabilities/app-graph-builder.d.ts +0 -4
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +0 -1
- package/dist/types/src/capabilities/app-graph-serializer.d.ts +0 -4
- package/dist/types/src/capabilities/app-graph-serializer.d.ts.map +0 -1
- package/dist/types/src/capabilities/capabilities.d.ts +0 -34
- package/dist/types/src/capabilities/capabilities.d.ts.map +0 -1
- package/dist/types/src/capabilities/identity-created.d.ts +0 -4
- package/dist/types/src/capabilities/identity-created.d.ts.map +0 -1
- package/dist/types/src/capabilities/intent-resolver.d.ts +0 -9
- package/dist/types/src/capabilities/intent-resolver.d.ts.map +0 -1
- package/dist/types/src/capabilities/react-root.d.ts +0 -7
- package/dist/types/src/capabilities/react-root.d.ts.map +0 -1
- package/dist/types/src/capabilities/react-surface.d.ts +0 -7
- package/dist/types/src/capabilities/react-surface.d.ts.map +0 -1
- package/dist/types/src/capabilities/repair.d.ts +0 -4
- package/dist/types/src/capabilities/repair.d.ts.map +0 -1
- package/dist/types/src/capabilities/settings.d.ts +0 -4
- package/dist/types/src/capabilities/settings.d.ts.map +0 -1
- package/dist/types/src/capabilities/spaces-ready.d.ts +0 -4
- package/dist/types/src/capabilities/spaces-ready.d.ts.map +0 -1
- package/dist/types/src/capabilities/state.d.ts +0 -5
- package/dist/types/src/capabilities/state.d.ts.map +0 -1
- package/dist/types/src/events.d.ts +0 -8
- package/dist/types/src/events.d.ts.map +0 -1
- package/src/capabilities/app-graph-builder.ts +0 -724
- package/src/capabilities/app-graph-serializer.ts +0 -76
- package/src/capabilities/capabilities.ts +0 -40
- package/src/capabilities/identity-created.ts +0 -25
- package/src/capabilities/intent-resolver.ts +0 -705
- package/src/capabilities/react-root.tsx +0 -22
- package/src/capabilities/react-surface.tsx +0 -358
- package/src/capabilities/settings.ts +0 -21
- package/src/capabilities/spaces-ready.ts +0 -252
- package/src/capabilities/state.ts +0 -46
- package/src/events.ts +0 -15
|
@@ -5,16 +5,14 @@
|
|
|
5
5
|
import React, { type Dispatch, type SetStateAction, useCallback, useMemo, useState } from 'react';
|
|
6
6
|
import { QR } from 'react-qr-rounded';
|
|
7
7
|
|
|
8
|
-
import {
|
|
9
|
-
import { useIntentDispatcher } from '@dxos/app-framework/react';
|
|
8
|
+
import { useOperationInvoker } from '@dxos/app-framework/ui';
|
|
10
9
|
import { Obj } from '@dxos/echo';
|
|
11
10
|
import { log } from '@dxos/log';
|
|
12
11
|
import { useConfig } from '@dxos/react-client';
|
|
13
12
|
import { type Space, useSpaceInvitations } from '@dxos/react-client/echo';
|
|
14
13
|
import { type CancellableInvitationObservable, Invitation, InvitationEncoder } from '@dxos/react-client/invitations';
|
|
15
14
|
import { Button, Clipboard, Icon, Input, useId, useTranslation } from '@dxos/react-ui';
|
|
16
|
-
import {
|
|
17
|
-
import { StackItem } from '@dxos/react-ui-stack';
|
|
15
|
+
import { Settings } from '@dxos/react-ui-form';
|
|
18
16
|
import { Collection } from '@dxos/schema';
|
|
19
17
|
import {
|
|
20
18
|
type ActionMenuItem,
|
|
@@ -25,11 +23,12 @@ import {
|
|
|
25
23
|
InvitationList,
|
|
26
24
|
SpaceMemberList,
|
|
27
25
|
Viewport,
|
|
26
|
+
translationKey as shellTranslationKey,
|
|
28
27
|
} from '@dxos/shell/react';
|
|
29
28
|
import { hexToEmoji } from '@dxos/util';
|
|
30
29
|
|
|
31
30
|
import { meta } from '../../meta';
|
|
32
|
-
import {
|
|
31
|
+
import { SpaceOperation } from '../../types';
|
|
33
32
|
import { COMPOSER_SPACE_LOCK } from '../../util';
|
|
34
33
|
|
|
35
34
|
// TODO(wittjosiah): Copied from Shell.
|
|
@@ -51,7 +50,7 @@ export type MembersContainerProps = {
|
|
|
51
50
|
export const MembersContainer = ({ space, createInvitationUrl }: MembersContainerProps) => {
|
|
52
51
|
const { t } = useTranslation(meta.id);
|
|
53
52
|
const config = useConfig();
|
|
54
|
-
const {
|
|
53
|
+
const { invokePromise } = useOperationInvoker();
|
|
55
54
|
const invitations = useSpaceInvitations(space.key);
|
|
56
55
|
const visibleInvitations = invitations?.filter(
|
|
57
56
|
(invitation) => ![Invitation.State.CANCELLED].includes(invitation.get().state),
|
|
@@ -69,57 +68,55 @@ export const MembersContainer = ({ space, createInvitationUrl }: MembersContaine
|
|
|
69
68
|
|
|
70
69
|
const locked = space.properties[COMPOSER_SPACE_LOCK];
|
|
71
70
|
const handleChangeLocked = useCallback(() => {
|
|
72
|
-
space.properties
|
|
71
|
+
Obj.change(space.properties, (p) => {
|
|
72
|
+
p[COMPOSER_SPACE_LOCK] = !locked;
|
|
73
|
+
});
|
|
73
74
|
}, [locked, space]);
|
|
74
75
|
|
|
75
76
|
const inviteActions = useMemo(
|
|
76
77
|
(): Record<string, ActionMenuItem> => ({
|
|
77
78
|
inviteOne: {
|
|
78
|
-
label: t('invite one label', { ns:
|
|
79
|
-
description: t('invite one description', { ns:
|
|
79
|
+
label: t('invite one label', { ns: shellTranslationKey }),
|
|
80
|
+
description: t('invite one description', { ns: shellTranslationKey }),
|
|
80
81
|
icon: 'ph--user-plus--regular',
|
|
81
82
|
testId: 'membersContainer.inviteOne',
|
|
82
83
|
onClick: async () => {
|
|
83
|
-
const { data: invitation } = await
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
}),
|
|
91
|
-
);
|
|
84
|
+
const { data: invitation } = await invokePromise(SpaceOperation.Share, {
|
|
85
|
+
space,
|
|
86
|
+
type: Invitation.Type.INTERACTIVE,
|
|
87
|
+
authMethod: Invitation.AuthMethod.SHARED_SECRET,
|
|
88
|
+
multiUse: false,
|
|
89
|
+
target: target && Obj.getDXN(target).toString(),
|
|
90
|
+
});
|
|
92
91
|
if (invitation && config.values.runtime?.app?.env?.DX_ENVIRONMENT !== 'production') {
|
|
93
|
-
const subscription: ZenObservable.Subscription = invitation.subscribe(
|
|
94
|
-
handleInvitationEvent(invitation, subscription),
|
|
92
|
+
const subscription: ZenObservable.Subscription = (invitation as CancellableInvitationObservable).subscribe(
|
|
93
|
+
(invitation: Invitation) => handleInvitationEvent(invitation, subscription),
|
|
95
94
|
);
|
|
96
95
|
}
|
|
97
96
|
},
|
|
98
97
|
},
|
|
99
98
|
inviteMany: {
|
|
100
|
-
label: t('invite many label', { ns:
|
|
101
|
-
description: t('invite many description', { ns:
|
|
99
|
+
label: t('invite many label', { ns: shellTranslationKey }),
|
|
100
|
+
description: t('invite many description', { ns: shellTranslationKey }),
|
|
102
101
|
icon: 'ph--users-three--regular',
|
|
103
102
|
testId: 'membersContainer.inviteMany',
|
|
104
103
|
onClick: async () => {
|
|
105
|
-
const { data: invitation } = await
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
}),
|
|
113
|
-
);
|
|
104
|
+
const { data: invitation } = await invokePromise(SpaceOperation.Share, {
|
|
105
|
+
space,
|
|
106
|
+
type: Invitation.Type.DELEGATED,
|
|
107
|
+
authMethod: Invitation.AuthMethod.KNOWN_PUBLIC_KEY,
|
|
108
|
+
multiUse: true,
|
|
109
|
+
target: target && Obj.getDXN(target).toString(),
|
|
110
|
+
});
|
|
114
111
|
if (invitation && config.values.runtime?.app?.env?.DX_ENVIRONMENT !== 'production') {
|
|
115
|
-
const subscription: ZenObservable.Subscription = invitation.subscribe(
|
|
116
|
-
handleInvitationEvent(invitation, subscription),
|
|
112
|
+
const subscription: ZenObservable.Subscription = (invitation as CancellableInvitationObservable).subscribe(
|
|
113
|
+
(invitation: Invitation) => handleInvitationEvent(invitation, subscription),
|
|
117
114
|
);
|
|
118
115
|
}
|
|
119
116
|
},
|
|
120
117
|
},
|
|
121
118
|
}),
|
|
122
|
-
[t, space, target],
|
|
119
|
+
[t, space, target, invokePromise],
|
|
123
120
|
);
|
|
124
121
|
|
|
125
122
|
const [selectedInvitation, setSelectedInvitation] = useState<CancellableInvitationObservable | null>(null);
|
|
@@ -132,51 +129,49 @@ export const MembersContainer = ({ space, createInvitationUrl }: MembersContaine
|
|
|
132
129
|
|
|
133
130
|
return (
|
|
134
131
|
<Clipboard.Provider>
|
|
135
|
-
<
|
|
136
|
-
<
|
|
137
|
-
<
|
|
138
|
-
<
|
|
139
|
-
<
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
{
|
|
143
|
-
<
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
{
|
|
148
|
-
<
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
<
|
|
173
|
-
<
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
</ControlPage>
|
|
179
|
-
</StackItem.Content>
|
|
132
|
+
<Settings.Root>
|
|
133
|
+
<Settings.Section title={t('members verbose label')} description={t('members description')}>
|
|
134
|
+
<Settings.Frame>
|
|
135
|
+
<Settings.FrameItem title={t('members label')}>
|
|
136
|
+
<SpaceMemberList spaceKey={space.key} includeSelf />
|
|
137
|
+
</Settings.FrameItem>
|
|
138
|
+
{locked && (
|
|
139
|
+
<Settings.FrameItem title={t('invitations label')}>
|
|
140
|
+
<p className='text-description mbe-2'>{t('locked space description')}</p>
|
|
141
|
+
</Settings.FrameItem>
|
|
142
|
+
)}
|
|
143
|
+
{!locked && (
|
|
144
|
+
<Settings.FrameItem title={t('invitations label')}>
|
|
145
|
+
{selectedInvitation && <InvitationSection {...selectedInvitation} onBack={handleBack} />}
|
|
146
|
+
{!selectedInvitation && (
|
|
147
|
+
<>
|
|
148
|
+
<p className='text-description mbe-2'>{t('space invitation description')}</p>
|
|
149
|
+
<InvitationList
|
|
150
|
+
className='mb-2'
|
|
151
|
+
send={handleSend}
|
|
152
|
+
invitations={visibleInvitations ?? []}
|
|
153
|
+
onClickRemove={(invitation) => invitation.cancel()}
|
|
154
|
+
createInvitationUrl={createInvitationUrl}
|
|
155
|
+
/>
|
|
156
|
+
<BifurcatedAction
|
|
157
|
+
actions={inviteActions}
|
|
158
|
+
activeAction={activeAction}
|
|
159
|
+
onChangeActiveAction={setActiveAction as Dispatch<SetStateAction<string>>}
|
|
160
|
+
data-testid='membersContainer.createInvitation'
|
|
161
|
+
/>
|
|
162
|
+
</>
|
|
163
|
+
)}
|
|
164
|
+
</Settings.FrameItem>
|
|
165
|
+
)}
|
|
166
|
+
</Settings.Frame>
|
|
167
|
+
{/* TODO(wittjosiah): Make Settings.ItemInput & Settings.Frame compatible. */}
|
|
168
|
+
<div className='justify-center p-0 mbs-4 container-max-width grid grid-cols-1 md:grid-cols-[1fr_min-content]'>
|
|
169
|
+
<Settings.ItemInput title={t('space locked label')} description={t('space locked description')}>
|
|
170
|
+
<Input.Switch checked={locked} onCheckedChange={handleChangeLocked} classNames='justify-self-end' />
|
|
171
|
+
</Settings.ItemInput>
|
|
172
|
+
</div>
|
|
173
|
+
</Settings.Section>
|
|
174
|
+
</Settings.Root>
|
|
180
175
|
</Clipboard.Provider>
|
|
181
176
|
);
|
|
182
177
|
};
|
|
@@ -227,7 +222,7 @@ const InvitationSection = ({
|
|
|
227
222
|
};
|
|
228
223
|
|
|
229
224
|
const InvitationQR = ({ id, url, onCancel }: { id: string; url: string; onCancel?: () => void }) => {
|
|
230
|
-
const { t } = useTranslation(
|
|
225
|
+
const { t } = useTranslation(shellTranslationKey);
|
|
231
226
|
const qrLabel = useId('members-container__qr-code');
|
|
232
227
|
const emoji = hexToEmoji(id);
|
|
233
228
|
return (
|
|
@@ -262,7 +257,7 @@ const InvitationQR = ({ id, url, onCancel }: { id: string; url: string; onCancel
|
|
|
262
257
|
};
|
|
263
258
|
|
|
264
259
|
const InvitationAuthCode = ({ id, code, onCancel }: { id: string; code: string; onCancel?: () => void }) => {
|
|
265
|
-
const { t } = useTranslation(
|
|
260
|
+
const { t } = useTranslation(shellTranslationKey);
|
|
266
261
|
const emoji = hexToEmoji(id);
|
|
267
262
|
|
|
268
263
|
return (
|
|
@@ -12,7 +12,7 @@ import { DropdownMenu, Icon, toLocalizedString, useTranslation } from '@dxos/rea
|
|
|
12
12
|
import { meta } from '../meta';
|
|
13
13
|
import { getSpaceDisplayName } from '../util';
|
|
14
14
|
|
|
15
|
-
export const MenuFooter = ({ object }: { object: Obj.
|
|
15
|
+
export const MenuFooter = ({ object }: { object: Obj.Unknown }) => {
|
|
16
16
|
const { t } = useTranslation(meta.id);
|
|
17
17
|
const client = useClient();
|
|
18
18
|
const space = getSpace(object);
|
|
@@ -4,10 +4,13 @@
|
|
|
4
4
|
|
|
5
5
|
import React, { forwardRef } from 'react';
|
|
6
6
|
|
|
7
|
-
import {
|
|
7
|
+
import { Obj } from '@dxos/echo';
|
|
8
|
+
import { Filter, useQuery, useSchema } from '@dxos/react-client/echo';
|
|
8
9
|
import { Callout, Toolbar, useTranslation } from '@dxos/react-ui';
|
|
10
|
+
import { Layout } from '@dxos/react-ui';
|
|
9
11
|
import { useSelected } from '@dxos/react-ui-attention';
|
|
10
|
-
import { Card
|
|
12
|
+
import { Card } from '@dxos/react-ui-mosaic';
|
|
13
|
+
import { CardStack, StackItem } from '@dxos/react-ui-stack';
|
|
11
14
|
import { type View, getTypenameFromQuery } from '@dxos/schema';
|
|
12
15
|
import { isNonNullable } from '@dxos/util';
|
|
13
16
|
|
|
@@ -16,17 +19,17 @@ import { meta } from '../../meta';
|
|
|
16
19
|
import { ObjectForm } from './ObjectForm';
|
|
17
20
|
|
|
18
21
|
export type ObjectCardStackProps = {
|
|
19
|
-
objectId: string;
|
|
20
22
|
view: View.View;
|
|
23
|
+
objectId: string;
|
|
21
24
|
};
|
|
22
25
|
|
|
23
26
|
export const ObjectCardStack = forwardRef<HTMLDivElement, ObjectCardStackProps>(({ objectId, view }, forwardedRef) => {
|
|
24
27
|
const { t } = useTranslation(meta.id);
|
|
25
|
-
const
|
|
28
|
+
const db = Obj.getDatabase(view);
|
|
26
29
|
const typename = view.query ? getTypenameFromQuery(view.query.ast) : undefined;
|
|
27
|
-
const schema = useSchema(
|
|
30
|
+
const schema = useSchema(db, typename);
|
|
28
31
|
|
|
29
|
-
const queriedObjects = useQuery(
|
|
32
|
+
const queriedObjects = useQuery(db, schema ? Filter.type(schema) : Filter.nothing());
|
|
30
33
|
const selectedRows = useSelected(objectId, 'multi');
|
|
31
34
|
const selectedObjects = selectedRows.map((id) => queriedObjects.find((obj) => obj.id === id)).filter(isNonNullable);
|
|
32
35
|
|
|
@@ -35,7 +38,7 @@ export const ObjectCardStack = forwardRef<HTMLDivElement, ObjectCardStackProps>(
|
|
|
35
38
|
}
|
|
36
39
|
|
|
37
40
|
return (
|
|
38
|
-
<
|
|
41
|
+
<Layout.Main toolbar ref={forwardedRef}>
|
|
39
42
|
<Toolbar.Root></Toolbar.Root>
|
|
40
43
|
<CardStack.Root asChild>
|
|
41
44
|
<CardStack.Content>
|
|
@@ -50,15 +53,15 @@ export const ObjectCardStack = forwardRef<HTMLDivElement, ObjectCardStackProps>(
|
|
|
50
53
|
{selectedObjects.map((object) => (
|
|
51
54
|
<CardStack.Item key={object.id} asChild>
|
|
52
55
|
<StackItem.Root item={object}>
|
|
53
|
-
<Card.
|
|
56
|
+
<Card.Root>
|
|
54
57
|
<ObjectForm object={object} schema={schema} />
|
|
55
|
-
</Card.
|
|
58
|
+
</Card.Root>
|
|
56
59
|
</StackItem.Root>
|
|
57
60
|
</CardStack.Item>
|
|
58
61
|
))}
|
|
59
62
|
</CardStack.Stack>
|
|
60
63
|
</CardStack.Content>
|
|
61
64
|
</CardStack.Root>
|
|
62
|
-
</
|
|
65
|
+
</Layout.Main>
|
|
63
66
|
);
|
|
64
67
|
});
|
|
@@ -6,23 +6,20 @@ import * as Schema from 'effect/Schema';
|
|
|
6
6
|
import React, { useCallback, useMemo } from 'react';
|
|
7
7
|
|
|
8
8
|
import { DXN, Obj, type Ref, Tag, Type } from '@dxos/echo';
|
|
9
|
-
import { type JsonPath,
|
|
9
|
+
import { type JsonPath, splitJsonPath } from '@dxos/echo/internal';
|
|
10
10
|
import { invariant } from '@dxos/invariant';
|
|
11
|
-
import {
|
|
12
|
-
import { Form, omitId, useRefQueryOptions } from '@dxos/react-ui-form';
|
|
11
|
+
import { Form, omitId } from '@dxos/react-ui-form';
|
|
13
12
|
import { isNonNullable } from '@dxos/util';
|
|
14
13
|
|
|
15
14
|
import { meta as pluginMeta } from '../../meta';
|
|
16
15
|
|
|
17
|
-
const TagSchema = Tag.Tag.pipe(Schema.omit('id'));
|
|
18
|
-
|
|
19
16
|
export type ObjectFormProps = {
|
|
20
17
|
schema: Schema.Schema.AnyNoContext;
|
|
21
|
-
object: Obj.
|
|
18
|
+
object: Obj.Unknown;
|
|
22
19
|
};
|
|
23
20
|
|
|
24
21
|
export const ObjectForm = ({ object, schema }: ObjectFormProps) => {
|
|
25
|
-
const
|
|
22
|
+
const db = Obj.getDatabase(object);
|
|
26
23
|
|
|
27
24
|
const formSchema = useMemo(
|
|
28
25
|
() =>
|
|
@@ -33,16 +30,18 @@ export const ObjectForm = ({ object, schema }: ObjectFormProps) => {
|
|
|
33
30
|
);
|
|
34
31
|
|
|
35
32
|
const meta = Obj.getMeta(object);
|
|
36
|
-
const tags = (meta.tags ?? []).map((tag) =>
|
|
33
|
+
const tags = (meta.tags ?? []).map((tag) => db?.makeRef(DXN.parse(tag))).filter(isNonNullable);
|
|
37
34
|
const values = useMemo(() => ({ tags, ...object }), [object, tags]);
|
|
38
35
|
|
|
39
|
-
const
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
36
|
+
const handleCreate = useCallback((schema: Type.Entity.Any, values: any) => {
|
|
37
|
+
invariant(db);
|
|
38
|
+
invariant(Type.isObjectSchema(schema));
|
|
39
|
+
const newObject = db.add(Obj.make(schema, values));
|
|
40
|
+
if (Obj.instanceOf(Tag.Tag, newObject)) {
|
|
41
|
+
Obj.change(object, (obj) => {
|
|
42
|
+
Obj.getMeta(obj).tags = [...(Obj.getMeta(obj).tags ?? []), Obj.getDXN(newObject).toString()];
|
|
43
|
+
});
|
|
44
|
+
}
|
|
46
45
|
}, []);
|
|
47
46
|
|
|
48
47
|
// TODO(wittjosiah): Use FormRootProps type.
|
|
@@ -53,16 +52,25 @@ export const ObjectForm = ({ object, schema }: ObjectFormProps) => {
|
|
|
53
52
|
}
|
|
54
53
|
|
|
55
54
|
const changedPaths = Object.keys(changed).filter((path) => changed[path as JsonPath]) as JsonPath[];
|
|
56
|
-
for (const path of changedPaths) {
|
|
57
|
-
// TODO(wittjosiah): This doesn't handle array paths well.
|
|
58
|
-
if (path.startsWith('tags')) {
|
|
59
|
-
const meta = Obj.getMeta(object);
|
|
60
|
-
meta.tags = tags?.map((tag: Ref.Ref<Tag.Tag>) => tag.dxn.toString()) ?? [];
|
|
61
|
-
continue;
|
|
62
|
-
}
|
|
63
55
|
|
|
64
|
-
|
|
65
|
-
|
|
56
|
+
// Handle tags separately using Obj.change.
|
|
57
|
+
const hasTagsChange = changedPaths.some((path) => splitJsonPath(path)[0] === 'tags');
|
|
58
|
+
if (hasTagsChange) {
|
|
59
|
+
Obj.change(object, (obj) => {
|
|
60
|
+
Obj.getMeta(obj).tags = tags?.map((tag: Ref.Ref<Tag.Tag>) => tag.dxn.toString()) ?? [];
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
// Handle other property changes.
|
|
65
|
+
const nonTagPaths = changedPaths.filter((path) => splitJsonPath(path)[0] !== 'tags');
|
|
66
|
+
if (nonTagPaths.length > 0) {
|
|
67
|
+
Obj.change(object, () => {
|
|
68
|
+
for (const path of nonTagPaths) {
|
|
69
|
+
const parts = splitJsonPath(path);
|
|
70
|
+
const value = Obj.getValue(values, parts);
|
|
71
|
+
Obj.setValue(object, parts, value);
|
|
72
|
+
}
|
|
73
|
+
});
|
|
66
74
|
}
|
|
67
75
|
},
|
|
68
76
|
[object],
|
|
@@ -72,13 +80,12 @@ export const ObjectForm = ({ object, schema }: ObjectFormProps) => {
|
|
|
72
80
|
<Form.Root
|
|
73
81
|
schema={omitId(formSchema)}
|
|
74
82
|
values={values}
|
|
75
|
-
createSchema={TagSchema}
|
|
76
83
|
createOptionIcon='ph--plus--regular'
|
|
77
84
|
createOptionLabel={['add tag label', { ns: pluginMeta.id }]}
|
|
78
85
|
createInitialValuePath='label'
|
|
86
|
+
db={db}
|
|
79
87
|
onValuesChanged={handleChange}
|
|
80
|
-
onCreate={
|
|
81
|
-
onQueryRefOptions={handleRefQueryLookup}
|
|
88
|
+
onCreate={handleCreate}
|
|
82
89
|
>
|
|
83
90
|
<Form.Viewport>
|
|
84
91
|
<Form.Content>
|
|
@@ -6,23 +6,23 @@ import { type Meta, type StoryObj } from '@storybook/react-vite';
|
|
|
6
6
|
import React, { useEffect, useState } from 'react';
|
|
7
7
|
|
|
8
8
|
import { type Obj, Tag } from '@dxos/echo';
|
|
9
|
-
import {
|
|
9
|
+
import { useClientStory, withClientProvider } from '@dxos/react-client/testing';
|
|
10
10
|
import { withTheme } from '@dxos/react-ui/testing';
|
|
11
11
|
import { render } from '@dxos/storybook-utils';
|
|
12
|
-
import {
|
|
12
|
+
import { Pipeline } from '@dxos/types';
|
|
13
13
|
|
|
14
14
|
import { translations } from '../../translations';
|
|
15
15
|
|
|
16
16
|
import { BaseObjectSettings } from './BaseObjectSettings';
|
|
17
17
|
|
|
18
18
|
const DefaultStory = () => {
|
|
19
|
-
const { space } =
|
|
20
|
-
const [object, setObject] = useState<Obj.
|
|
19
|
+
const { space } = useClientStory();
|
|
20
|
+
const [object, setObject] = useState<Obj.Unknown>();
|
|
21
21
|
|
|
22
22
|
useEffect(() => {
|
|
23
23
|
if (space && !object) {
|
|
24
|
-
const object = space.db.add(
|
|
25
|
-
setObject(object
|
|
24
|
+
const object = space.db.add(Pipeline.make());
|
|
25
|
+
setObject(object);
|
|
26
26
|
}
|
|
27
27
|
}, [space, object]);
|
|
28
28
|
|
|
@@ -38,11 +38,11 @@ const meta = {
|
|
|
38
38
|
component: BaseObjectSettings as any,
|
|
39
39
|
render: render(DefaultStory),
|
|
40
40
|
decorators: [
|
|
41
|
-
withTheme,
|
|
41
|
+
withTheme(),
|
|
42
42
|
withClientProvider({
|
|
43
43
|
createIdentity: true,
|
|
44
44
|
createSpace: true,
|
|
45
|
-
types: [
|
|
45
|
+
types: [Pipeline.Pipeline, Tag.Tag],
|
|
46
46
|
onCreateSpace: async ({ space }) => {
|
|
47
47
|
space.db.add(Tag.make({ label: 'Tag 1' }));
|
|
48
48
|
space.db.add(Tag.make({ label: 'Tag 2' }));
|
|
@@ -2,18 +2,16 @@
|
|
|
2
2
|
// Copyright 2024 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import { batch } from '@preact/signals-core';
|
|
6
5
|
import * as Function from 'effect/Function';
|
|
7
6
|
import * as Option from 'effect/Option';
|
|
8
7
|
import * as Schema from 'effect/Schema';
|
|
9
8
|
import React, { type PropsWithChildren, useCallback, useMemo } from 'react';
|
|
10
9
|
|
|
11
10
|
import { DXN, Obj, type Ref, Tag, Type } from '@dxos/echo';
|
|
12
|
-
import { type JsonPath,
|
|
11
|
+
import { type JsonPath, splitJsonPath } from '@dxos/echo/internal';
|
|
13
12
|
import { invariant } from '@dxos/invariant';
|
|
14
|
-
import { getSpace } from '@dxos/react-client/echo';
|
|
15
13
|
import { type ThemedClassName } from '@dxos/react-ui';
|
|
16
|
-
import { Form, omitId
|
|
14
|
+
import { Form, omitId } from '@dxos/react-ui-form';
|
|
17
15
|
import { isNonNullable } from '@dxos/util';
|
|
18
16
|
|
|
19
17
|
import { meta as pluginMeta } from '../../meta';
|
|
@@ -23,19 +21,15 @@ const BaseSchema = Schema.Struct({
|
|
|
23
21
|
tags: Schema.Array(Type.Ref(Tag.Tag)).pipe(Schema.optional),
|
|
24
22
|
});
|
|
25
23
|
|
|
26
|
-
// TODO(wittjosiah): Better way to support validation of object schemas?
|
|
27
|
-
const TagSchema = Tag.Tag.pipe(Schema.omit('id'));
|
|
28
|
-
|
|
29
24
|
export type BaseObjectSettingsProps = ThemedClassName<
|
|
30
25
|
PropsWithChildren<{
|
|
31
|
-
object: Obj.
|
|
26
|
+
object: Obj.Unknown;
|
|
32
27
|
}>
|
|
33
28
|
>;
|
|
34
29
|
|
|
35
30
|
// TODO(wittjosiah): Reconcile w/ ObjectDetailsPanel.
|
|
36
31
|
export const BaseObjectSettings = ({ classNames, children, object }: BaseObjectSettingsProps) => {
|
|
37
|
-
const
|
|
38
|
-
const handleRefQueryLookup = useRefQueryOptions({ space });
|
|
32
|
+
const db = Obj.getDatabase(object);
|
|
39
33
|
|
|
40
34
|
const formSchema = useMemo(() => {
|
|
41
35
|
return Function.pipe(
|
|
@@ -47,7 +41,7 @@ export const BaseObjectSettings = ({ classNames, children, object }: BaseObjectS
|
|
|
47
41
|
}, [object]);
|
|
48
42
|
|
|
49
43
|
const meta = Obj.getMeta(object);
|
|
50
|
-
const tags = (meta.tags ?? []).map((tag) =>
|
|
44
|
+
const tags = (meta.tags ?? []).map((tag) => db?.makeRef(DXN.parse(tag))).filter(isNonNullable);
|
|
51
45
|
const values = useMemo(
|
|
52
46
|
() => ({
|
|
53
47
|
tags,
|
|
@@ -56,11 +50,15 @@ export const BaseObjectSettings = ({ classNames, children, object }: BaseObjectS
|
|
|
56
50
|
[object, tags],
|
|
57
51
|
);
|
|
58
52
|
|
|
59
|
-
const
|
|
60
|
-
invariant(
|
|
61
|
-
|
|
62
|
-
const
|
|
63
|
-
|
|
53
|
+
const handleCreate = useCallback((schema: Type.Entity.Any, values: any) => {
|
|
54
|
+
invariant(db);
|
|
55
|
+
invariant(Type.isObjectSchema(schema));
|
|
56
|
+
const newObject = db.add(Obj.make(schema, values));
|
|
57
|
+
if (Obj.instanceOf(Tag.Tag, newObject)) {
|
|
58
|
+
Obj.change(object, (obj) => {
|
|
59
|
+
Obj.getMeta(obj).tags = [...(Obj.getMeta(obj).tags ?? []), Obj.getDXN(newObject).toString()];
|
|
60
|
+
});
|
|
61
|
+
}
|
|
64
62
|
}, []);
|
|
65
63
|
|
|
66
64
|
// TODO(wittjosiah): Use FormRootProps type.
|
|
@@ -74,19 +72,26 @@ export const BaseObjectSettings = ({ classNames, children, object }: BaseObjectS
|
|
|
74
72
|
}
|
|
75
73
|
|
|
76
74
|
const changedPaths = Object.keys(changed).filter((path) => changed[path as JsonPath]) as JsonPath[];
|
|
77
|
-
batch(() => {
|
|
78
|
-
for (const path of changedPaths) {
|
|
79
|
-
// TODO(wittjosiah): This doesn't handle array paths well.
|
|
80
|
-
if (path.startsWith('tags')) {
|
|
81
|
-
const meta = Obj.getMeta(object);
|
|
82
|
-
meta.tags = tags?.map((tag: Ref.Ref<Tag.Tag>) => tag.dxn.toString()) ?? [];
|
|
83
|
-
continue;
|
|
84
|
-
}
|
|
85
75
|
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
76
|
+
// Handle tags separately using Obj.change.
|
|
77
|
+
const hasTagsChange = changedPaths.some((path) => splitJsonPath(path)[0] === 'tags');
|
|
78
|
+
if (hasTagsChange) {
|
|
79
|
+
Obj.change(object, (obj) => {
|
|
80
|
+
Obj.getMeta(obj).tags = tags?.map((tag: Ref.Ref<Tag.Tag>) => tag.dxn.toString()) ?? [];
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
// Handle other property changes.
|
|
85
|
+
const nonTagPaths = changedPaths.filter((path) => splitJsonPath(path)[0] !== 'tags');
|
|
86
|
+
if (nonTagPaths.length > 0) {
|
|
87
|
+
Obj.change(object, () => {
|
|
88
|
+
for (const path of nonTagPaths) {
|
|
89
|
+
const parts = splitJsonPath(path);
|
|
90
|
+
const value = Obj.getValue(values, parts);
|
|
91
|
+
Obj.setValue(object, parts, value);
|
|
92
|
+
}
|
|
93
|
+
});
|
|
94
|
+
}
|
|
90
95
|
},
|
|
91
96
|
[object],
|
|
92
97
|
);
|
|
@@ -99,13 +104,12 @@ export const BaseObjectSettings = ({ classNames, children, object }: BaseObjectS
|
|
|
99
104
|
<Form.Root
|
|
100
105
|
schema={omitId(formSchema)}
|
|
101
106
|
values={values}
|
|
102
|
-
createSchema={TagSchema}
|
|
103
107
|
createOptionIcon='ph--plus--regular'
|
|
104
108
|
createOptionLabel={['add tag label', { ns: pluginMeta.id }]}
|
|
105
109
|
createInitialValuePath='label'
|
|
110
|
+
db={db}
|
|
106
111
|
onValuesChanged={handleChange}
|
|
107
|
-
onCreate={
|
|
108
|
-
onQueryRefOptions={handleRefQueryLookup}
|
|
112
|
+
onCreate={handleCreate}
|
|
109
113
|
>
|
|
110
114
|
<Form.Viewport>
|
|
111
115
|
<Form.Content classNames={classNames}>
|
|
@@ -4,32 +4,30 @@
|
|
|
4
4
|
|
|
5
5
|
import React, { forwardRef, useMemo } from 'react';
|
|
6
6
|
|
|
7
|
-
import { Surface } from '@dxos/app-framework/
|
|
7
|
+
import { Surface } from '@dxos/app-framework/ui';
|
|
8
|
+
import { type SurfaceComponentProps } from '@dxos/app-toolkit/ui';
|
|
8
9
|
import { type Obj } from '@dxos/echo';
|
|
9
10
|
import { Toolbar } from '@dxos/react-ui';
|
|
10
|
-
import {
|
|
11
|
+
import { Layout } from '@dxos/react-ui';
|
|
11
12
|
|
|
12
13
|
import { BaseObjectSettings } from './BaseObjectSettings';
|
|
13
14
|
|
|
14
|
-
export type ObjectDetailsProps =
|
|
15
|
-
object: Obj.Any;
|
|
16
|
-
role: string;
|
|
17
|
-
};
|
|
15
|
+
export type ObjectDetailsProps = SurfaceComponentProps<Obj.Unknown>;
|
|
18
16
|
|
|
19
17
|
export const ObjectDetails = forwardRef<HTMLDivElement, ObjectDetailsProps>(
|
|
20
|
-
({ object }
|
|
18
|
+
({ role, subject: object }, forwardedRef) => {
|
|
21
19
|
const data = useMemo(() => ({ subject: object }), [object]);
|
|
22
20
|
|
|
23
21
|
return (
|
|
24
|
-
<
|
|
22
|
+
<Layout.Main toolbar role={role} ref={forwardedRef}>
|
|
25
23
|
<Toolbar.Root />
|
|
26
24
|
<BaseObjectSettings object={object}>
|
|
27
|
-
<Surface role='base-object-settings' data={data} />
|
|
28
|
-
<Surface role='object-settings' data={data} />
|
|
25
|
+
<Surface.Surface role='base-object-settings' data={data} />
|
|
26
|
+
<Surface.Surface role='object-settings' data={data} />
|
|
29
27
|
{/* TODO(wittjosiah): Remove (or add as surface)? */}
|
|
30
28
|
{/* <AdvancedObjectSettings object={object} /> */}
|
|
31
29
|
</BaseObjectSettings>
|
|
32
|
-
</
|
|
30
|
+
</Layout.Main>
|
|
33
31
|
);
|
|
34
32
|
},
|
|
35
33
|
);
|