@dxos/plugin-space 0.8.4-main.66e292d → 0.8.4-main.69d29f4
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-XPNA6EHZ.mjs +129 -0
- package/dist/lib/browser/CollectionArticle-XPNA6EHZ.mjs.map +7 -0
- package/dist/lib/browser/ObjectCardStack-TWHN6C2Y.mjs +148 -0
- package/dist/lib/browser/ObjectCardStack-TWHN6C2Y.mjs.map +7 -0
- package/dist/lib/browser/ObjectDetails-GEDIISKK.mjs +142 -0
- package/dist/lib/browser/ObjectDetails-GEDIISKK.mjs.map +7 -0
- package/dist/lib/browser/RecordArticle-W57QE7QV.mjs +107 -0
- package/dist/lib/browser/RecordArticle-W57QE7QV.mjs.map +7 -0
- package/dist/lib/browser/app-graph-builder-SJHTZXZF.mjs +523 -0
- package/dist/lib/browser/app-graph-builder-SJHTZXZF.mjs.map +7 -0
- package/dist/lib/browser/app-graph-serializer-7AT7QMSK.mjs +84 -0
- package/dist/lib/browser/app-graph-serializer-7AT7QMSK.mjs.map +7 -0
- package/dist/lib/browser/chunk-3X2EA2OA.mjs +1898 -0
- package/dist/lib/browser/chunk-3X2EA2OA.mjs.map +7 -0
- package/dist/lib/browser/{chunk-P25R3AOK.mjs → chunk-4WZUGLQQ.mjs} +49 -56
- package/dist/lib/browser/chunk-4WZUGLQQ.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-AWVAX26X.mjs +13 -0
- package/dist/lib/browser/chunk-AWVAX26X.mjs.map +7 -0
- package/dist/lib/browser/chunk-CCRSHECL.mjs +714 -0
- package/dist/lib/browser/chunk-CCRSHECL.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-GJOZILGC.mjs → chunk-SUI34XSA.mjs} +204 -200
- package/dist/lib/browser/chunk-SUI34XSA.mjs.map +7 -0
- package/dist/lib/browser/{chunk-POFUXISV.mjs → chunk-ZT2VPYRM.mjs} +4 -3
- package/dist/lib/browser/{chunk-POFUXISV.mjs.map → chunk-ZT2VPYRM.mjs.map} +2 -2
- package/dist/lib/browser/cli/index.mjs +849 -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 +213 -192
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/operation-resolver-SIRQT36Z.mjs +827 -0
- package/dist/lib/browser/operation-resolver-SIRQT36Z.mjs.map +7 -0
- package/dist/lib/browser/react-root-PI7VTZUZ.mjs +30 -0
- package/dist/lib/browser/react-root-PI7VTZUZ.mjs.map +7 -0
- package/dist/lib/browser/react-surface-BPE7VWI7.mjs +382 -0
- package/dist/lib/browser/react-surface-BPE7VWI7.mjs.map +7 -0
- package/dist/lib/browser/{repair-CNLE35NF.mjs → repair-CJG26D52.mjs} +16 -10
- package/dist/lib/browser/repair-CJG26D52.mjs.map +7 -0
- package/dist/lib/browser/settings-ZS2AQ73E.mjs +33 -0
- package/dist/lib/browser/settings-ZS2AQ73E.mjs.map +7 -0
- package/dist/lib/browser/spaces-ready-OQDGWUOS.mjs +242 -0
- package/dist/lib/browser/spaces-ready-OQDGWUOS.mjs.map +7 -0
- package/dist/lib/browser/state-7YZQB2KY.mjs +58 -0
- package/dist/lib/browser/state-7YZQB2KY.mjs.map +7 -0
- package/dist/lib/browser/types/index.mjs +10 -8
- package/dist/lib/node-esm/CollectionArticle-WGHNZNO2.mjs +130 -0
- package/dist/lib/node-esm/CollectionArticle-WGHNZNO2.mjs.map +7 -0
- package/dist/lib/node-esm/ObjectCardStack-C5ZXRKP7.mjs +149 -0
- package/dist/lib/node-esm/ObjectCardStack-C5ZXRKP7.mjs.map +7 -0
- package/dist/lib/node-esm/ObjectDetails-6ZLDRKCO.mjs +143 -0
- package/dist/lib/node-esm/ObjectDetails-6ZLDRKCO.mjs.map +7 -0
- package/dist/lib/node-esm/RecordArticle-SSV74Z46.mjs +108 -0
- package/dist/lib/node-esm/RecordArticle-SSV74Z46.mjs.map +7 -0
- package/dist/lib/node-esm/app-graph-builder-HZ3XXDFZ.mjs +524 -0
- package/dist/lib/node-esm/app-graph-builder-HZ3XXDFZ.mjs.map +7 -0
- package/dist/lib/node-esm/app-graph-serializer-WJ2TIQG6.mjs +85 -0
- package/dist/lib/node-esm/app-graph-serializer-WJ2TIQG6.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-AX3UGL5D.mjs → chunk-2SW6S2BB.mjs} +4 -3
- package/dist/lib/node-esm/{chunk-AX3UGL5D.mjs.map → chunk-2SW6S2BB.mjs.map} +2 -2
- package/dist/lib/node-esm/{chunk-I6FZP42D.mjs → chunk-7KMYUWSR.mjs} +204 -200
- package/dist/lib/node-esm/chunk-7KMYUWSR.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-EYS3L2NO.mjs +1899 -0
- package/dist/lib/node-esm/chunk-EYS3L2NO.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-HREWB23G.mjs +15 -0
- package/dist/lib/node-esm/chunk-HREWB23G.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-7EV4SN47.mjs → chunk-JOBIWCBC.mjs} +49 -56
- package/dist/lib/node-esm/chunk-JOBIWCBC.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-MPL6NHQX.mjs +715 -0
- package/dist/lib/node-esm/chunk-MPL6NHQX.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 +850 -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 +213 -192
- 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-ZE3XJL5J.mjs +828 -0
- package/dist/lib/node-esm/operation-resolver-ZE3XJL5J.mjs.map +7 -0
- package/dist/lib/node-esm/react-root-KUXM33JI.mjs +31 -0
- package/dist/lib/node-esm/react-root-KUXM33JI.mjs.map +7 -0
- package/dist/lib/node-esm/react-surface-STCQKUZ4.mjs +383 -0
- package/dist/lib/node-esm/react-surface-STCQKUZ4.mjs.map +7 -0
- package/dist/lib/node-esm/{repair-EHZS6MFY.mjs → repair-G3ZW3VG3.mjs} +16 -10
- package/dist/lib/node-esm/repair-G3ZW3VG3.mjs.map +7 -0
- package/dist/lib/node-esm/settings-PVI2VG56.mjs +34 -0
- package/dist/lib/node-esm/settings-PVI2VG56.mjs.map +7 -0
- package/dist/lib/node-esm/spaces-ready-R744OHQG.mjs +243 -0
- package/dist/lib/node-esm/spaces-ready-R744OHQG.mjs.map +7 -0
- package/dist/lib/node-esm/state-XE5YGPHM.mjs +59 -0
- package/dist/lib/node-esm/state-XE5YGPHM.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 +6 -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 +9 -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 +5 -2
- package/dist/types/src/components/CollectionArticle.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 +16 -6
- package/dist/types/src/components/CreateDialog/CreateObjectDialog.stories.d.ts.map +1 -1
- package/dist/types/src/components/CreateDialog/CreateObjectPanel.d.ts +5 -4
- 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 +10 -1
- 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 +8 -0
- package/dist/types/src/components/ObjectCardStack/ObjectCardStack.d.ts.map +1 -0
- package/dist/types/src/components/{ObjectDetailsPanel → ObjectCardStack}/ObjectForm.d.ts +2 -3
- package/dist/types/src/components/ObjectCardStack/ObjectForm.d.ts.map +1 -0
- package/dist/types/src/components/ObjectCardStack/index.d.ts +3 -0
- package/dist/types/src/components/ObjectCardStack/index.d.ts.map +1 -0
- package/dist/types/src/components/{ObjectSettings → ObjectDetails}/BaseObjectSettings.d.ts +1 -1
- package/dist/types/src/components/ObjectDetails/BaseObjectSettings.d.ts.map +1 -0
- package/dist/types/src/components/{ObjectSettings → ObjectDetails}/BaseObjectSettings.stories.d.ts +9 -0
- package/dist/types/src/components/{ObjectSettings → ObjectDetails}/BaseObjectSettings.stories.d.ts.map +1 -1
- package/dist/types/src/components/ObjectDetails/ForeignKeys.d.ts.map +1 -0
- package/dist/types/src/components/ObjectDetails/ObjectDetails.d.ts +9 -0
- package/dist/types/src/components/ObjectDetails/ObjectDetails.d.ts.map +1 -0
- package/dist/types/src/components/ObjectDetails/index.d.ts +3 -0
- package/dist/types/src/components/ObjectDetails/index.d.ts.map +1 -0
- 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 +1 -1
- package/dist/types/src/components/RecordArticle.d.ts.map +1 -1
- package/dist/types/src/components/RecordArticle.stories.d.ts +10 -1
- package/dist/types/src/components/RecordArticle.stories.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 +1 -1
- package/dist/types/src/components/SpaceSettings/SpaceSettingsContainer.d.ts.map +1 -1
- package/dist/types/src/components/SpaceSettings/SpaceSettingsContainer.stories.d.ts +10 -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 +14 -10
- 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 -4
- 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/useInputSurfaceLookup.d.ts +2 -8
- package/dist/types/src/hooks/useInputSurfaceLookup.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/hooks/useTypeOptions.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/form.d.ts +1 -3
- package/dist/types/src/types/form.d.ts.map +1 -1
- 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 +638 -355
- package/dist/types/src/types/types.d.ts.map +1 -1
- package/dist/types/src/util.d.ts +35 -31
- package/dist/types/src/util.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +82 -69
- package/src/SpacePlugin.ts +153 -192
- package/src/capabilities/app-graph-builder/app-graph-builder.ts +617 -0
- package/src/capabilities/app-graph-builder/index.ts +7 -0
- package/src/capabilities/app-graph-serializer/app-graph-serializer.ts +82 -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 +760 -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 +375 -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 +32 -0
- package/src/capabilities/spaces-ready/index.ts +7 -0
- package/src/capabilities/spaces-ready/spaces-ready.ts +289 -0
- package/src/capabilities/state/index.ts +7 -0
- package/src/capabilities/state/state.ts +64 -0
- package/src/cli/commands/database/add.ts +116 -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 +81 -0
- package/src/components/AwaitingObject.tsx +13 -10
- package/src/components/CollectionArticle.tsx +144 -19
- package/src/components/CreateDialog/CreateObjectDialog.stories.tsx +27 -21
- package/src/components/CreateDialog/CreateObjectDialog.tsx +39 -47
- package/src/components/CreateDialog/CreateObjectPanel.tsx +125 -70
- package/src/components/CreateDialog/CreateSpaceDialog.tsx +34 -47
- package/src/components/JoinDialog/JoinDialog.tsx +25 -52
- package/src/components/MembersContainer/MembersContainer.stories.tsx +2 -2
- package/src/components/MembersContainer/MembersContainer.tsx +35 -37
- package/src/components/MenuFooter.tsx +1 -1
- package/src/components/ObjectCardStack/ObjectCardStack.tsx +67 -0
- package/src/components/ObjectCardStack/ObjectForm.tsx +97 -0
- package/src/components/ObjectCardStack/index.ts +7 -0
- package/src/components/{ObjectSettings → ObjectDetails}/BaseObjectSettings.stories.tsx +4 -4
- package/src/components/ObjectDetails/BaseObjectSettings.tsx +122 -0
- package/src/components/ObjectDetails/ObjectDetails.tsx +32 -0
- package/src/components/ObjectDetails/index.ts +7 -0
- package/src/components/ObjectRenamePopover/ObjectRenamePopover.tsx +9 -13
- package/src/components/RecordArticle.stories.tsx +12 -12
- package/src/components/RecordArticle.tsx +26 -18
- package/src/components/SchemaContainer.tsx +3 -3
- package/src/components/SpacePluginSettings.tsx +11 -7
- package/src/components/SpacePresence/SpacePresence.tsx +14 -16
- package/src/components/SpaceRenamePopover/SpaceRenamePopover.tsx +11 -12
- package/src/components/SpaceSettings/SpaceSettingsContainer.stories.tsx +4 -4
- package/src/components/SpaceSettings/SpaceSettingsContainer.tsx +180 -184
- package/src/components/SyncStatus/SyncStatus.tsx +1 -1
- package/src/components/SyncStatus/save-tracker.ts +2 -2
- package/src/components/ViewEditor.tsx +16 -13
- package/src/components/index.ts +5 -5
- package/src/constants.ts +11 -0
- package/src/helpers/query.ts +7 -12
- package/src/hooks/useActiveSpace.ts +6 -4
- package/src/hooks/useInputSurfaceLookup.tsx +8 -17
- package/src/hooks/usePath.ts +4 -4
- package/src/hooks/useTypeOptions.ts +1 -3
- package/src/index.ts +1 -2
- package/src/meta.ts +2 -2
- package/src/translations.ts +2 -0
- package/src/types/capabilities.ts +73 -0
- package/src/types/events.ts +15 -0
- package/src/types/form.ts +26 -32
- package/src/types/index.ts +2 -0
- package/src/types/types.ts +528 -247
- package/src/util.tsx +219 -231
- package/dist/lib/browser/CollectionArticle-WTHWY4YS.mjs +0 -31
- package/dist/lib/browser/CollectionArticle-WTHWY4YS.mjs.map +0 -7
- package/dist/lib/browser/ObjectDetailsPanel-ACGHWPDX.mjs +0 -141
- package/dist/lib/browser/ObjectDetailsPanel-ACGHWPDX.mjs.map +0 -7
- package/dist/lib/browser/ObjectSettings-U3IH7BMV.mjs +0 -144
- package/dist/lib/browser/ObjectSettings-U3IH7BMV.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-HABMCWAI.mjs +0 -517
- package/dist/lib/browser/app-graph-builder-HABMCWAI.mjs.map +0 -7
- package/dist/lib/browser/app-graph-serializer-G3VFEGTN.mjs +0 -80
- package/dist/lib/browser/app-graph-serializer-G3VFEGTN.mjs.map +0 -7
- package/dist/lib/browser/chunk-6A3NWBB6.mjs +0 -392
- package/dist/lib/browser/chunk-6A3NWBB6.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-GJOZILGC.mjs.map +0 -7
- package/dist/lib/browser/chunk-KCZ527AM.mjs +0 -2126
- package/dist/lib/browser/chunk-KCZ527AM.mjs.map +0 -7
- package/dist/lib/browser/chunk-P25R3AOK.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/identity-created-NAXTPQXE.mjs +0 -23
- package/dist/lib/browser/identity-created-NAXTPQXE.mjs.map +0 -7
- package/dist/lib/browser/intent-resolver-RZEWNJ2K.mjs +0 -773
- package/dist/lib/browser/intent-resolver-RZEWNJ2K.mjs.map +0 -7
- package/dist/lib/browser/react-root-JCRD74GI.mjs +0 -30
- package/dist/lib/browser/react-root-JCRD74GI.mjs.map +0 -7
- package/dist/lib/browser/react-surface-VOETEAG3.mjs +0 -365
- package/dist/lib/browser/react-surface-VOETEAG3.mjs.map +0 -7
- package/dist/lib/browser/repair-CNLE35NF.mjs.map +0 -7
- package/dist/lib/browser/settings-TRLI52I5.mjs +0 -24
- package/dist/lib/browser/settings-TRLI52I5.mjs.map +0 -7
- package/dist/lib/browser/spaces-ready-OHGCWZHQ.mjs +0 -208
- package/dist/lib/browser/spaces-ready-OHGCWZHQ.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/ObjectDetailsPanel-6OFTT3GG.mjs +0 -142
- package/dist/lib/node-esm/ObjectDetailsPanel-6OFTT3GG.mjs.map +0 -7
- package/dist/lib/node-esm/ObjectSettings-YXPJQMJ5.mjs +0 -145
- package/dist/lib/node-esm/ObjectSettings-YXPJQMJ5.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-T6VJKIOA.mjs +0 -518
- package/dist/lib/node-esm/app-graph-builder-T6VJKIOA.mjs.map +0 -7
- package/dist/lib/node-esm/app-graph-serializer-2NLWWFUB.mjs +0 -81
- package/dist/lib/node-esm/app-graph-serializer-2NLWWFUB.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-7EV4SN47.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-I6FZP42D.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-JAMGJUFU.mjs +0 -2127
- package/dist/lib/node-esm/chunk-JAMGJUFU.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-X34VDVMY.mjs +0 -393
- package/dist/lib/node-esm/chunk-X34VDVMY.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-4PHJWDXW.mjs +0 -774
- package/dist/lib/node-esm/intent-resolver-4PHJWDXW.mjs.map +0 -7
- package/dist/lib/node-esm/react-root-O5I5CDJ7.mjs +0 -31
- package/dist/lib/node-esm/react-root-O5I5CDJ7.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-J3XDMU2D.mjs +0 -366
- package/dist/lib/node-esm/react-surface-J3XDMU2D.mjs.map +0 -7
- package/dist/lib/node-esm/repair-EHZS6MFY.mjs.map +0 -7
- package/dist/lib/node-esm/settings-MNQTKHL7.mjs +0 -25
- package/dist/lib/node-esm/settings-MNQTKHL7.mjs.map +0 -7
- package/dist/lib/node-esm/spaces-ready-ZPU24DA2.mjs +0 -209
- package/dist/lib/node-esm/spaces-ready-ZPU24DA2.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/components/ObjectDetailsPanel/ObjectDetailsPanel.d.ts +0 -9
- package/dist/types/src/components/ObjectDetailsPanel/ObjectDetailsPanel.d.ts.map +0 -1
- package/dist/types/src/components/ObjectDetailsPanel/ObjectForm.d.ts.map +0 -1
- package/dist/types/src/components/ObjectDetailsPanel/index.d.ts +0 -3
- package/dist/types/src/components/ObjectDetailsPanel/index.d.ts.map +0 -1
- package/dist/types/src/components/ObjectSettings/AdvancedObjectSettings.d.ts +0 -7
- package/dist/types/src/components/ObjectSettings/AdvancedObjectSettings.d.ts.map +0 -1
- package/dist/types/src/components/ObjectSettings/BaseObjectSettings.d.ts.map +0 -1
- package/dist/types/src/components/ObjectSettings/ForeignKeys.d.ts.map +0 -1
- package/dist/types/src/components/ObjectSettings/ObjectSettingsContainer.d.ts +0 -8
- package/dist/types/src/components/ObjectSettings/ObjectSettingsContainer.d.ts.map +0 -1
- package/dist/types/src/components/ObjectSettings/index.d.ts +0 -3
- package/dist/types/src/components/ObjectSettings/index.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 -689
- 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 -706
- package/src/capabilities/react-root.tsx +0 -22
- package/src/capabilities/react-surface.tsx +0 -350
- package/src/capabilities/settings.ts +0 -21
- package/src/capabilities/spaces-ready.ts +0 -243
- package/src/capabilities/state.ts +0 -46
- package/src/components/ObjectDetailsPanel/ObjectDetailsPanel.tsx +0 -51
- package/src/components/ObjectDetailsPanel/ObjectForm.tsx +0 -72
- package/src/components/ObjectDetailsPanel/index.ts +0 -7
- package/src/components/ObjectSettings/AdvancedObjectSettings.tsx +0 -80
- package/src/components/ObjectSettings/BaseObjectSettings.tsx +0 -111
- package/src/components/ObjectSettings/ObjectSettingsContainer.tsx +0 -37
- package/src/components/ObjectSettings/index.ts +0 -7
- package/src/events.ts +0 -15
- /package/dist/types/src/components/{ObjectSettings → ObjectDetails}/ForeignKeys.d.ts +0 -0
- /package/src/components/{ObjectSettings → ObjectDetails}/ForeignKeys.tsx +0 -0
|
@@ -5,8 +5,7 @@
|
|
|
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/react';
|
|
10
9
|
import { Obj } from '@dxos/echo';
|
|
11
10
|
import { log } from '@dxos/log';
|
|
12
11
|
import { useConfig } from '@dxos/react-client';
|
|
@@ -14,7 +13,7 @@ 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
15
|
import { ControlFrame, ControlFrameItem, ControlItemInput, ControlPage, ControlSection } from '@dxos/react-ui-form';
|
|
17
|
-
import {
|
|
16
|
+
import { Layout } from '@dxos/react-ui-mosaic';
|
|
18
17
|
import { Collection } from '@dxos/schema';
|
|
19
18
|
import {
|
|
20
19
|
type ActionMenuItem,
|
|
@@ -25,11 +24,12 @@ import {
|
|
|
25
24
|
InvitationList,
|
|
26
25
|
SpaceMemberList,
|
|
27
26
|
Viewport,
|
|
27
|
+
translationKey as shellTranslationKey,
|
|
28
28
|
} from '@dxos/shell/react';
|
|
29
29
|
import { hexToEmoji } from '@dxos/util';
|
|
30
30
|
|
|
31
31
|
import { meta } from '../../meta';
|
|
32
|
-
import {
|
|
32
|
+
import { SpaceOperation } from '../../types';
|
|
33
33
|
import { COMPOSER_SPACE_LOCK } from '../../util';
|
|
34
34
|
|
|
35
35
|
// TODO(wittjosiah): Copied from Shell.
|
|
@@ -51,7 +51,7 @@ export type MembersContainerProps = {
|
|
|
51
51
|
export const MembersContainer = ({ space, createInvitationUrl }: MembersContainerProps) => {
|
|
52
52
|
const { t } = useTranslation(meta.id);
|
|
53
53
|
const config = useConfig();
|
|
54
|
-
const {
|
|
54
|
+
const { invokePromise } = useOperationInvoker();
|
|
55
55
|
const invitations = useSpaceInvitations(space.key);
|
|
56
56
|
const visibleInvitations = invitations?.filter(
|
|
57
57
|
(invitation) => ![Invitation.State.CANCELLED].includes(invitation.get().state),
|
|
@@ -69,57 +69,55 @@ export const MembersContainer = ({ space, createInvitationUrl }: MembersContaine
|
|
|
69
69
|
|
|
70
70
|
const locked = space.properties[COMPOSER_SPACE_LOCK];
|
|
71
71
|
const handleChangeLocked = useCallback(() => {
|
|
72
|
-
space.properties
|
|
72
|
+
Obj.change(space.properties, (p) => {
|
|
73
|
+
p[COMPOSER_SPACE_LOCK] = !locked;
|
|
74
|
+
});
|
|
73
75
|
}, [locked, space]);
|
|
74
76
|
|
|
75
77
|
const inviteActions = useMemo(
|
|
76
78
|
(): Record<string, ActionMenuItem> => ({
|
|
77
79
|
inviteOne: {
|
|
78
|
-
label: t('invite one label', { ns:
|
|
79
|
-
description: t('invite one description', { ns:
|
|
80
|
+
label: t('invite one label', { ns: shellTranslationKey }),
|
|
81
|
+
description: t('invite one description', { ns: shellTranslationKey }),
|
|
80
82
|
icon: 'ph--user-plus--regular',
|
|
81
83
|
testId: 'membersContainer.inviteOne',
|
|
82
84
|
onClick: async () => {
|
|
83
|
-
const { data: invitation } = await
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
}),
|
|
91
|
-
);
|
|
85
|
+
const { data: invitation } = await invokePromise(SpaceOperation.Share, {
|
|
86
|
+
space,
|
|
87
|
+
type: Invitation.Type.INTERACTIVE,
|
|
88
|
+
authMethod: Invitation.AuthMethod.SHARED_SECRET,
|
|
89
|
+
multiUse: false,
|
|
90
|
+
target: target && Obj.getDXN(target).toString(),
|
|
91
|
+
});
|
|
92
92
|
if (invitation && config.values.runtime?.app?.env?.DX_ENVIRONMENT !== 'production') {
|
|
93
|
-
const subscription: ZenObservable.Subscription = invitation.subscribe(
|
|
94
|
-
handleInvitationEvent(invitation, subscription),
|
|
93
|
+
const subscription: ZenObservable.Subscription = (invitation as CancellableInvitationObservable).subscribe(
|
|
94
|
+
(invitation: Invitation) => handleInvitationEvent(invitation, subscription),
|
|
95
95
|
);
|
|
96
96
|
}
|
|
97
97
|
},
|
|
98
98
|
},
|
|
99
99
|
inviteMany: {
|
|
100
|
-
label: t('invite many label', { ns:
|
|
101
|
-
description: t('invite many description', { ns:
|
|
100
|
+
label: t('invite many label', { ns: shellTranslationKey }),
|
|
101
|
+
description: t('invite many description', { ns: shellTranslationKey }),
|
|
102
102
|
icon: 'ph--users-three--regular',
|
|
103
103
|
testId: 'membersContainer.inviteMany',
|
|
104
104
|
onClick: async () => {
|
|
105
|
-
const { data: invitation } = await
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
}),
|
|
113
|
-
);
|
|
105
|
+
const { data: invitation } = await invokePromise(SpaceOperation.Share, {
|
|
106
|
+
space,
|
|
107
|
+
type: Invitation.Type.DELEGATED,
|
|
108
|
+
authMethod: Invitation.AuthMethod.KNOWN_PUBLIC_KEY,
|
|
109
|
+
multiUse: true,
|
|
110
|
+
target: target && Obj.getDXN(target).toString(),
|
|
111
|
+
});
|
|
114
112
|
if (invitation && config.values.runtime?.app?.env?.DX_ENVIRONMENT !== 'production') {
|
|
115
|
-
const subscription: ZenObservable.Subscription = invitation.subscribe(
|
|
116
|
-
handleInvitationEvent(invitation, subscription),
|
|
113
|
+
const subscription: ZenObservable.Subscription = (invitation as CancellableInvitationObservable).subscribe(
|
|
114
|
+
(invitation: Invitation) => handleInvitationEvent(invitation, subscription),
|
|
117
115
|
);
|
|
118
116
|
}
|
|
119
117
|
},
|
|
120
118
|
},
|
|
121
119
|
}),
|
|
122
|
-
[t, space, target],
|
|
120
|
+
[t, space, target, invokePromise],
|
|
123
121
|
);
|
|
124
122
|
|
|
125
123
|
const [selectedInvitation, setSelectedInvitation] = useState<CancellableInvitationObservable | null>(null);
|
|
@@ -132,7 +130,7 @@ export const MembersContainer = ({ space, createInvitationUrl }: MembersContaine
|
|
|
132
130
|
|
|
133
131
|
return (
|
|
134
132
|
<Clipboard.Provider>
|
|
135
|
-
<
|
|
133
|
+
<Layout.Container scrollable>
|
|
136
134
|
<ControlPage>
|
|
137
135
|
<ControlSection title={t('members verbose label')} description={t('members description')}>
|
|
138
136
|
<ControlFrame>
|
|
@@ -176,7 +174,7 @@ export const MembersContainer = ({ space, createInvitationUrl }: MembersContaine
|
|
|
176
174
|
</div>
|
|
177
175
|
</ControlSection>
|
|
178
176
|
</ControlPage>
|
|
179
|
-
</
|
|
177
|
+
</Layout.Container>
|
|
180
178
|
</Clipboard.Provider>
|
|
181
179
|
);
|
|
182
180
|
};
|
|
@@ -227,7 +225,7 @@ const InvitationSection = ({
|
|
|
227
225
|
};
|
|
228
226
|
|
|
229
227
|
const InvitationQR = ({ id, url, onCancel }: { id: string; url: string; onCancel?: () => void }) => {
|
|
230
|
-
const { t } = useTranslation(
|
|
228
|
+
const { t } = useTranslation(shellTranslationKey);
|
|
231
229
|
const qrLabel = useId('members-container__qr-code');
|
|
232
230
|
const emoji = hexToEmoji(id);
|
|
233
231
|
return (
|
|
@@ -262,7 +260,7 @@ const InvitationQR = ({ id, url, onCancel }: { id: string; url: string; onCancel
|
|
|
262
260
|
};
|
|
263
261
|
|
|
264
262
|
const InvitationAuthCode = ({ id, code, onCancel }: { id: string; code: string; onCancel?: () => void }) => {
|
|
265
|
-
const { t } = useTranslation(
|
|
263
|
+
const { t } = useTranslation(shellTranslationKey);
|
|
266
264
|
const emoji = hexToEmoji(id);
|
|
267
265
|
|
|
268
266
|
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);
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import React, { forwardRef } from 'react';
|
|
6
|
+
|
|
7
|
+
import { Obj } from '@dxos/echo';
|
|
8
|
+
import { Filter, useQuery, useSchema } from '@dxos/react-client/echo';
|
|
9
|
+
import { Callout, Toolbar, useTranslation } from '@dxos/react-ui';
|
|
10
|
+
import { useSelected } from '@dxos/react-ui-attention';
|
|
11
|
+
import { Card } from '@dxos/react-ui-mosaic';
|
|
12
|
+
import { Layout } from '@dxos/react-ui-mosaic';
|
|
13
|
+
import { CardStack, StackItem } from '@dxos/react-ui-stack';
|
|
14
|
+
import { type View, getTypenameFromQuery } from '@dxos/schema';
|
|
15
|
+
import { isNonNullable } from '@dxos/util';
|
|
16
|
+
|
|
17
|
+
import { meta } from '../../meta';
|
|
18
|
+
|
|
19
|
+
import { ObjectForm } from './ObjectForm';
|
|
20
|
+
|
|
21
|
+
export type ObjectCardStackProps = {
|
|
22
|
+
view: View.View;
|
|
23
|
+
objectId: string;
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
export const ObjectCardStack = forwardRef<HTMLDivElement, ObjectCardStackProps>(({ objectId, view }, forwardedRef) => {
|
|
27
|
+
const { t } = useTranslation(meta.id);
|
|
28
|
+
const db = Obj.getDatabase(view);
|
|
29
|
+
const typename = view.query ? getTypenameFromQuery(view.query.ast) : undefined;
|
|
30
|
+
const schema = useSchema(db, typename);
|
|
31
|
+
|
|
32
|
+
const queriedObjects = useQuery(db, schema ? Filter.type(schema) : Filter.nothing());
|
|
33
|
+
const selectedRows = useSelected(objectId, 'multi');
|
|
34
|
+
const selectedObjects = selectedRows.map((id) => queriedObjects.find((obj) => obj.id === id)).filter(isNonNullable);
|
|
35
|
+
|
|
36
|
+
if (!schema) {
|
|
37
|
+
return null;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
return (
|
|
41
|
+
<Layout.Main toolbar ref={forwardedRef}>
|
|
42
|
+
<Toolbar.Root></Toolbar.Root>
|
|
43
|
+
<CardStack.Root asChild>
|
|
44
|
+
<CardStack.Content>
|
|
45
|
+
<CardStack.Stack id={objectId} itemsCount={selectedObjects.length}>
|
|
46
|
+
{selectedObjects.length === 0 && (
|
|
47
|
+
<CardStack.Item>
|
|
48
|
+
<Callout.Root>
|
|
49
|
+
<Callout.Title>{t('row details no selection label')}</Callout.Title>
|
|
50
|
+
</Callout.Root>
|
|
51
|
+
</CardStack.Item>
|
|
52
|
+
)}
|
|
53
|
+
{selectedObjects.map((object) => (
|
|
54
|
+
<CardStack.Item key={object.id} asChild>
|
|
55
|
+
<StackItem.Root item={object}>
|
|
56
|
+
<Card.Root>
|
|
57
|
+
<ObjectForm object={object} schema={schema} />
|
|
58
|
+
</Card.Root>
|
|
59
|
+
</StackItem.Root>
|
|
60
|
+
</CardStack.Item>
|
|
61
|
+
))}
|
|
62
|
+
</CardStack.Stack>
|
|
63
|
+
</CardStack.Content>
|
|
64
|
+
</CardStack.Root>
|
|
65
|
+
</Layout.Main>
|
|
66
|
+
);
|
|
67
|
+
});
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Schema from 'effect/Schema';
|
|
6
|
+
import React, { useCallback, useMemo } from 'react';
|
|
7
|
+
|
|
8
|
+
import { DXN, Obj, type Ref, Tag, Type } from '@dxos/echo';
|
|
9
|
+
import { type JsonPath, splitJsonPath } from '@dxos/echo/internal';
|
|
10
|
+
import { invariant } from '@dxos/invariant';
|
|
11
|
+
import { Form, omitId } from '@dxos/react-ui-form';
|
|
12
|
+
import { isNonNullable } from '@dxos/util';
|
|
13
|
+
|
|
14
|
+
import { meta as pluginMeta } from '../../meta';
|
|
15
|
+
|
|
16
|
+
export type ObjectFormProps = {
|
|
17
|
+
schema: Schema.Schema.AnyNoContext;
|
|
18
|
+
object: Obj.Unknown;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export const ObjectForm = ({ object, schema }: ObjectFormProps) => {
|
|
22
|
+
const db = Obj.getDatabase(object);
|
|
23
|
+
|
|
24
|
+
const formSchema = useMemo(
|
|
25
|
+
() =>
|
|
26
|
+
Schema.Struct({
|
|
27
|
+
tags: Schema.Array(Type.Ref(Tag.Tag)).pipe(Schema.optional),
|
|
28
|
+
}).pipe(Schema.extend(omitId(schema))),
|
|
29
|
+
[schema],
|
|
30
|
+
);
|
|
31
|
+
|
|
32
|
+
const meta = Obj.getMeta(object);
|
|
33
|
+
const tags = (meta.tags ?? []).map((tag) => db?.makeRef(DXN.parse(tag))).filter(isNonNullable);
|
|
34
|
+
const values = useMemo(() => ({ tags, ...object }), [object, tags]);
|
|
35
|
+
|
|
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
|
+
}
|
|
45
|
+
}, []);
|
|
46
|
+
|
|
47
|
+
// TODO(wittjosiah): Use FormRootProps type.
|
|
48
|
+
const handleChange = useCallback(
|
|
49
|
+
({ tags, ...values }: any, { isValid, changed }: { isValid: boolean; changed: Record<JsonPath, boolean> }) => {
|
|
50
|
+
if (!isValid) {
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
const changedPaths = Object.keys(changed).filter((path) => changed[path as JsonPath]) as JsonPath[];
|
|
55
|
+
|
|
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
|
+
});
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
[object],
|
|
77
|
+
);
|
|
78
|
+
|
|
79
|
+
return (
|
|
80
|
+
<Form.Root
|
|
81
|
+
schema={omitId(formSchema)}
|
|
82
|
+
values={values}
|
|
83
|
+
createOptionIcon='ph--plus--regular'
|
|
84
|
+
createOptionLabel={['add tag label', { ns: pluginMeta.id }]}
|
|
85
|
+
createInitialValuePath='label'
|
|
86
|
+
db={db}
|
|
87
|
+
onValuesChanged={handleChange}
|
|
88
|
+
onCreate={handleCreate}
|
|
89
|
+
>
|
|
90
|
+
<Form.Viewport>
|
|
91
|
+
<Form.Content>
|
|
92
|
+
<Form.FieldSet />
|
|
93
|
+
</Form.Content>
|
|
94
|
+
</Form.Viewport>
|
|
95
|
+
</Form.Root>
|
|
96
|
+
);
|
|
97
|
+
};
|
|
@@ -6,7 +6,7 @@ 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
12
|
import { Project } from '@dxos/types';
|
|
@@ -16,13 +16,13 @@ import { translations } from '../../translations';
|
|
|
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
24
|
const object = space.db.add(Project.make());
|
|
25
|
-
setObject(object
|
|
25
|
+
setObject(object);
|
|
26
26
|
}
|
|
27
27
|
}, [space, object]);
|
|
28
28
|
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2024 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Function from 'effect/Function';
|
|
6
|
+
import * as Option from 'effect/Option';
|
|
7
|
+
import * as Schema from 'effect/Schema';
|
|
8
|
+
import React, { type PropsWithChildren, useCallback, useMemo } from 'react';
|
|
9
|
+
|
|
10
|
+
import { DXN, Obj, type Ref, Tag, Type } from '@dxos/echo';
|
|
11
|
+
import { type JsonPath, splitJsonPath } from '@dxos/echo/internal';
|
|
12
|
+
import { invariant } from '@dxos/invariant';
|
|
13
|
+
import { type ThemedClassName } from '@dxos/react-ui';
|
|
14
|
+
import { Form, omitId } from '@dxos/react-ui-form';
|
|
15
|
+
import { isNonNullable } from '@dxos/util';
|
|
16
|
+
|
|
17
|
+
import { meta as pluginMeta } from '../../meta';
|
|
18
|
+
|
|
19
|
+
// TODO(wittjosiah): Would be nice to control order when extending so this isn't always first/last.
|
|
20
|
+
const BaseSchema = Schema.Struct({
|
|
21
|
+
tags: Schema.Array(Type.Ref(Tag.Tag)).pipe(Schema.optional),
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
export type BaseObjectSettingsProps = ThemedClassName<
|
|
25
|
+
PropsWithChildren<{
|
|
26
|
+
object: Obj.Unknown;
|
|
27
|
+
}>
|
|
28
|
+
>;
|
|
29
|
+
|
|
30
|
+
// TODO(wittjosiah): Reconcile w/ ObjectDetailsPanel.
|
|
31
|
+
export const BaseObjectSettings = ({ classNames, children, object }: BaseObjectSettingsProps) => {
|
|
32
|
+
const db = Obj.getDatabase(object);
|
|
33
|
+
|
|
34
|
+
const formSchema = useMemo(() => {
|
|
35
|
+
return Function.pipe(
|
|
36
|
+
Obj.getSchema(object),
|
|
37
|
+
Option.fromNullable,
|
|
38
|
+
Option.map((schema) => BaseSchema.pipe(Schema.extend(schema))),
|
|
39
|
+
Option.getOrUndefined,
|
|
40
|
+
);
|
|
41
|
+
}, [object]);
|
|
42
|
+
|
|
43
|
+
const meta = Obj.getMeta(object);
|
|
44
|
+
const tags = (meta.tags ?? []).map((tag) => db?.makeRef(DXN.parse(tag))).filter(isNonNullable);
|
|
45
|
+
const values = useMemo(
|
|
46
|
+
() => ({
|
|
47
|
+
tags,
|
|
48
|
+
...object,
|
|
49
|
+
}),
|
|
50
|
+
[object, tags],
|
|
51
|
+
);
|
|
52
|
+
|
|
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
|
+
}
|
|
62
|
+
}, []);
|
|
63
|
+
|
|
64
|
+
// TODO(wittjosiah): Use FormRootProps type.
|
|
65
|
+
const handleChange = useCallback(
|
|
66
|
+
(
|
|
67
|
+
{ tags, ...values }: Schema.Schema.Type<typeof formSchema>,
|
|
68
|
+
{ isValid, changed }: { isValid: boolean; changed: Record<JsonPath, boolean> },
|
|
69
|
+
) => {
|
|
70
|
+
if (!isValid) {
|
|
71
|
+
return;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
const changedPaths = Object.keys(changed).filter((path) => changed[path as JsonPath]) as JsonPath[];
|
|
75
|
+
|
|
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
|
+
}
|
|
95
|
+
},
|
|
96
|
+
[object],
|
|
97
|
+
);
|
|
98
|
+
|
|
99
|
+
if (!formSchema) {
|
|
100
|
+
return null;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
return (
|
|
104
|
+
<Form.Root
|
|
105
|
+
schema={omitId(formSchema)}
|
|
106
|
+
values={values}
|
|
107
|
+
createOptionIcon='ph--plus--regular'
|
|
108
|
+
createOptionLabel={['add tag label', { ns: pluginMeta.id }]}
|
|
109
|
+
createInitialValuePath='label'
|
|
110
|
+
db={db}
|
|
111
|
+
onValuesChanged={handleChange}
|
|
112
|
+
onCreate={handleCreate}
|
|
113
|
+
>
|
|
114
|
+
<Form.Viewport>
|
|
115
|
+
<Form.Content classNames={classNames}>
|
|
116
|
+
<Form.FieldSet />
|
|
117
|
+
{children}
|
|
118
|
+
</Form.Content>
|
|
119
|
+
</Form.Viewport>
|
|
120
|
+
</Form.Root>
|
|
121
|
+
);
|
|
122
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import React, { forwardRef, useMemo } from 'react';
|
|
6
|
+
|
|
7
|
+
import { Surface, type SurfaceComponentProps } from '@dxos/app-framework/react';
|
|
8
|
+
import { type Obj } from '@dxos/echo';
|
|
9
|
+
import { Toolbar } from '@dxos/react-ui';
|
|
10
|
+
import { Layout } from '@dxos/react-ui-mosaic';
|
|
11
|
+
|
|
12
|
+
import { BaseObjectSettings } from './BaseObjectSettings';
|
|
13
|
+
|
|
14
|
+
export type ObjectDetailsProps = SurfaceComponentProps<Obj.Unknown>;
|
|
15
|
+
|
|
16
|
+
export const ObjectDetails = forwardRef<HTMLDivElement, ObjectDetailsProps>(
|
|
17
|
+
({ role, subject: object }, forwardedRef) => {
|
|
18
|
+
const data = useMemo(() => ({ subject: object }), [object]);
|
|
19
|
+
|
|
20
|
+
return (
|
|
21
|
+
<Layout.Main role={role} ref={forwardedRef}>
|
|
22
|
+
<Toolbar.Root />
|
|
23
|
+
<BaseObjectSettings object={object}>
|
|
24
|
+
<Surface role='base-object-settings' data={data} />
|
|
25
|
+
<Surface role='object-settings' data={data} />
|
|
26
|
+
{/* TODO(wittjosiah): Remove (or add as surface)? */}
|
|
27
|
+
{/* <AdvancedObjectSettings object={object} /> */}
|
|
28
|
+
</BaseObjectSettings>
|
|
29
|
+
</Layout.Main>
|
|
30
|
+
);
|
|
31
|
+
},
|
|
32
|
+
);
|
|
@@ -4,35 +4,31 @@
|
|
|
4
4
|
|
|
5
5
|
import React, { useCallback, useRef, useState } from 'react';
|
|
6
6
|
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
7
|
+
import { Common } from '@dxos/app-framework';
|
|
8
|
+
import { useOperationInvoker } from '@dxos/app-framework/react';
|
|
9
9
|
import { Obj } from '@dxos/echo';
|
|
10
10
|
import { log } from '@dxos/log';
|
|
11
11
|
import { Button, Input, useTranslation } from '@dxos/react-ui';
|
|
12
|
+
import { osTranslations } from '@dxos/ui-theme';
|
|
12
13
|
|
|
13
14
|
import { meta } from '../../meta';
|
|
14
15
|
|
|
15
16
|
export const OBJECT_RENAME_POPOVER = `${meta.id}/ObjectRenamePopover`;
|
|
16
17
|
|
|
17
|
-
export const ObjectRenamePopover = ({ object }: { object: Obj.
|
|
18
|
+
export const ObjectRenamePopover = ({ object }: { object: Obj.Unknown }) => {
|
|
18
19
|
const { t } = useTranslation(meta.id);
|
|
19
20
|
const doneButton = useRef<HTMLButtonElement>(null);
|
|
20
21
|
const [name, setName] = useState(Obj.getLabel(object));
|
|
21
|
-
const {
|
|
22
|
+
const { invokePromise } = useOperationInvoker();
|
|
22
23
|
|
|
23
24
|
const handleDone = useCallback(() => {
|
|
24
25
|
try {
|
|
25
|
-
name && Obj.setLabel(object, name);
|
|
26
|
+
name && Obj.change(object, () => Obj.setLabel(object, name));
|
|
26
27
|
} catch (err) {
|
|
27
28
|
log.error('Failed to rename object', { err });
|
|
28
29
|
}
|
|
29
|
-
void
|
|
30
|
-
|
|
31
|
-
part: 'popover',
|
|
32
|
-
options: { variant: 'react', anchorId: '', state: false },
|
|
33
|
-
}),
|
|
34
|
-
);
|
|
35
|
-
}, [object, name]);
|
|
30
|
+
void invokePromise(Common.LayoutOperation.UpdatePopover, { anchorId: '', state: false });
|
|
31
|
+
}, [object, name, invokePromise]);
|
|
36
32
|
|
|
37
33
|
return (
|
|
38
34
|
<div role='none' className='p-2 flex gap-2'>
|
|
@@ -49,7 +45,7 @@ export const ObjectRenamePopover = ({ object }: { object: Obj.Any }) => {
|
|
|
49
45
|
</Input.Root>
|
|
50
46
|
</div>
|
|
51
47
|
<Button ref={doneButton} classNames='self-stretch' onClick={handleDone}>
|
|
52
|
-
{t('done label', { ns:
|
|
48
|
+
{t('done label', { ns: osTranslations })}
|
|
53
49
|
</Button>
|
|
54
50
|
</div>
|
|
55
51
|
);
|
|
@@ -5,14 +5,14 @@
|
|
|
5
5
|
import { type Meta, type StoryObj } from '@storybook/react-vite';
|
|
6
6
|
import React from 'react';
|
|
7
7
|
|
|
8
|
-
import {
|
|
8
|
+
import { Capability, Common } from '@dxos/app-framework';
|
|
9
9
|
import { withPluginManager } from '@dxos/app-framework/testing';
|
|
10
10
|
import { Filter, Obj, Ref, Relation, type Type } from '@dxos/echo';
|
|
11
11
|
import { faker } from '@dxos/random';
|
|
12
12
|
import { useQuery } from '@dxos/react-client/echo';
|
|
13
|
-
import {
|
|
13
|
+
import { useClientStory, withClientProvider } from '@dxos/react-client/testing';
|
|
14
14
|
import { withTheme } from '@dxos/react-ui/testing';
|
|
15
|
-
import { Card } from '@dxos/react-ui-
|
|
15
|
+
import { Card } from '@dxos/react-ui-mosaic';
|
|
16
16
|
import { Json } from '@dxos/react-ui-syntax-highlighter';
|
|
17
17
|
import { type ValueGenerator, createAsyncGenerator } from '@dxos/schema/testing';
|
|
18
18
|
import { translations as shellTranslations } from '@dxos/shell/react';
|
|
@@ -27,8 +27,8 @@ faker.seed(1);
|
|
|
27
27
|
const generator: ValueGenerator = faker as any;
|
|
28
28
|
|
|
29
29
|
const DefaultStory = () => {
|
|
30
|
-
const { space } =
|
|
31
|
-
const [object] = useQuery(space, Filter.type(Organization.Organization));
|
|
30
|
+
const { space } = useClientStory();
|
|
31
|
+
const [object] = useQuery(space?.db, Filter.type(Organization.Organization));
|
|
32
32
|
if (!object) {
|
|
33
33
|
return null;
|
|
34
34
|
}
|
|
@@ -45,23 +45,23 @@ const meta = {
|
|
|
45
45
|
// TODO(wittjosiah): Try to write story which does not depend on plugin manager.
|
|
46
46
|
withPluginManager({
|
|
47
47
|
capabilities: [
|
|
48
|
-
contributes(
|
|
49
|
-
createSurface({
|
|
48
|
+
Capability.contributes(Common.Capability.ReactSurface, [
|
|
49
|
+
Common.createSurface({
|
|
50
50
|
id: 'section',
|
|
51
51
|
role: 'section',
|
|
52
52
|
component: ({ data }) => (
|
|
53
|
-
<Card.
|
|
53
|
+
<Card.Root>
|
|
54
54
|
<Json classNames='text-sm' data={data} />
|
|
55
|
-
</Card.
|
|
55
|
+
</Card.Root>
|
|
56
56
|
),
|
|
57
57
|
}),
|
|
58
|
-
createSurface({
|
|
58
|
+
Common.createSurface({
|
|
59
59
|
id: 'card',
|
|
60
60
|
role: 'card',
|
|
61
61
|
component: ({ data }) => (
|
|
62
|
-
<Card.
|
|
62
|
+
<Card.Root>
|
|
63
63
|
<Json classNames='text-sm' data={data} />
|
|
64
|
-
</Card.
|
|
64
|
+
</Card.Root>
|
|
65
65
|
),
|
|
66
66
|
}),
|
|
67
67
|
]),
|