How to use the platform/components/ui/overlay.getOverlaySystem function in platform

To help you get started, we’ve selected a few platform examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github researchspace / researchspace / researchspace / web / src / main / components / alignment / AlignmentTool.tsx View on Github external
function showAlignmentRelationDialog(params: {
  sourceNode: Node,
  targetNode: Node,
  onSubmit: (kind: AlignKind) => void;
}) {
  const {sourceNode, targetNode, onSubmit} = params;
  const onDialogClose = () => {
    getOverlaySystem().hide(ConfirmAlignDialog.KEY);
  };
  const onDialogSubmit = (kind: AlignKind) => {
    onDialogClose();
    onSubmit(kind);
  };
  getOverlaySystem().show(
    ConfirmAlignDialog.KEY,
    
  );
}
github researchspace / researchspace / metaphacts-platform / web / src / main / components / admin / page-manager / PageManager.ts View on Github external
private onClickDeleteSelected = () => {
    const dialogRef = 'deletion-confirmation';
    const onHide = () => getOverlaySystem().hide(dialogRef);
    const props = {
      message: 'Do you want to delete the selected templates?',
      onHide,
      onConfirm: confirm => {
        onHide();
        if (confirm) {
          this.deleteSelectedPages();
        }
      },
    };

    getOverlaySystem().show(
      dialogRef,
      createElement(ConfirmationDialog, props)
    );
  }
github researchspace / researchspace / researchspace / web / src / main / components / dashboard / DashboardComponent.tsx View on Github external
private onRemoveItem(item: Item) {
    const removeItem = () => {
      if (item.linkedBy) {
        this.state.items.forEach(({id, linkedBy}) => {
          if (linkedBy === item.linkedBy) {
            this.removeItem(id);
          }
        });
      } else {
        this.removeItem(item.id);
      }
    };
    if (item.isDirty) {
      const dialogRef = 'removing-confirmation';
      const onHide = () => getOverlaySystem().hide(dialogRef);
      getOverlaySystem().show(
        dialogRef,
         {
            onHide();
            if (confirm) {
              removeItem();
            }
          }}/>
      );
    } else {
      removeItem();
    }
  }
github researchspace / researchspace / researchspace / web / src / main / components / iiif / OverlayComparison.ts View on Github external
onClick: () => {
            const dialogRef = 'create-overlay-image';
            getOverlaySystem().show(
              dialogRef,
              createElement(CreateResourceDialog, {
                onSave: this.createOverlayImage,
                onHide: () => getOverlaySystem().hide(dialogRef),
                show: true,
                title: 'Create overlay image',
                placeholder: 'Enter image title',
              })
            );
          },
        }, 'Create overlayed image')
github researchspace / researchspace / researchspace / web / src / main / components / alignment / AlignmentTool.tsx View on Github external
const onDialogClose = () => {
    getOverlaySystem().hide(ConfirmAlignDialog.KEY);
  };
  const onDialogSubmit = (kind: AlignKind) => {
github researchspace / researchspace / metaphacts-platform / web / src / main / components / admin / repositories / RepositoryConfigEditor.tsx View on Github external
onDeleteRepository = (id: string) => {
    const dialogRef = 'delete-repository-confirmation';
    const hideDialog = () => getOverlaySystem().hide(dialogRef);
    const props = {
      message: `Do you want to delete the "${id}" repository?`,
      onHide: () => {
        hideDialog();
      },
      onConfirm: confirm => {
        hideDialog();
        if (confirm) {
          this.executeDeleteRepository(id);
        } 
      },
    };
    getOverlaySystem().show(
      dialogRef,
      createElement(ConfirmationDialog, props)
    );
  }