@haxtheweb/pdf-browser-viewer
Version:
Start of pdf-browser-viewer
221 lines (220 loc) • 7.41 kB
JSON
{
"schemaVersion": "1.0.0",
"readme": "",
"modules": [
{
"kind": "javascript-module",
"path": "pdf-browser-viewer.js",
"declarations": [
{
"kind": "class",
"description": "\n\nExample:\n```html\n<pdf-browser-viewer id=\"pdfViewer\" file=\"[[pdfUrl]]\" width=\"100%\"></pdf-browser-viewer>\n```\n\nData Bind with Blob example:\n```js\nthis.pdfUrl = URL.createObjectURL(blob);\n```\n\nClear PDF container example:\n```js\nthis.shadowRoot.querySelector('#pdfViewer').clear();\n```\n\nMessage example:\n```html\n<pdf-browser-viewer\n file=\"[[pdfUrl]]\"\n not-supported-message=\"Not supported by your browser\"\n not-supported-link-message=\"see the file here!\">\n</pdf-browser-viewer>\n```\n\nCard example:\n```html\n<pdf-browser-viewer\n file=\"[[pdfUrl]]\"\n card elevation=\"3\"\n download-label=\"Baixar\">\n</pdf-browser-viewer>\n```",
"name": "PdfBrowserViewer",
"members": [
{
"kind": "field",
"name": "tag",
"static": true,
"readonly": true
},
{
"kind": "method",
"name": "clear",
"description": "Clear PDF container"
},
{
"kind": "method",
"name": "_download",
"description": "Downloads the pdf file"
},
{
"kind": "field",
"name": "file",
"privacy": "public",
"type": {
"text": "string"
},
"description": "The location of the PDF file.",
"default": "undefined",
"attribute": "file",
"reflects": true
},
{
"kind": "field",
"name": "notSupportedMessage",
"privacy": "public",
"type": {
"text": "string"
},
"description": "The message when browser doesn't support pdf object",
"default": "\"It appears your Web browser is not configured to display PDF files. No worries, just\"",
"attribute": "notSupportedMessage"
},
{
"kind": "field",
"name": "notSupportedLinkMessage",
"privacy": "public",
"type": {
"text": "string"
},
"description": "The PDF link message when browser doesn't support pdf object",
"default": "\"click here to download the PDF file.\"",
"attribute": "notSupportedLinkMessage"
},
{
"kind": "field",
"name": "height",
"privacy": "public",
"type": {
"text": "string"
},
"description": "The height of the PDF viewer.",
"default": "\"400px\"",
"attribute": "height"
},
{
"kind": "field",
"name": "width",
"privacy": "public",
"type": {
"text": "string"
},
"description": "The width of the PDF viewer.",
"default": "\"100%\"",
"attribute": "width"
},
{
"kind": "field",
"name": "card",
"privacy": "public",
"type": {
"text": "boolean"
},
"description": "PDF viewer as a card with download button.",
"default": "false",
"attribute": "card"
},
{
"kind": "field",
"name": "downloadLabel",
"privacy": "public",
"type": {
"text": "string"
},
"description": "Download button label.",
"default": "\"Download\"",
"attribute": "downloadLabel"
},
{
"kind": "field",
"name": "elevation",
"privacy": "public",
"type": {
"text": "string"
},
"description": "The z-depth of the card, from 0-5.",
"default": "\"1\"",
"attribute": "elevation"
}
],
"attributes": [
{
"name": "file",
"type": {
"text": "string"
},
"description": "The location of the PDF file.",
"default": "undefined",
"fieldName": "file"
},
{
"name": "notSupportedMessage",
"type": {
"text": "string"
},
"description": "The message when browser doesn't support pdf object",
"default": "\"It appears your Web browser is not configured to display PDF files. No worries, just\"",
"fieldName": "notSupportedMessage"
},
{
"name": "notSupportedLinkMessage",
"type": {
"text": "string"
},
"description": "The PDF link message when browser doesn't support pdf object",
"default": "\"click here to download the PDF file.\"",
"fieldName": "notSupportedLinkMessage"
},
{
"name": "height",
"type": {
"text": "string"
},
"description": "The height of the PDF viewer.",
"default": "\"400px\"",
"fieldName": "height"
},
{
"name": "width",
"type": {
"text": "string"
},
"description": "The width of the PDF viewer.",
"default": "\"100%\"",
"fieldName": "width"
},
{
"name": "card",
"type": {
"text": "boolean"
},
"description": "PDF viewer as a card with download button.",
"default": "false",
"fieldName": "card"
},
{
"name": "downloadLabel",
"type": {
"text": "string"
},
"description": "Download button label.",
"default": "\"Download\"",
"fieldName": "downloadLabel"
},
{
"name": "elevation",
"type": {
"text": "string"
},
"description": "The z-depth of the card, from 0-5.",
"default": "\"1\"",
"fieldName": "elevation"
}
],
"superclass": {
"name": "LitElement",
"package": "lit"
},
"customElement": true
}
],
"exports": [
{
"kind": "custom-element-definition",
"declaration": {
"name": "PdfBrowserViewer",
"module": "pdf-browser-viewer.js"
}
},
{
"kind": "js",
"name": "PdfBrowserViewer",
"declaration": {
"name": "PdfBrowserViewer",
"module": "pdf-browser-viewer.js"
}
}
]
}
]
}