@dxos/app-toolkit - v0.16.0
    Preparing search index...

    Function makeObject

    • Builds an app-graph node for an ECHO object. Uses the local object ID as the graph node ID.

      Parameters

      • __namedParameters: {
            blockInstruction?: (
                source: {
                    id: string;
                    item: any;
                    path: readonly string[];
                    treeId: string;
                },
                instruction: Instruction,
            ) => boolean;
            canDrop?: (
                source: {
                    id: string;
                    item: any;
                    path: readonly string[];
                    treeId: string;
                },
            ) => boolean;
            db: Database;
            disposition?: string
            | string[];
            draggable?: boolean;
            dropInto?: Container;
            droppable?: boolean;
            get: AtomContext;
            navigable?: boolean;
            object: Unknown;
        }
        • OptionalblockInstruction?: (
              source: {
                  id: string;
                  item: any;
                  path: readonly string[];
                  treeId: string;
              },
              instruction: Instruction,
          ) => boolean

          Blocks a drop instruction, for a row whose answer depends on the source.

        • OptionalcanDrop?: (
              source: {
                  id: string;
                  item: any;
                  path: readonly string[];
                  treeId: string;
              },
          ) => boolean

          Overrides the default CAN_DROP_OBJECT drop predicate (e.g. to restrict siblings to collection items).

        • db: Database
        • Optionaldisposition?: string | string[]
        • Optionaldraggable?: boolean
        • OptionaldropInto?: Container

          The container an object dropped onto the row joins.

        • Optionaldroppable?: boolean
        • get: AtomContext

          Atom context from the enclosing connector — registers reactive subscriptions so property changes re-run the connector.

        • Optionalnavigable?: boolean
        • object: Unknown

      Returns
          | null
          | {
              cacheable: string[];
              data: Unknown;
              id: string;
              properties: | {
                  acceptPersistenceClass?: Set<string>;
                  acceptPersistenceKey?: Set<string>;
                  blockInstruction:
                      | undefined
                      | (
                          (
                              source: {
                                  id: string;
                                  item: any;
                                  path: readonly string[];
                                  treeId: string;
                              },
                              instruction: Instruction,
                          ) => boolean
                      );
                  canDrop:
                      | undefined
                      | (
                          (
                              source: {
                                  id: string;
                                  item: any;
                                  path: readonly string[];
                                  treeId: string;
                              },
                          ) => boolean
                      );
                  disposition: undefined
                  | string
                  | string[];
                  draggable: undefined | boolean;
                  dropInto?: Container;
                  droppable: undefined | boolean;
                  icon: string;
                  iconHue: undefined | string;
                  isLink?: (
                      child: Readonly<
                          {
                              cacheable?: string[];
                              data: Unknown;
                              id: string;
                              properties: Readonly<Record<string, any>>;
                              type: string;
                          },
                      >,
                      from?: Readonly<
                          {
                              cacheable?: (...)[];
                              data: any;
                              id: string;
                              properties: Readonly<Record<(...), (...)>>;
                              type: string;
                          },
                      >,
                  ) => boolean;
                  label: string
                  | [string, Record<string, any>];
                  moveScope?: string;
                  onLink?: (
                      child: Readonly<
                          {
                              cacheable?: string[];
                              data: Unknown;
                              id: string;
                              properties: Readonly<Record<string, any>>;
                              type: string;
                          },
                      >,
                      index?: number,
                  ) => void;
                  onMoveIn?: (
                      child: Readonly<
                          {
                              cacheable?: string[];
                              data: Unknown;
                              id: string;
                              properties: Readonly<Record<string, any>>;
                              type: string;
                          },
                      >,
                      index?: number,
                  ) => void;
                  persistenceClass: string;
                  persistenceKey: SpaceId;
                  role?: "branch";
                  selectable: boolean;
                  testId: string;
              }
              | {
                  acceptPersistenceClass?: Set<string>;
                  acceptPersistenceKey?: Set<string>;
                  blockInstruction:
                      | undefined
                      | (
                          (
                              source: {
                                  id: string;
                                  item: any;
                                  path: readonly string[];
                                  treeId: string;
                              },
                              instruction: Instruction,
                          ) => boolean
                      );
                  canDrop:
                      | undefined
                      | (
                          (
                              source: {
                                  id: string;
                                  item: any;
                                  path: readonly string[];
                                  treeId: string;
                              },
                          ) => boolean
                      );
                  disposition: undefined
                  | string
                  | string[];
                  draggable: undefined | boolean;
                  dropInto?: Container;
                  droppable: undefined | boolean;
                  icon: string;
                  iconHue: undefined | string;
                  isLink?: (
                      child: Readonly<
                          {
                              cacheable?: string[];
                              data: Unknown;
                              id: string;
                              properties: Readonly<Record<string, any>>;
                              type: string;
                          },
                      >,
                      from?: Readonly<
                          {
                              cacheable?: (...)[];
                              data: any;
                              id: string;
                              properties: Readonly<Record<(...), (...)>>;
                              type: string;
                          },
                      >,
                  ) => boolean;
                  label: string
                  | [string, Record<string, any>];
                  managesAutofocus?: boolean;
                  moveScope?: string;
                  onLink?: (
                      child: Readonly<
                          {
                              cacheable?: string[];
                              data: Unknown;
                              id: string;
                              properties: Readonly<Record<string, any>>;
                              type: string;
                          },
                      >,
                      index?: number,
                  ) => void;
                  onMoveIn?: (
                      child: Readonly<
                          {
                              cacheable?: string[];
                              data: Unknown;
                              id: string;
                              properties: Readonly<Record<string, any>>;
                              type: string;
                          },
                      >,
                      index?: number,
                  ) => void;
                  persistenceClass: string;
                  persistenceKey: SpaceId;
                  role?: "branch";
                  selectable: boolean;
                  testId: string;
              }
              | {
                  acceptPersistenceClass: Set<string>;
                  acceptPersistenceKey: Set<string>;
                  blockInstruction:
                      | undefined
                      | (
                          (
                              source: {
                                  id: string;
                                  item: any;
                                  path: readonly string[];
                                  treeId: string;
                              },
                              instruction: Instruction,
                          ) => boolean
                      );
                  canDrop: (
                      source: {
                          id: string;
                          item: any;
                          path: readonly string[];
                          treeId: string;
                      },
                  ) => boolean;
                  disposition: undefined
                  | string
                  | string[];
                  draggable: undefined | boolean;
                  dropInto: Container;
                  droppable: undefined | boolean;
                  icon: string;
                  iconHue: undefined | string;
                  isLink: (
                      child: Readonly<
                          {
                              cacheable?: string[];
                              data: Unknown;
                              id: string;
                              properties: Readonly<Record<string, any>>;
                              type: string;
                          },
                      >,
                      from?: Readonly<
                          {
                              cacheable?: string[];
                              data: any;
                              id: string;
                              properties: Readonly<Record<string, any>>;
                              type: string;
                          },
                      >,
                  ) => boolean;
                  label: string
                  | [string, Record<string, any>];
                  listOf: Container;
                  moveScope: undefined | string;
                  onLink: (
                      child: Readonly<
                          {
                              cacheable?: string[];
                              data: Unknown;
                              id: string;
                              properties: Readonly<Record<string, any>>;
                              type: string;
                          },
                      >,
                      index?: number,
                  ) => void;
                  onMoveIn: (
                      child: Readonly<
                          {
                              cacheable?: string[];
                              data: Unknown;
                              id: string;
                              properties: Readonly<Record<string, any>>;
                              type: string;
                          },
                      >,
                      index?: number,
                  ) => void;
                  onMoveOut: (
                      child: Readonly<
                          {
                              cacheable?: string[];
                              data: Unknown;
                              id: string;
                              properties: Readonly<Record<string, any>>;
                              type: string;
                          },
                      >,
                      destination: Readonly,
                  ) => void;
                  onRearrange: (nextOrder: unknown[]) => void;
                  persistenceClass: string;
                  persistenceKey: SpaceId;
                  role: "branch";
                  selectable: boolean;
                  testId: string;
              };
              type: string;
          }