@teipublisher/pb-components
Version:
Collection of webcomponents underlying TEI Publisher
1,263 lines • 535 kB
JSON
{
"version": "experimental",
"tags": [
{
"name": "pb-component-docs",
"path": "./src/docs/pb-component-docs.js",
"description": "An API viewer for webcomponents based on the JSON format produced\nby web-component-analyzer.",
"attributes": [
{
"name": "file",
"description": "Path to the JSON file generated by web-components-analyzer",
"type": "string"
},
{
"name": "demo",
"description": "Path to the JSON file mapping component names to available demo files",
"type": "string"
}
],
"properties": [
{
"name": "file",
"attribute": "file",
"description": "Path to the JSON file generated by web-components-analyzer",
"type": "string"
},
{
"name": "demo",
"attribute": "demo",
"description": "Path to the JSON file mapping component names to available demo files",
"type": "string"
},
{
"name": "view",
"type": "PbComponentView"
}
],
"slots": [
{
"name": "logo",
"description": "HTML to show as logo on top of the drawer"
}
]
},
{
"name": "pb-component-view",
"path": "./src/docs/pb-component-view.js",
"description": "Core viewer showing the element documentation and demos.",
"attributes": [
{
"name": "default-title",
"type": "string",
"default": "\"Webcomponents API\""
}
],
"properties": [
{
"name": "defaultTitle",
"attribute": "default-title",
"type": "string",
"default": "\"Webcomponents API\""
}
],
"cssProperties": [
{
"name": "--pb-header-background-color",
"description": "Background color of the header"
},
{
"name": "--pb-header-color",
"description": "Color of header text"
}
]
},
{
"name": "pb-components-list",
"path": "./src/docs/pb-components-list.js",
"description": "Displays a list of components to view.",
"attributes": [
{
"name": "json",
"type": "object"
},
{
"name": "with-demo",
"type": "boolean",
"default": "false"
}
],
"properties": [
{
"name": "json",
"attribute": "json",
"type": "object"
},
{
"name": "withDemo",
"attribute": "with-demo",
"type": "boolean",
"default": "false"
}
],
"events": [
{
"name": "pb-api-component",
"description": "if a component name is clicked"
}
]
},
{
"name": "pb-demo-snippet",
"path": "./src/docs/pb-demo-snippet.js",
"description": "Viewer for demo code.",
"attributes": [
{
"name": "title",
"type": "string",
"default": "\"TEI Publisher Webcomponents Example\""
},
{
"name": "code",
"type": "string",
"default": "\"Loading ...\""
}
],
"properties": [
{
"name": "title",
"attribute": "title",
"type": "string",
"default": "\"TEI Publisher Webcomponents Example\""
},
{
"name": "code",
"attribute": "code",
"type": "string",
"default": "\"Loading ...\""
}
]
},
{
"name": "dts-client",
"path": "./src/dts-client.js",
"description": "A client for the Distributed Text Services (DTS) protocol. This defines an API\nfor working with collections of text.",
"attributes": [
{
"name": "baseUri",
"type": "string"
},
{
"name": "data",
"type": "object"
},
{
"name": "page",
"type": "number"
},
{
"name": "perPage",
"type": "number"
},
{
"name": "collection",
"type": "string",
"default": "\"default\""
},
{
"name": "subscribe",
"description": "The name of the channel to subscribe to. Only events on a channel corresponding\nto this property are listened to.",
"type": "string"
},
{
"name": "subscribe-config",
"description": "Configuration object to define a channel/event mapping. Every property\nin the object is interpreted as the name of a channel and its value should\nbe an array of event names to listen to.",
"type": "object"
},
{
"name": "emit",
"description": "The name of the channel to send events to.",
"type": "string"
},
{
"name": "emit-config",
"description": "Configuration object to define a channel/event mapping. Every property\nin the object is interpreted as the name of a channel and its value should\nbe an array of event names to be dispatched.",
"type": "object"
},
{
"name": "wait-for",
"description": "A selector pointing to other components this component depends on.\nWhen method `wait` is called, it will wait until all referenced\ncomponents signal with a `pb-ready` event that they are ready and listening\nto events.",
"type": "string"
},
{
"name": "disabled",
"description": "Common property to disable the functionality associated with a component.\n`pb-highlight` and `pb-popover` react to this.",
"type": "boolean",
"default": "false"
}
],
"properties": [
{
"name": "baseUri",
"attribute": "baseUri",
"type": "string"
},
{
"name": "data",
"attribute": "data",
"type": "object"
},
{
"name": "page",
"attribute": "page",
"type": "number"
},
{
"name": "perPage",
"attribute": "perPage",
"type": "number"
},
{
"name": "collection",
"attribute": "collection",
"type": "string",
"default": "\"default\""
},
{
"name": "subscribe",
"attribute": "subscribe",
"description": "The name of the channel to subscribe to. Only events on a channel corresponding\nto this property are listened to.",
"type": "string"
},
{
"name": "subscribeConfig",
"attribute": "subscribe-config",
"description": "Configuration object to define a channel/event mapping. Every property\nin the object is interpreted as the name of a channel and its value should\nbe an array of event names to listen to.",
"type": "object"
},
{
"name": "emit",
"attribute": "emit",
"description": "The name of the channel to send events to.",
"type": "string"
},
{
"name": "emitConfig",
"attribute": "emit-config",
"description": "Configuration object to define a channel/event mapping. Every property\nin the object is interpreted as the name of a channel and its value should\nbe an array of event names to be dispatched.",
"type": "object"
},
{
"name": "waitFor",
"attribute": "wait-for",
"description": "A selector pointing to other components this component depends on.\nWhen method `wait` is called, it will wait until all referenced\ncomponents signal with a `pb-ready` event that they are ready and listening\nto events.",
"type": "string"
},
{
"name": "disabled",
"attribute": "disabled",
"description": "Common property to disable the functionality associated with a component.\n`pb-highlight` and `pb-popover` react to this.",
"type": "boolean",
"default": "false"
}
],
"events": [
{
"name": "pb-start-update",
"description": "Fired before the element updates its content"
},
{
"name": "pb-results-received",
"description": "Fired when results are received from the server"
},
{
"name": "pb-end-update",
"description": "Fired after the element has finished updating its content"
},
{
"name": "dts-endpoint",
"description": "When received sets the endpoint to the one passed in from the event"
},
{
"name": "pb-load",
"description": "When received triggers the refresh accorting to the selected page"
}
],
"slots": [
{
"name": "toolbar",
"description": "toolbar area"
},
{
"name": "pagination",
"description": "pagination area"
}
],
"cssParts": [
{
"name": "parent-link",
"description": "Link to parent collection"
},
{
"name": "collection-title",
"description": "Collection title"
},
{
"name": "title",
"description": "Member title"
},
{
"name": "author",
"description": "Author"
},
{
"name": "license",
"description": "License information"
},
{
"name": "link",
"description": "Links"
}
]
},
{
"name": "dts-select-endpoint",
"path": "./src/dts-select-endpoint.js",
"description": "A dropdown to select a DTS endpoint from a configured list.\nThe list may either be given as a JSON-formatted string within the\n`endpoints` property or it can be loaded from a JSON file whose path\nis specified via the `load` property.\n\nThe JSON should contain an array of objects, each having an `url` and\n`title` property.",
"attributes": [
{
"name": "endpoint",
"description": "The currently selected endpoint. Will be set from URL parameter if present.",
"type": "string"
},
{
"name": "auto",
"description": "Set to true to automatically select the first endpoint",
"type": "boolean"
},
{
"name": "endpoints",
"description": "Array of endpoints to select from, each being an object with\nproperties `url` and `title`.",
"type": "array",
"default": "[]"
},
{
"name": "label",
"type": "string",
"default": "\"dts.endpoint\""
},
{
"name": "subscribe",
"description": "The name of the channel to subscribe to. Only events on a channel corresponding\nto this property are listened to.",
"type": "string"
},
{
"name": "subscribe-config",
"description": "Configuration object to define a channel/event mapping. Every property\nin the object is interpreted as the name of a channel and its value should\nbe an array of event names to listen to.",
"type": "object"
},
{
"name": "emit",
"description": "The name of the channel to send events to.",
"type": "string"
},
{
"name": "emit-config",
"description": "Configuration object to define a channel/event mapping. Every property\nin the object is interpreted as the name of a channel and its value should\nbe an array of event names to be dispatched.",
"type": "object"
},
{
"name": "wait-for",
"description": "A selector pointing to other components this component depends on.\nWhen method `wait` is called, it will wait until all referenced\ncomponents signal with a `pb-ready` event that they are ready and listening\nto events.",
"type": "string"
},
{
"name": "disabled",
"description": "Common property to disable the functionality associated with a component.\n`pb-highlight` and `pb-popover` react to this.",
"type": "boolean",
"default": "false"
}
],
"properties": [
{
"name": "endpoint",
"attribute": "endpoint",
"description": "The currently selected endpoint. Will be set from URL parameter if present.",
"type": "string"
},
{
"name": "auto",
"attribute": "auto",
"description": "Set to true to automatically select the first endpoint",
"type": "boolean"
},
{
"name": "endpoints",
"attribute": "endpoints",
"description": "Array of endpoints to select from, each being an object with\nproperties `url` and `title`.",
"type": "array",
"default": "[]"
},
{
"name": "label",
"attribute": "label",
"type": "string",
"default": "\"dts.endpoint\""
},
{
"name": "subscribe",
"attribute": "subscribe",
"description": "The name of the channel to subscribe to. Only events on a channel corresponding\nto this property are listened to.",
"type": "string"
},
{
"name": "subscribeConfig",
"attribute": "subscribe-config",
"description": "Configuration object to define a channel/event mapping. Every property\nin the object is interpreted as the name of a channel and its value should\nbe an array of event names to listen to.",
"type": "object"
},
{
"name": "emit",
"attribute": "emit",
"description": "The name of the channel to send events to.",
"type": "string"
},
{
"name": "emitConfig",
"attribute": "emit-config",
"description": "Configuration object to define a channel/event mapping. Every property\nin the object is interpreted as the name of a channel and its value should\nbe an array of event names to be dispatched.",
"type": "object"
},
{
"name": "waitFor",
"attribute": "wait-for",
"description": "A selector pointing to other components this component depends on.\nWhen method `wait` is called, it will wait until all referenced\ncomponents signal with a `pb-ready` event that they are ready and listening\nto events.",
"type": "string"
},
{
"name": "disabled",
"attribute": "disabled",
"description": "Common property to disable the functionality associated with a component.\n`pb-highlight` and `pb-popover` react to this.",
"type": "boolean",
"default": "false"
}
],
"events": [
{
"name": "dts-endpoint",
"description": "Sets the endpoint"
}
]
},
{
"name": "pb-ajax",
"path": "./src/pb-ajax.js",
"description": "Triggers an action on the server and shows a dialog\nupon completion. Used for the \"recompile ODD\" and other\nactions.\n\nThe parameters sent to the server-side script will be copied\nfrom the `pb-view` to which this component subscribes, see pb-update event.",
"attributes": [
{
"name": "url",
"description": "the URL to send a request to",
"type": "string"
},
{
"name": "title",
"description": "Title of link that triggers the request",
"type": "string"
},
{
"name": "event",
"description": "If set, emits an event with the given name to the channel\nthis component is subscribed to.",
"type": "string"
},
{
"name": "method",
"description": "HTTP method to use, e.g. 'get', 'post', 'delete' ...",
"type": "string",
"default": "\"get\""
},
{
"name": "confirm",
"description": "If set, display a confirmation dialog with the message text given in\nthis property. The user may cancel the action.",
"type": "string"
},
{
"name": "quiet",
"description": "Set to not show the server's response",
"type": "boolean",
"default": "false"
},
{
"name": "subscribe",
"description": "The name of the channel to subscribe to. Only events on a channel corresponding\nto this property are listened to.",
"type": "string"
},
{
"name": "subscribe-config",
"description": "Configuration object to define a channel/event mapping. Every property\nin the object is interpreted as the name of a channel and its value should\nbe an array of event names to listen to.",
"type": "object"
},
{
"name": "emit",
"description": "The name of the channel to send events to.",
"type": "string"
},
{
"name": "emit-config",
"description": "Configuration object to define a channel/event mapping. Every property\nin the object is interpreted as the name of a channel and its value should\nbe an array of event names to be dispatched.",
"type": "object"
},
{
"name": "wait-for",
"description": "A selector pointing to other components this component depends on.\nWhen method `wait` is called, it will wait until all referenced\ncomponents signal with a `pb-ready` event that they are ready and listening\nto events.",
"type": "string"
},
{
"name": "disabled",
"description": "Common property to disable the functionality associated with a component.\n`pb-highlight` and `pb-popover` react to this.",
"type": "boolean",
"default": "false"
}
],
"properties": [
{
"name": "url",
"attribute": "url",
"description": "the URL to send a request to",
"type": "string"
},
{
"name": "title",
"attribute": "title",
"description": "Title of link that triggers the request",
"type": "string"
},
{
"name": "event",
"attribute": "event",
"description": "If set, emits an event with the given name to the channel\nthis component is subscribed to.",
"type": "string"
},
{
"name": "method",
"attribute": "method",
"description": "HTTP method to use, e.g. 'get', 'post', 'delete' ...",
"type": "string",
"default": "\"get\""
},
{
"name": "confirm",
"attribute": "confirm",
"description": "If set, display a confirmation dialog with the message text given in\nthis property. The user may cancel the action.",
"type": "string"
},
{
"name": "quiet",
"attribute": "quiet",
"description": "Set to not show the server's response",
"type": "boolean",
"default": "false"
},
{
"name": "subscribe",
"attribute": "subscribe",
"description": "The name of the channel to subscribe to. Only events on a channel corresponding\nto this property are listened to.",
"type": "string"
},
{
"name": "subscribeConfig",
"attribute": "subscribe-config",
"description": "Configuration object to define a channel/event mapping. Every property\nin the object is interpreted as the name of a channel and its value should\nbe an array of event names to listen to.",
"type": "object"
},
{
"name": "emit",
"attribute": "emit",
"description": "The name of the channel to send events to.",
"type": "string"
},
{
"name": "emitConfig",
"attribute": "emit-config",
"description": "Configuration object to define a channel/event mapping. Every property\nin the object is interpreted as the name of a channel and its value should\nbe an array of event names to be dispatched.",
"type": "object"
},
{
"name": "waitFor",
"attribute": "wait-for",
"description": "A selector pointing to other components this component depends on.\nWhen method `wait` is called, it will wait until all referenced\ncomponents signal with a `pb-ready` event that they are ready and listening\nto events.",
"type": "string"
},
{
"name": "disabled",
"attribute": "disabled",
"description": "Common property to disable the functionality associated with a component.\n`pb-highlight` and `pb-popover` react to this.",
"type": "boolean",
"default": "false"
}
],
"events": [
{
"name": "pb-start-update",
"description": "Fired before the element updates its content"
},
{
"name": "pb-end-update",
"description": "Fired after the element has finished updating its content"
},
{
"name": "pb-update",
"description": "When received, copies request parameters from the event"
}
],
"slots": [
{
"name": "",
"description": "unnamed slot for link content"
},
{
"name": "title",
"description": "dialog title"
}
]
},
{
"name": "pb-authority-lookup",
"path": "./src/pb-authority-lookup.js",
"description": "Performs authority lookups via configurable connectors.",
"attributes": [
{
"name": "stopwords",
"description": "A list of comma-separated stopwords which should be excluded\nwhen searching for other occurrences of an authority in the\nHTML text",
"type": "string"
},
{
"name": "auto",
"description": "Automatically start a lookup when the query parameter is set on initialization.",
"type": "boolean"
},
{
"name": "query",
"description": "The query string to be sent to the authority",
"type": "string",
"default": "\"\""
},
{
"name": "type",
"description": "The authority type to use. Should correspond to a name defined for one of the connectors.",
"type": "string"
},
{
"name": "sort-by-label",
"description": "Enable to alphabetically reorder authority search results by label.\nOtherwise results are shown as returned by the authority.",
"type": "boolean",
"default": "false"
},
{
"name": "no-occurrences",
"description": "Do not show occurrences count, which would be fetched from the server.",
"type": "boolean",
"default": "false"
},
{
"name": "group",
"description": "A list of space- or comma-separated group names, whose members will be\nallowed to add or edit entries in the local register (if enabled).",
"type": "string",
"default": "\"\\\"tei\\\"\""
},
{
"name": "subscribe",
"description": "The name of the channel to subscribe to. Only events on a channel corresponding\nto this property are listened to.",
"type": "string"
},
{
"name": "subscribe-config",
"description": "Configuration object to define a channel/event mapping. Every property\nin the object is interpreted as the name of a channel and its value should\nbe an array of event names to listen to.",
"type": "object"
},
{
"name": "emit",
"description": "The name of the channel to send events to.",
"type": "string"
},
{
"name": "emit-config",
"description": "Configuration object to define a channel/event mapping. Every property\nin the object is interpreted as the name of a channel and its value should\nbe an array of event names to be dispatched.",
"type": "object"
},
{
"name": "wait-for",
"description": "A selector pointing to other components this component depends on.\nWhen method `wait` is called, it will wait until all referenced\ncomponents signal with a `pb-ready` event that they are ready and listening\nto events.",
"type": "string"
},
{
"name": "disabled",
"description": "Common property to disable the functionality associated with a component.\n`pb-highlight` and `pb-popover` react to this.",
"type": "boolean",
"default": "false"
}
],
"properties": [
{
"name": "stopwords",
"attribute": "stopwords",
"description": "A list of comma-separated stopwords which should be excluded\nwhen searching for other occurrences of an authority in the\nHTML text",
"type": "string"
},
{
"name": "autoLookup",
"attribute": "auto",
"description": "Automatically start a lookup when the query parameter is set on initialization.",
"type": "boolean"
},
{
"name": "query",
"attribute": "query",
"description": "The query string to be sent to the authority",
"type": "string",
"default": "\"\""
},
{
"name": "type",
"attribute": "type",
"description": "The authority type to use. Should correspond to a name defined for one of the connectors.",
"type": "string"
},
{
"name": "sortByLabel",
"attribute": "sort-by-label",
"description": "Enable to alphabetically reorder authority search results by label.\nOtherwise results are shown as returned by the authority.",
"type": "boolean",
"default": "false"
},
{
"name": "noOccurrences",
"attribute": "no-occurrences",
"description": "Do not show occurrences count, which would be fetched from the server.",
"type": "boolean",
"default": "false"
},
{
"name": "group",
"attribute": "group",
"description": "A list of space- or comma-separated group names, whose members will be\nallowed to add or edit entries in the local register (if enabled).",
"type": "string",
"default": "\"\\\"tei\\\"\""
},
{
"name": "subscribe",
"attribute": "subscribe",
"description": "The name of the channel to subscribe to. Only events on a channel corresponding\nto this property are listened to.",
"type": "string"
},
{
"name": "subscribeConfig",
"attribute": "subscribe-config",
"description": "Configuration object to define a channel/event mapping. Every property\nin the object is interpreted as the name of a channel and its value should\nbe an array of event names to listen to.",
"type": "object"
},
{
"name": "emit",
"attribute": "emit",
"description": "The name of the channel to send events to.",
"type": "string"
},
{
"name": "emitConfig",
"attribute": "emit-config",
"description": "Configuration object to define a channel/event mapping. Every property\nin the object is interpreted as the name of a channel and its value should\nbe an array of event names to be dispatched.",
"type": "object"
},
{
"name": "waitFor",
"attribute": "wait-for",
"description": "A selector pointing to other components this component depends on.\nWhen method `wait` is called, it will wait until all referenced\ncomponents signal with a `pb-ready` event that they are ready and listening\nto events.",
"type": "string"
},
{
"name": "disabled",
"attribute": "disabled",
"description": "Common property to disable the functionality associated with a component.\n`pb-highlight` and `pb-popover` react to this.",
"type": "boolean",
"default": "false"
}
],
"events": [
{
"name": "pb-authority-select",
"description": "Fired when user selects an entry from the list"
},
{
"name": "pb-authority-edit-entity",
"description": "Fired when user clicks the edit button next to an entry"
},
{
"name": "pb-authority-new-entity",
"description": "Fired when user clicks the add new entity button"
},
{
"name": "pb-authority-lookup",
"description": "When received, starts a lookup using the passed in query string and \nauthority type"
}
]
},
{
"name": "pb-autocomplete",
"path": "./src/pb-autocomplete.js",
"description": "Provides an input with attached autocomplete. The autocomplete suggestions can be read\neither from a static list or a remote endpoint to which the current user input is sent.",
"attributes": [
{
"name": "name",
"description": "Name of the form field which will be submitted",
"type": "string"
},
{
"name": "value",
"description": "Value of the form field which will be submitted",
"type": "string"
},
{
"name": "source",
"description": "Optional URL to query for suggestions. If relative, it is interpreted\nrelative to the endpoint defined on a surrounding `pb-page`.\n\nUpon autocomplete, the current input by the user will be sent with a query parameter\n`query`. The name/values of form controls nested within `pb-autocomplete` will also be\nappended to the request as parameters. This allows the server side code to distinguish\ndifferent states.",
"type": "string"
},
{
"name": "icon",
"description": "An icon to display next to the input.",
"type": "string"
},
{
"name": "placeholder",
"description": "Placeholder to display if field is empty",
"type": "string",
"default": "\"search.placeholder\""
},
{
"name": "suggestions",
"description": "A static list of suggestions. Use instead of `source`. May either be a flat array of strings,\nor an array containing objects of the form `{\"text\": \"\", \"value\": \"\"}, in which case \"value\" denotes\nthe value to be used when the enclosing form is submitted, and \"text\" is the label to be displayed.",
"type": "array",
"default": "[]"
},
{
"name": "preload",
"description": "If set, the entire list of possible suggestions will be preloaded upon initialization of the\ncomponent.",
"type": "boolean",
"default": "false"
},
{
"name": "substring",
"description": "By default suggestions are filtered by prefix, i.e. only suggestions starting with the prefix\ntyped by the user are shown. Set this property to true to search for the user-provided string\nanywhere within the suggestion text.",
"type": "boolean",
"default": "false"
},
{
"name": "subscribe",
"description": "The name of the channel to subscribe to. Only events on a channel corresponding\nto this property are listened to.",
"type": "string"
},
{
"name": "subscribe-config",
"description": "Configuration object to define a channel/event mapping. Every property\nin the object is interpreted as the name of a channel and its value should\nbe an array of event names to listen to.",
"type": "object"
},
{
"name": "emit",
"description": "The name of the channel to send events to.",
"type": "string"
},
{
"name": "emit-config",
"description": "Configuration object to define a channel/event mapping. Every property\nin the object is interpreted as the name of a channel and its value should\nbe an array of event names to be dispatched.",
"type": "object"
},
{
"name": "wait-for",
"description": "A selector pointing to other components this component depends on.\nWhen method `wait` is called, it will wait until all referenced\ncomponents signal with a `pb-ready` event that they are ready and listening\nto events.",
"type": "string"
},
{
"name": "disabled",
"description": "Common property to disable the functionality associated with a component.\n`pb-highlight` and `pb-popover` react to this.",
"type": "boolean",
"default": "false"
}
],
"properties": [
{
"name": "name",
"attribute": "name",
"description": "Name of the form field which will be submitted",
"type": "string"
},
{
"name": "value",
"attribute": "value",
"description": "Value of the form field which will be submitted",
"type": "string"
},
{
"name": "source",
"attribute": "source",
"description": "Optional URL to query for suggestions. If relative, it is interpreted\nrelative to the endpoint defined on a surrounding `pb-page`.\n\nUpon autocomplete, the current input by the user will be sent with a query parameter\n`query`. The name/values of form controls nested within `pb-autocomplete` will also be\nappended to the request as parameters. This allows the server side code to distinguish\ndifferent states.",
"type": "string"
},
{
"name": "icon",
"attribute": "icon",
"description": "An icon to display next to the input.",
"type": "string"
},
{
"name": "placeholder",
"attribute": "placeholder",
"description": "Placeholder to display if field is empty",
"type": "string",
"default": "\"search.placeholder\""
},
{
"name": "suggestions",
"attribute": "suggestions",
"description": "A static list of suggestions. Use instead of `source`. May either be a flat array of strings,\nor an array containing objects of the form `{\"text\": \"\", \"value\": \"\"}, in which case \"value\" denotes\nthe value to be used when the enclosing form is submitted, and \"text\" is the label to be displayed.",
"type": "array",
"default": "[]"
},
{
"name": "lastSelected"
},
{
"name": "preload",
"attribute": "preload",
"description": "If set, the entire list of possible suggestions will be preloaded upon initialization of the\ncomponent.",
"type": "boolean",
"default": "false"
},
{
"name": "substring",
"attribute": "substring",
"description": "By default suggestions are filtered by prefix, i.e. only suggestions starting with the prefix\ntyped by the user are shown. Set this property to true to search for the user-provided string\nanywhere within the suggestion text.",
"type": "boolean",
"default": "false"
},
{
"name": "subscribe",
"attribute": "subscribe",
"description": "The name of the channel to subscribe to. Only events on a channel corresponding\nto this property are listened to.",
"type": "string"
},
{
"name": "subscribeConfig",
"attribute": "subscribe-config",
"description": "Configuration object to define a channel/event mapping. Every property\nin the object is interpreted as the name of a channel and its value should\nbe an array of event names to listen to.",
"type": "object"
},
{
"name": "emit",
"attribute": "emit",
"description": "The name of the channel to send events to.",
"type": "string"
},
{
"name": "emitConfig",
"attribute": "emit-config",
"description": "Configuration object to define a channel/event mapping. Every property\nin the object is interpreted as the name of a channel and its value should\nbe an array of event names to be dispatched.",
"type": "object"
},
{
"name": "waitFor",
"attribute": "wait-for",
"description": "A selector pointing to other components this component depends on.\nWhen method `wait` is called, it will wait until all referenced\ncomponents signal with a `pb-ready` event that they are ready and listening\nto events.",
"type": "string"
},
{
"name": "disabled",
"attribute": "disabled",
"description": "Common property to disable the functionality associated with a component.\n`pb-highlight` and `pb-popover` react to this.",
"type": "boolean",
"default": "false"
}
],
"slots": [
{
"name": "",
"description": "default unnamed slot"
}
],
"cssProperties": [
{
"name": "--pb-search-label-color",
"description": "Color of the label and underline"
},
{
"name": "--pb-search-input-color",
"description": "Text color for input field"
},
{
"name": "--pb-search-focus-color",
"description": "Color for label and underline if input has focus"
},
{
"name": "--pb-search-suggestions-color",
"description": "Color for the labels shown in the suggestions dropdown"
},
{
"name": "--pb-search-suggestions-background",
"description": "Background for the suggestions dropdown"
}
]
},
{
"name": "pb-blacklab-highlight",
"path": "./src/pb-blacklab-highlight.js",
"description": "This component queries the blacklab API of TEI-Publisher for a list of text matches\nin a given document. The query is given as a CQL querystring (see pattern property).\n\n**Note**: There's no demo for this component yet as it would need a blacklab instance. \n\nThe component displays 2 navigation buttons to jump to previous / next match and\na display of the current index and total number of matches.\n\nWhen navigating and the requested match is not on the current page a pb-refresh is dispatched\nto load the correct page. Once the page has dispatch pb-update this component will refresh and trigger\nloading of matches from the API.\n\nHighlighting is accomplished by marking the matched text with the following CSS classes:\n- kwic-start - for the start of the match\n- kwic-end - for the end of the match (might be on the same node as 'kwic-start'\n- kwic-current - to set a different highlight color for the current match\n\nWhen navigating the browser URL will be updated to allow bookmarks for a certain match.\n\nNote: this component does no caching of query results yet. In case of heavier use the data can be taken\nfrom localStorage ('pb-kwic-results') as usually pb-kwic-results has been visited by the user before. For\nstability reasons this was not done in this version.\n\n\nWhen data are present highlights are processed.",
"attributes": [
{
"name": "current",
"description": "one-based index of the current highlight",
"type": "number"
},
{
"name": "view",
"description": "the id of the view for which highlights shall be displayed",
"type": "string"
},
{
"name": "pattern",
"description": "CQL search pattern send to the Blacklab API",
"type": "string"
},
{
"name": "match",
"description": "optional match parameter on the URL. If present page will display appropriate hit",
"type": "string"
},
{
"name": "docid",
"description": "the document id",
"type": "string"
},
{
"name": "hits",
"description": "holds the results of querying the 'api/blacklab/doc' endpoint",
"type": "array"
},
{
"name": "kwicData",
"description": "contains full response after successful loading",
"type": "object"
},
{
"name": "matchParam",
"description": "optional: may hold id of match element to be highlighted",
"type": "string"
},
{
"name": "pageId",
"description": "the pageId to display",
"type": "string"
},
{
"name": "per-document",
"description": "how many hits shall be loaded. Defaults to 100. This value is passed to the blacklab API",
"type": "number"
},
{
"name": "subscribe",
"description": "The name of the channel to subscribe to. Only events on a channel corresponding\nto this property are listened to.",
"type": "string"
},
{
"name": "subscribe-config",
"description": "Configuration object to define a channel/event mapping. Every property\nin the object is interpreted as the name of a channel and its value should\nbe an array of event names to listen to.",
"type": "object"
},
{
"name": "emit",
"description": "The name of the channel to send events to.",
"type": "string"
},
{
"name": "emit-config",
"description": "Configuration object to define a channel/event mapping. Every property\nin the object is interpreted as the name of a channel and its value should\nbe an array of event names to be dispatched.",
"type": "object"
},
{
"name": "wait-for",
"description": "A selector pointing to other components this component depends on.\nWhen method `wait` is called, it will wait until all referenced\ncomponents signal with a `pb-ready` event that they are ready and listening\nto events.",
"type": "string"
},
{
"name": "disabled",
"description": "Common property to disable the functionality associated with a component.\n`pb-highlight` and `pb-popover` react to this.",
"type": "boolean",
"default": "false"
}
],
"properties": [
{
"name": "current",
"attribute": "current",
"description": "one-based index of the current highlight",
"type": "number"
},
{
"name": "view",
"attribute": "view",
"description": "the id of the view for which highlights shall be displayed",
"type": "string"
},
{
"name": "pattern",
"attribute": "pattern",
"description": "CQL search pattern send to the Blacklab API",
"type": "string"
},
{
"name": "match",
"attribute": "match",
"description": "optional match parameter on the URL. If present page will display appropriate hit",
"type": "string"
},
{
"name": "docid",
"attribute": "docid",
"description": "the document id",
"type": "string"
},
{
"name": "hits",
"attribute": "hits",
"description": "holds the results of querying the 'api/blacklab/doc' endpoint",
"type": "array"
},
{
"name": "kwicData",
"attribute": "kwicData",
"description": "contains full response after successful loading",
"type": "object"
},
{
"name": "matchParam",
"attribute": "matchParam",
"description": "optional: may hold id of match element to be highlighted",
"type": "string"
},
{
"name": "pageId",
"attribute": "pageId",
"description": "the pageId to display",
"type": "string"
},
{
"name": "perDocument",
"attribute": "per-document",
"description": "how many hits shall be loaded. Defaults to 100. This value is passed to the blacklab API",
"type": "number"
},
{
"name": "subscribe",
"attribute": "subscribe",
"description": "The name of the channel to subscribe to. Only events on a channel corresponding\nto this property are listened to.",
"type": "string"
},
{
"name": "subscribeConfig",
"attribute": "subscribe-config",
"description": "Configuration object to define a channel/event mapping. Every property\nin the object is interpreted as the name of a channel and its value should\nbe an array of event names to listen to.",
"type": "object"
},
{
"name": "emit",
"attribute": "emit",
"description": "The name of the channel to send events to.",
"type": "string"
},
{
"name": "emitConfig",
"attribute": "emit-config",
"description": "Configuration object to define a channel/event mapping. Every property\nin the object is interpreted as the name of a channel and its value should\nbe an array of event names to be dispatched.",
"type": "object"
},
{
"name": "waitFor",
"attribute": "wait-for",
"description": "A selector pointing to other components this component depends on.\nWhen method `wait` is called, it will wait until all referenced\ncomponents signal with a `pb-ready` event that they are ready and listening\nto events.",
"type": "string"
},
{
"name": "disabled",
"attribute": "disabled",
"description": "Common property to disable the functionality associated with a component.\n`pb-highlight` and `pb-popover` react to this.",
"type": "boolean",
"default": "false"
}
]
},
{
"name": "pb-blacklab-results",
"path": "./src/pb-blacklab-results.js",
"description": "This component talks to the blacklab API of TEI-Publisher to\nload KWIC results from a remote Blacklab instance. It displays\na list of documents that match the query given by `pattern`.\n\n**Note**: There's no demo for this component yet as it would need a blacklab instance.\n\nFor each document a list of hits (matches) is displayed each showing the hit\nin context of the text.\n\nDocument Id and hits are links that can be used to open the document\nand navigate through the hits with the help of pb-view and pb-blacklab-highlight\ncomponents.",
"attributes": [
{
"name": "per-page",
"description": "how many hits per page. will be passed down to pb-paginate",
"type": "number"
},
{
"name": "pattern",
"description": "must be a valid CQL query as a string",
"type": "string"
},
{
"name": "target",
"description": "target for links",
"type": "string"
},
{
"name": "data",
"description": "results from a kwic search",
"type": "object",
"default": "{\"documents\":[]}"
},
{
"name": "documents",
"type": "array",
"default": "[]"
},
{
"name": "first",
"description": "first document number to be displayed",
"type": "number",
"default": "1"
},
{
"name": "doc",
"description": "document id",
"type": "string"
},
{
"name": "sort",
"description": "sort order of query results",
"type": "string"
},
{
"name": "subscribe",
"description": "The name of the channel to subscribe to. Only events on a channel corresponding\nto this property are listened to.",
"type": "string"
},
{
"name": "subscribe-config",
"description": "Configuration object to define a channel/event mapping. Every property\nin the object is interpreted as the name of a channel and its value should\nbe an array of event names to listen to.",
"type": "object"
},
{
"name": "emit",
"description": "The name of the channel to send events to.",
"type": "string"
},
{
"name": "emit-config",
"description": "Configuration object to define a channel/event mapping. Every property\nin the object is interpreted as the name of a channel and its value should\nbe an array of event names to be dispatched.",
"type": "object"
},
{
"name": "wait-for",
"description": "A selector pointing to other components this component depends on.\nWhen method `wait` is called, it w