{
  "tag": "ed-widget-ed-scan",
  "kind": "widget",
  "summary": "Self-contained edScan feature for uploading scanned documents, splitting them into pages and editing the\nresult with AI-assisted suggestions.",
  "status": "experimental",
  "since": "1.0",
  "docs": "https://test-apps.eurodata.de/a/eurodata-ui/docs/widgets/ed-scan/",
  "usage": "https://test-apps.eurodata.de/a/eurodata-ui/docs/widgets/ed-scan/usage/",
  "playwright": "getByTestId('…')",
  "dependencies": [
    "ed-alert-dialog",
    "ed-button",
    "ed-dialog",
    "ed-header",
    "ed-notification",
    "ed-page-editor",
    "ed-progress-ring",
    "ed-upload"
  ],
  "use": [
    "Only when the user explicitly asks for edScan, coordinated with the DMS team — a pre-built widget combining Upload, Document Viewer and Page Editor with AI features"
  ],
  "notFor": [
    {
      "when": "Uploading files with progress and no scan processing",
      "instead": "an [Upload](https://test-apps.eurodata.de/a/eurodata-ui/docs/components/upload)"
    },
    {
      "when": "Showing a finished document for reading",
      "instead": "a [Document Viewer](https://test-apps.eurodata.de/a/eurodata-ui/docs/components/document-viewer)"
    },
    {
      "when": "Reordering or editing pages of a document in your own workflow",
      "instead": "a [Page Editor](https://test-apps.eurodata.de/a/eurodata-ui/docs/components/page-editor)"
    }
  ],
  "rules": [],
  "api": {
    "attributes": [
      {
        "name": "base-url",
        "property": "edscanBaseUrl",
        "type": "string",
        "default": "''",
        "description": "the base url to the service - change this to switch between dev, staging or prod"
      },
      {
        "name": "open",
        "property": "open",
        "type": "boolean",
        "default": "false",
        "description": "Indicates if the dialog should show or not. Open it with `show()` after assigning `edscanToken`: an `open`\nattribute that is present before the token is set closes itself again, and assigning the token afterwards does\nnot reopen it.\n\nClose it with `close()` and not by removing the attribute. `close()` drops the loaded session, stops the session\npoll, aborts the session request in flight, and passes the dialog's own hide interceptor. Removing the attribute\ndoes none of that — the interceptor takes it for a user dismissal and raises the \"cancel the session?\"\nconfirmation instead. Neither ends the session on the service: only the user's own save and cancel reach those\nendpoints.\n\nReopening needs a freshly assigned `edscanToken`, the same token included. `close()` drops the session while\nkeeping the token, and `show()` on its own only sets `open` — it loads nothing, so the dialog comes back showing\nwhatever step it was closed on."
      },
      {
        "name": "dir",
        "property": "dir",
        "type": "string"
      },
      {
        "name": "lang",
        "property": "lang",
        "type": "string"
      }
    ],
    "properties": [
      {
        "name": "edscanToken",
        "description": "The ed-scan token for the current session. This token must be created by the product via the\ncreate-session endpoint.\n\n**Property only** — deliberately not settable through an HTML attribute, so the token never\nsits in the DOM where page scripts, browser extensions, session-replay tools and error\ntrackers that snapshot markup would read it. Assign it in JavaScript:\n`document.querySelector('ed-widget-ed-scan').edscanToken = token`."
      }
    ],
    "methods": [
      {
        "name": "close",
        "description": "closes the edScan dialog"
      },
      {
        "name": "show",
        "description": "opens the edScan dialog"
      }
    ],
    "events": [
      {
        "name": "ed-scan-cancel",
        "react": "onEdScanCancel",
        "description": "Fired after the user cancels the session: the whole session is discarded and all files are lost. Reports a cancellation that already happened, so it is not cancelable."
      },
      {
        "name": "ed-scan-finish",
        "react": "onEdScanFinish",
        "description": "Fired after the user saves and the session ends. `event.detail` is the list of created files, each `{ filename, filesize }`."
      }
    ],
    "slots": [
      {
        "name": "logo",
        "description": "An image (your logo) shown at the end of the dialog header."
      }
    ],
    "cssProperties": [],
    "parts": [],
    "states": []
  },
  "import": "import '@eurodata/eurodata-ui/dist/widgets/ed-scan/ed-scan.js';",
  "react": {
    "component": "EdWidgetEdScan",
    "import": "import EdWidgetEdScan from '@eurodata/eurodata-ui/dist/react/widget-ed-scan/index.js';"
  }
}
