From 423ce201bfca128f87a16733d4b06502c3771c35 Mon Sep 17 00:00:00 2001 From: Julian Knight <1591850+TotallyInformation@users.noreply.github.com> Date: Sun, 29 Sep 2024 18:00:50 +0100 Subject: [PATCH] Updates --- README.md | 214 +- alpha/labelled-value.js | 2 +- docs/dev.md | 13 +- docs/{data-list.md => dynamic-list.md} | 0 docs/ideas.md | 58 + docs/jsdoc/Alpha.UibThemeChanger.html | 4 +- docs/jsdoc/Alpha.html | 1302 +- docs/jsdoc/Beta.html | 11436 +++++++++++++++- docs/jsdoc/ButtonSend.html | 88 +- docs/jsdoc/CallOut.html | 2249 +++ docs/jsdoc/CollapsibleHeadings.html | 64 +- docs/jsdoc/ComponentTemplate.html | 48 +- docs/jsdoc/StateTimeline.html | 4 +- docs/jsdoc/SyntaxHighlight.html | 3145 +++++ docs/jsdoc/VisibleConsole.html | 88 +- docs/jsdoc/alpha_chart-frappe.js.html | 4 +- docs/jsdoc/alpha_chart-high.js.html | 4 +- docs/jsdoc/alpha_component-template.js.html | 69 +- docs/jsdoc/alpha_definition-list.js.html | 4 +- docs/jsdoc/alpha_dynamic-list.js.html | 192 + docs/jsdoc/alpha_gauge-steel.js.html | 4 +- docs/jsdoc/alpha_ghost-thermometer.js.html | 4 +- docs/jsdoc/alpha_html-include.js.html | 160 - docs/jsdoc/alpha_labelled-value.js.html | 4 +- docs/jsdoc/alpha_multi-way-switch.js.html | 4 +- docs/jsdoc/alpha_nav-bar.js.html | 4 +- .../alpha_not-complete_chart-apex.js.html | 4 +- .../jsdoc/alpha_not-complete_chart-js.js.html | 4 +- .../alpha_not-complete_chart-plotly.js.html | 4 +- .../alpha_not-complete_container-br.js.html | 143 + .../alpha_not-complete_simple-tree.js.html | 4 +- .../jsdoc/alpha_not-complete_uib-wrap.js.html | 4 +- docs/jsdoc/alpha_simple-card.js.html | 4 +- docs/jsdoc/alpha_simple-container.js.html | 4 +- docs/jsdoc/alpha_simple-gauge.js.html | 4 +- docs/jsdoc/alpha_simple-switch.js.html | 9 +- docs/jsdoc/alpha_state-timeline.js.html | 4 +- docs/jsdoc/alpha_syntax-highlight.js.html | 251 - docs/jsdoc/alpha_uib-theme-changer.js.html | 4 +- docs/jsdoc/global.html | 496 +- docs/jsdoc/index.html | 163 +- docs/jsdoc/module.exports.html | 964 +- docs/jsdoc/src_button-send.js.html | 97 +- docs/jsdoc/src_call-out.js.html | 352 + docs/jsdoc/src_collapsible-headings.js.html | 62 +- docs/jsdoc/src_html-include.js.html | 327 + docs/jsdoc/src_syntax-highlight.js.html | 302 + docs/jsdoc/src_visible-console.js.html | 153 +- docs/readme/alpha/component-template.md | 31 +- docs/readme/alpha/html-include.md | 10 - docs/readme/alpha/syntax-highlight.md | 19 - docs/readme/button-send.md | 26 +- docs/readme/call-out.md | 47 + docs/readme/collapsible-headings.md | 37 +- docs/readme/component-template.md | 114 +- docs/readme/html-include.md | 48 + docs/readme/syntax-highlight.md | 56 + .../ti-web-components.html-data.json | 257 +- 58 files changed, 20596 insertions(+), 2576 deletions(-) rename docs/{data-list.md => dynamic-list.md} (100%) create mode 100644 docs/ideas.md create mode 100644 docs/jsdoc/CallOut.html create mode 100644 docs/jsdoc/SyntaxHighlight.html create mode 100644 docs/jsdoc/alpha_dynamic-list.js.html delete mode 100644 docs/jsdoc/alpha_html-include.js.html create mode 100644 docs/jsdoc/alpha_not-complete_container-br.js.html delete mode 100644 docs/jsdoc/alpha_syntax-highlight.js.html create mode 100644 docs/jsdoc/src_call-out.js.html create mode 100644 docs/jsdoc/src_html-include.js.html create mode 100644 docs/jsdoc/src_syntax-highlight.js.html delete mode 100644 docs/readme/alpha/html-include.md delete mode 100644 docs/readme/alpha/syntax-highlight.md create mode 100644 docs/readme/call-out.md create mode 100644 docs/readme/html-include.md create mode 100644 docs/readme/syntax-highlight.md diff --git a/README.md b/README.md index 05d8817..da04e41 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,13 @@ Additional documentation is available in the docs folder which is also exposed a Install locally using npm or access via [jsdelivr](https://www.jsdelivr.com/package/gh/totallyinformation/web-components). +See the [component documentation](docs) for specific usage information for each component. + +
+Useage details + +### File locations + Files for live use are in the `dist` folder. The alpha quality components are in the `dist/alpha` folder. Each component has 4 files but you only need 1 of them. @@ -26,16 +33,83 @@ If using ES Modules, import the `*.esm.min.js` files in your module code. import 'https://cdn.jsdelivr.net/gh/totallyinformation/web-components/dist/visible-console.esm.min.js' ``` -> [!TIP] -> If using with UIBUILDER for Node-RED, load _after_ the uibuilder client library so that the component registers that uibuilder is in use and becomes responsive to it. - - Each component self-registers its custom HTML tag. They also globally self-register their class name so that you can access static variables and functions if needed. The tag name and global name are both listed in the tables below. When using your browser's developer tools, the matching `.map` file will be loaded. This ensures that reported line numbers and full variable/function names are reported. The source for the components is in the `src` folder for the main components and in the `alpha` folder for the alpha quality components. +### Useage with UIBUILDER for Node-RED + +* You can install the components library using UIBUILDER's library manager. +* In your front-end HTML, load the components _after_ the uibuilder client library so that the components register that uibuilder is in use and becomes responsive to it. + +If using with Node-RED, you can install the components with the help of node-red-contrib-uibuilder. The uibuilder node has a library manager feature and you should use that to install the repository direct from GitHub (requires uibuilder v5+). In that case, uibuilder adds the repository to its web server and you can access them as: `../uibuilder/vendor/@totallyinformation/web-components/dist/button-send.js`. See below for details. + +### Local installation + +If you wish to install locally, you can npm install from the GitHub repository with `npm install totallyinformation/web-components`. If these ever get published to npm, you would install with `npm install @totallyinformation/web-components`. However, note that, at this point, I am not intending to publish them quickly as they are still evolving quite rapidly. + +If installing locally, you will need to make the installed `web-components/components/` folder available to your web server as a static resource folder. + +### Loading components into your web page + +The individual component documentation contains details on how to load the component files. In general, however, there are two choices on how to load them. + +#### Load as an ECMA module + +This is the preferred method. However, it is generally best to load via a script module. While you can load them via your HTML as a script link, you loose some capability this way. + +```html + +``` + +#### Load from HTML with a script tag + +They **must** be loaded as a type "module". + +```html + +``` + +Or from the local resource of course. Note that this is not recommended. It is better to load them from a script module and then you can use an import statement. + +#### Load from a standard script + +Alternatively, you can load them in your main JavaScript script using dynamic imports as: + +```html + +``` + +The disadvantage of this method is that the import function is asynchronous and so your own code may try to execute before the module has loaded. Generally, this won't matter if you aren't assigning the import to a variable. If you are, you may need to use top-level async or the promise-style then/catch. + +The potential advantage of this approach is that you can access exported variables and methods from the component if any are available (see the syntax-highlight component for an example). + +### Visual Studio Code (VSCode) Intelligence + +VSCode supposts the use of HTML and CSS Custom Data JSON files that describe custom web components and CSS in a way that gives some intelligence to the editor when writing HTML and CSS code. + +This collection of web components uses [Web Component Analyzer](https://github.com/runem/web-component-analyzer) to help document the components. It is also used to create an html custom data file that can be added to VSCode or to a specific workspace or folder settings to provide additional Intellisense help for the components. + +To do so, find the html custom data setting in VSCode settings and add: + +``` +/path/to/totallyinformation/web-components/vscode-descriptors/ti-web-components.html-data.json +``` + + +
+ +### Demos + +All of the components have demo web pages in `tests`. There is a built-in Node.js mini web server. Running the npm script `tests` will start the server on port 8080. Opening `http://127.0.0.1:8080` or `http://127.0.0.1:8080/list.html` will give a list of all available demos. + + ## Components These components can be considered `beta` quality or better. They may not be complete but they should have basic usefulness. @@ -119,138 +193,6 @@ There is also a `alpha/no-complete` folder. This contains some components not ye * `libs/uib-brand.css` - a copy of the alternate (new) stylesheet from uibuilder that these components can use. - -## Requirements - -These are the requirements for any web component to be included in this repository. - -* MUST be standalone with no external requirements. Common internal library modules may be permitted however. -* MUST be useable in the majority of modern browsers, anything supporting ES2019+ should be usable. IE will not be supported. -* MUST use ES6+. Maxumum JavaScript version should be 2 years behind the leading edge and only features supported by the majority of mainstream browsers are allowed. Other features MAY be permitted as long as they are optional and do not produce errors. -* MUST be linted using ESLINT. SHOULD use JavaScript Standard format (with some variations documented in the `.eslintrc.js` file). -* MUST self-register the custom tag using `customElements.define`. -* MUST use a Class name using a _CamelCase_ version of the component name with an initial upper-case letter (e.g. `syntax-highlight` will be `export default class SyntaxHighlight extends HTMLElement { ... }` ). -* MUST be documented in the `docs` folder.{} - -* SHOULD have a `` to allow nested rich content (where it makes sense). -* SHOULD export a _camelCase_ version of the component-name which contains any useful methods and data. (e.g. `syntax-highlight` should export `syntaxHighlight`). -* SHOULD meet the [Web Components Gold Standard](https://github.com/webcomponents/gold-standard/wiki). -* SHOULD define any shadow template content and required component name as static variables in the class. - -* [Best practices](https://web.dev/articles/custom-elements-best-practices) - -### HTML Standards limitations - -* Custom HTML tags MUST use pascal-case with at least 1 `-`. -* Custom HTML tags MUST use lower-case attribute names. - -## Installation and loading - -You can use these components directly from the jsdelivr CDN by referencing like: `https://cdn.jsdelivr.net/gh/totallyinformation/web-components@master/components/button-send.js`. So no install is required if you are happy to load from the Internet. - -### Local installation - -If you wish to install locally, you can npm install from the GitHub repository with `npm install totallyinformation/web-components`. If these ever get published to npm, you would install with `npm install @totallyinformation/web-components`. However, note that, at this point, I am not intending to publish them quickly as they are still evolving quite rapidly. - -If installing locally, you will need to make the installed `web-components/components/` folder available to your web server as a static resource folder. - -### Using with Node-RED and uibuilder - -If using with Node-RED, you can install the components with the help of node-red-contrib-uibuilder. The uibuilder node has a library manager feature and you should use that to install the repository direct from GitHub (requires uibuilder v5+). In that case, uibuilder adds the repository to its web server and you can access them as: `../uibuilder/vendor/@totallyinformation/web-components/components/button-send.js`. See below for details. - -### Loading components into your web page - -The individual component documentation contains details on how to load the component files. In general, however, there are two choices on how to load them. - -#### Load as an ECMA module - -This is the preferred method. However, it is generally best to load via a script module. While you can load them via your HTML as a script link, you loose some capability this way. - -```html - -``` - -#### Load from HTML with a script tag - -They **must** be loaded as a type "module". - -```html - -``` - -Or from the local resource of course. Note that this is not recommended. It is better to load them from a script module and then you can use an import statement. - -#### Load from a standard script - -Alternatively, you can load them in your main JavaScript script using dynamic imports as: - -```html - -``` - -The disadvantage of this method is that the import function is asynchronous and so your own code may try to execute before the module has loaded. Generally, this won't matter if you aren't assigning the import to a variable. If you are, you may need to use top-level async or the promise-style then/catch. - -The potential advantage of this approach is that you can access exported variables and methods from the component if any are available (see the syntax-highlight component for an example). - - -## Stand-alone use - -### Installation and loading - -See the general information above. - -### Using the components - -See the [component documentation](docs) for specific usage information for each component. - - - -## Use with [Node-RED](https://nodered.org/) and [node-red-contrib-uibuilder](https://github.com/TotallyInformation/node-red-contrib-uibuilder) - -### Installation and loading - -You can, of course, use the components direct from a CDN as shown above. - -Otherwise, install this repository using the library manager in a uibuilder node in Node-RED. - -uibuilder library manager - -Which results in something like: - -uibuilder installed library - -Noting that this library does not actually have a default script so the listed on is spurious. - -You can then access the components by loading them into your html or JavaScript as shown above. - -### Using the components - -The components can, of course, be used in the same way as if not using uibuilder. However, there are additional capabilities aimed at making their use in conjunction with Node-RED and uibuilder even easier. Specifically reducing the amount of code required to use them. - -Components will automatically recognise when uibuilder is being used. They will each: - -* Have a specific msg schema - when a msg with the matching schema is sent from Node-RED via uibuilder, a singular instance of the component on a page will be automatically updated. Where multiple instances are present, the msg must include an html id so that the msg will target that instance. - -See the [component documentation](docs) for specific usage information for each component. - - - -## Visual Studio Code (VSCode) Intelligence - -VSCode supposts the use of HTML and CSS Custom Data JSON files that describe custom web components and CSS in a way that gives some intelligence to the editor when writing HTML and CSS code. - -This collection of web components uses [Web Component Analyzer](https://github.com/runem/web-component-analyzer) to help document the components. It is also used to create an html custom data file that can be added to VSCode or to a specific workspace or folder settings to provide additional Intellisense help for the components. - -To do so, find the html custom data setting in VSCode settings and add: - -``` -/path/to/totallyinformation/web-components/vscode-descriptors/ti-web-components.html-data.json -``` - ## Discussions and suggestions The best place to ask questions, or suggest improvements about these components is the [GitHub discussion board for this repository](https://github.com/TotallyInformation/web-components/discussions). diff --git a/alpha/labelled-value.js b/alpha/labelled-value.js index d05e9c5..598f857 100644 --- a/alpha/labelled-value.js +++ b/alpha/labelled-value.js @@ -172,7 +172,7 @@ export default class LabelledValue extends HTMLElement { } } - document.dispatchEvent(new CustomEvent(`${componentName}:attribChanged`, { + document.dispatchEvent(new CustomEvent(`${this.localName}:attribChanged`, { bubbles: true, composed: true, detail: { diff --git a/docs/dev.md b/docs/dev.md index 5896c2c..4dfb1ac 100644 --- a/docs/dev.md +++ b/docs/dev.md @@ -8,11 +8,14 @@ updated: 2024-09-22 14:34:05 ## Standards +These are the requirements and standards for any web component to be included in this repository. + +* MUST be standalone with no external requirements. Common include library modules (e.g. charts) MAY be imported however. The resulting file MUST be useable stand-alone. +* MUST be useable in the majority of modern browsers, anything supporting ES2019+ should be usable. IE will not be supported. + * All components MUST self register the custom tag AND their Class Name. All tag namess are lower-case with at least one dash (_kebab-case_) . All Class names start with an upper-case letter and the name is the tag name in _PascalCase_. MUST self-register the custom tag using `customElements.define`. * The Class is the default export and is also self-registered to the window global. * MUST provide source-code in either `./src` (for production ready components) or `./alpha`. Any component in `./src` MUST be usable even if it is not feature complete. -* MUST be useable in the majority of modern browsers. IE will not be supported. -* MUST be standalone with no external requirements. Common include library modules (e.g. charts) MAY be imported however. The resulting file MUST be useable stand-alone. * MUST have both IIFE and ESM minimised versions built using ESBUILD. The built versions should target common browser features no newer than 2-years old. Built versions will be in the `./dist` folder with alpha quality components built to the `./dist/alpha` folder. All built versions will include `.map` files for debugging. * MUST use JSDoc to self-document. MUST use ESLint and follow the modified _JavaScript Standard_ formatting. * MUST provide a document file in `./docs` describing use, settings, etc. @@ -29,10 +32,16 @@ updated: 2024-09-22 14:34:05 * MUST NOT be dependent on UIBUILDER for Node-RED. SHOULD be enhanced if the UIBUILDER client library is loaded. * SHOULD be derived from the `./libs/ti-base-component.js` class to inherit standard properties and methods. * SHOULD meet the [Web Components Gold Standard](https://github.com/webcomponents/gold-standard/wiki). +* SHOULD follow [Best practices](https://web.dev/articles/custom-elements-best-practices). * SHOULD have a `` to allow nested rich content (where it makes sense). * Where _static_ properties or methods are referred to, `this.constructor` should be used rather than the class name. This avoids errors should the class ever be renamed or the code copied to a different class. Similarly, `this.localName` can be used to get the class name as text which should be used in debugging and error logging. +### HTML Standards limitations + +* Custom HTML tags MUST use pascal-case with at least 1 `-`. +* Custom HTML tags MUST use lower-case attribute names. + ## Styling Where shadow dom is used (most of these components), note that style isolation between parent and component instance applies. diff --git a/docs/data-list.md b/docs/dynamic-list.md similarity index 100% rename from docs/data-list.md rename to docs/dynamic-list.md diff --git a/docs/ideas.md b/docs/ideas.md new file mode 100644 index 0000000..35e9128 --- /dev/null +++ b/docs/ideas.md @@ -0,0 +1,58 @@ +--- +title: Ideas for future components and enhancements +description: | + Where might we go? +created: 2024-09-25 02:04:04 +updated: 2024-09-28 13:24:19 +--- + +## Possible future components + +### Version of uib-var + +* Shows content from a JavaScript variable. +* Possibly allows dynamic overrides of attributes. +* Test with component version text. + +### `light-switch` - on/off, level, colour. Location. + +### `layout-area` - Switch between a few core layouts such as blog & dash +#### `area-*` - Define an area for a layout, e.g. `area-main`, `area-head`, `area-foot`, `area-sidebar` - all included in the parent component's package. + +### `smart-list` - 2-way data controllable list wrapper + +* Wraps around lists to easily add different entry formats including numbering (nested), icons, checkboxes, prefixes (e.g. dates) +* Dynamic property to store contents - ideally 2-way +* Multiple ways to update content: DOM changes, custom event, proxied property. For uibuilder: auto-topic updates +* Optionally drag/drop to re-order with data property updated +* Optionally content editable - double-click on icon, prefix and text to edit +* Optional checkbox with data store +* UIBUILDER data enabled. Controllable updates back to Node-RED (e.g. when no longer visible or immediate) + +### `smart-report` - Like collapsible-headings but also data controllable + +* Wraps around a collection of `` and `

`/`

`/`` tags adding smarter formatting and control +* Optional collapsible headings +* Optional numbered headings (including nested numbers), format controllable +* Dynamic property to store contents - ideally 2-way +* Multiple ways to update content: DOM changes, custom event, proxied property. For uibuilder: auto-topic updates +* *Maybe - Optional drag/drop re-oder* +* *Maybe - double-click to content edit* + +### `linear-gauge` + +* horizontal/vertical +* Segmented (led style) or smooth +* Multiple colour segments +* Optional current value with positioning + +Refs: [1](https://discourse.nodered.org/t/gauges-for-dashboard-2-0-made-with-ui-template/85955), Discourse vert indicators. + + +## Thoughts + +* Any way to have a component that is able to get meta-data from another component. Eg version, docs, etc? + +* Article with heading should be collapsible + +* Each component could have a getter to output their own TODO lists! diff --git a/docs/jsdoc/Alpha.UibThemeChanger.html b/docs/jsdoc/Alpha.UibThemeChanger.html index 8a1e521..4e8ef5e 100644 --- a/docs/jsdoc/Alpha.UibThemeChanger.html +++ b/docs/jsdoc/Alpha.UibThemeChanger.html @@ -9926,13 +9926,13 @@
Returns:

- Documentation generated by JSDoc 4.0.3 on Tue Sep 24 2024 19:36:38 GMT+0100 (British Summer Time) + Documentation generated by JSDoc 4.0.3 on Sun Sep 29 2024 17:56:15 GMT+0100 (British Summer Time)
diff --git a/docs/jsdoc/Alpha.html b/docs/jsdoc/Alpha.html index bb65272..dcafe28 100644 --- a/docs/jsdoc/Alpha.html +++ b/docs/jsdoc/Alpha.html @@ -64,6 +64,653 @@

Alpha

+ + + + + + +
Source:
+
+ + + + + + + + + + + + + + + + + + + +

Classes

+ +
+
UibThemeChanger
+
+ +
UibThemeChanger
+
+
+ + + + + + + + + + + +

Methods

+ + + + + + + +

(static) deepAssign Object deep merger +method _uibMsgHandler If UIBUILDER for Node-RED is active, auto-handle incoming messages targetted at instance id()

+ + + + + + +
+ A zero dependency web component that will display JavaScript console output on-page. +
+ + + + + + + + + + + + + +
Properties:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
version + + +string + + + + Static. The component version string (date updated). Also has a getter.
uib + + +boolean + + + + True if UIBUILDER for Node-RED is loaded
$ + + +function + + + + jQuery-like shadow dom selector
$$ + + +function + + + + jQuery-like shadow dom multi-selector
_iCount + + +number + + + + The component version string (date updated)
opts + + +object + + + + This components controllable options - get/set using the `config()` method +Other props: +By default, all attributes are also created as properties
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + +
Fires:
+
    +
  • state-timeline:connected - When an instance of the component is attached to the DOM. `evt.event:details` contains the details of the element.
  • + +
  • state-timeline:disconnected - When an instance of the component is removed from the DOM. `evt.event:details` contains the details of the element.
  • + +
  • state-timeline:attribChanged - When a watched attribute changes. `evt.details` contains the details of the change. +NOTE that listeners can be attached either to the `document` or to the specific element instance. + +Standard watched attributes (common across all my components):event:
  • +
+ + + + + + + + + + + + + + + + + + + + + + +

(static) deepAssign Object deep merger +method _uibMsgHandler If UIBUILDER for Node-RED is active, auto-handle incoming messages targetted at instance id()

+ + + + + + +
+ A zero dependency web component that will display JavaScript console output on-page. +
+ + + + + + + + + + + + + +
Properties:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
version + + +string + + + + Static. The component version string (date updated). Also has a getter.
uib + + +boolean + + + + True if UIBUILDER for Node-RED is loaded
$ + + +function + + + + jQuery-like shadow dom selector
$$ + + +function + + + + jQuery-like shadow dom multi-selector
_iCount + + +number + + + + The component version string (date updated)
opts + + +object + + + + This components controllable options - get/set using the `config()` method +Other props: +By default, all attributes are also created as properties
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + +
Fires:
+
    +
  • state-timeline:connected - When an instance of the component is attached to the DOM. `evt.event:details` contains the details of the element.
  • + +
  • state-timeline:disconnected - When an instance of the component is removed from the DOM. `evt.event:details` contains the details of the element.
  • + +
  • state-timeline:attribChanged - When a watched attribute changes. `evt.details` contains the details of the change. +NOTE that listeners can be attached either to the `document` or to the specific element instance. + +Standard watched attributes (common across all my components):event:
  • +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +

Alpha

+ + +
+ +
+
+ + +
Namespace
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + @@ -717,7 +1364,654 @@

Alpha

Source:
+ + + + + + + +
+ + + + +
+ + + + + + +

Classes

+ +
+
UibThemeChanger
+
+ +
UibThemeChanger
+
+
+ + + + + + + + + + + +

Methods

+ + + + + + + +

(static) deepAssign Object deep merger +method _uibMsgHandler If UIBUILDER for Node-RED is active, auto-handle incoming messages targetted at instance id()

+ + + + + + +
+ A zero dependency web component that will display JavaScript console output on-page. +
+ + + + + + + + + + + + + +
Properties:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
version + + +string + + + + Static. The component version string (date updated). Also has a getter.
uib + + +boolean + + + + True if UIBUILDER for Node-RED is loaded
$ + + +function + + + + jQuery-like shadow dom selector
$$ + + +function + + + + jQuery-like shadow dom multi-selector
_iCount + + +number + + + + The component version string (date updated)
opts + + +object + + + + This components controllable options - get/set using the `config()` method +Other props: +By default, all attributes are also created as properties
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + +
Fires:
+
    +
  • state-timeline:connected - When an instance of the component is attached to the DOM. `evt.event:details` contains the details of the element.
  • + +
  • state-timeline:disconnected - When an instance of the component is removed from the DOM. `evt.event:details` contains the details of the element.
  • + +
  • state-timeline:attribChanged - When a watched attribute changes. `evt.details` contains the details of the change. +NOTE that listeners can be attached either to the `document` or to the specific element instance. + +Standard watched attributes (common across all my components):event:
  • +
+ + + + + + + + + + + + + + + + + + + + + + +

(static) deepAssign Object deep merger +method _uibMsgHandler If UIBUILDER for Node-RED is active, auto-handle incoming messages targetted at instance id()

+ + + + + + +
+ A zero dependency web component that will display JavaScript console output on-page. +
+ + + + + + + + + + + + + +
Properties:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
version + + +string + + + + Static. The component version string (date updated). Also has a getter.
uib + + +boolean + + + + True if UIBUILDER for Node-RED is loaded
$ + + +function + + + + jQuery-like shadow dom selector
$$ + + +function + + + + jQuery-like shadow dom multi-selector
_iCount + + +number + + + + The component version string (date updated)
opts + + +object + + + + This components controllable options - get/set using the `config()` method +Other props: +By default, all attributes are also created as properties
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + +
Fires:
+
    +
  • state-timeline:connected - When an instance of the component is attached to the DOM. `evt.event:details` contains the details of the element.
  • + +
  • state-timeline:disconnected - When an instance of the component is removed from the DOM. `evt.event:details` contains the details of the element.
  • + +
  • state-timeline:attribChanged - When a watched attribute changes. `evt.details` contains the details of the change. +NOTE that listeners can be attached either to the `document` or to the specific element instance. + +Standard watched attributes (common across all my components):event:
  • +
+ + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + +
+ +
+ +

Alpha

+ + +
+ +
+
+ + +
Namespace
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
@@ -1364,7 +2658,7 @@

Alpha

Source:
@@ -3902,13 +5196,13 @@
Fires:

- Documentation generated by JSDoc 4.0.3 on Tue Sep 24 2024 19:36:38 GMT+0100 (British Summer Time) + Documentation generated by JSDoc 4.0.3 on Sun Sep 29 2024 17:56:15 GMT+0100 (British Summer Time)
diff --git a/docs/jsdoc/Beta.html b/docs/jsdoc/Beta.html index c9af058..b121f8a 100644 --- a/docs/jsdoc/Beta.html +++ b/docs/jsdoc/Beta.html @@ -72,7 +72,7 @@

Beta

Source:
@@ -160,13 +160,13 @@
Properties:
- version + _iCount -string +number @@ -176,7 +176,7 @@
Properties:
- Static. The component version string (date updated). Also has a getter. + Static. The component version string (date updated) @@ -252,13 +252,13 @@
Properties:
- _iCount + name -number +string @@ -268,7 +268,7 @@
Properties:
- The component version string (date updated) + Placeholder for the optional name attribute @@ -291,7 +291,31 @@
Properties:
- This components controllable options - get/set using the `config()` method + This components controllable options - get/set using the `config()` method + + + + + + + version + + + + + +string + + + + + + + + + + Static. The component version string (date updated). Also has a getter that returns component and base version strings. + Other props: @@ -400,7 +424,7 @@
Properties:
Source:
@@ -419,11 +443,12 @@
Fires:
  • visible-console:connected - When an instance of the component is attached to the DOM. `evt.event:details` contains the details of the element.
  • +
  • component-template:ready - Alias for connected.event: The instance can handle property & attribute changes
  • +
  • visible-console:disconnected - When an instance of the component is removed from the DOM. `evt.event:details` contains the details of the element.
  • visible-console:attribChanged - When a watched attribute changes. `evt.details` contains the details of the change. NOTE that listeners can be attached either to the `document` or to the specific element instance. - Standard watched attributes (common across all my components):event:
@@ -443,7 +468,8 @@
Fires:
Example
-
<visible-console></visible-console>
+
<visible-console></visible-console>
+METHODS FROM BASE:
@@ -502,13 +528,13 @@
Properties:
- version + _iCount -string +number @@ -518,7 +544,7 @@
Properties:
- Static. The component version string (date updated). Also has a getter. + Static. The component version string (date updated) @@ -594,13 +620,13 @@
Properties:
- _iCount + name -number +string @@ -610,7 +636,7 @@
Properties:
- The component version string (date updated) + Placeholder for the optional name attribute @@ -633,7 +659,31 @@
Properties:
- This components controllable options - get/set using the `config()` method + This components controllable options - get/set using the `config()` method + + + + + + + version + + + + + +string + + + + + + + + + + Static. The component version string (date updated). Also has a getter that returns component and base version strings. + Other props: @@ -742,7 +792,7 @@
Properties:
Source:
@@ -761,11 +811,12 @@
Fires:
  • visible-console:connected - When an instance of the component is attached to the DOM. `evt.event:details` contains the details of the element.
  • +
  • component-template:ready - Alias for connected.event: The instance can handle property & attribute changes
  • +
  • visible-console:disconnected - When an instance of the component is removed from the DOM. `evt.event:details` contains the details of the element.
  • visible-console:attribChanged - When a watched attribute changes. `evt.details` contains the details of the change. NOTE that listeners can be attached either to the `document` or to the specific element instance. - Standard watched attributes (common across all my components):event:
@@ -785,106 +836,10 @@
Fires:
Example
-
<visible-console></visible-console>
- - - - - - - - - -
- -
- - - - - - - -
- -
- -

Beta

- - -
- -
-
- - -
Namespace
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - -
- - - - - - - - - - - - +
<visible-console></visible-console>
+METHODS FROM BASE:
- - -

Methods

@@ -892,7 +847,7 @@

Methods

-

(static) createHTMLVisualizer Creates an HTML visualisation of the input()

+

(static) highlight Convert object to HTML()

@@ -900,7 +855,7 @@

- A zero dependency web component that will display JavaScript console output on-page. + Define a new zero dependency custom web component ECMA module that can be used as an HTML tag
@@ -941,13 +896,13 @@

Properties:
- version + _iCount -string +number @@ -957,7 +912,7 @@
Properties:
- Static. The component version string (date updated). Also has a getter. + Static. The component version string (date updated) @@ -1033,13 +988,13 @@
Properties:
- _iCount + name -number +string @@ -1049,7 +1004,7 @@
Properties:
- The component version string (date updated) + Placeholder for the optional name attribute @@ -1072,21 +1027,20 @@
Properties:
- This components controllable options - get/set using the `config()` method -Other props: + This components controllable options - get/set using the `config()` method - colors + version -object +string @@ -1096,43 +1050,27 @@
Properties:
- + Static. The component version string (date updated). Also has a getter that returns component and base version strings. +Other props: - bgColors + json object +| +JSON +| - - - - - - - - - - - - - - - icons - - - - - -object +string @@ -1142,7 +1080,8 @@
Properties:
- + JSON to convert +By default, all attributes are also created as properties @@ -1181,7 +1120,7 @@
Properties:
Source:
@@ -1198,13 +1137,14 @@
Properties:
Fires:
    -
  • visible-console:connected - When an instance of the component is attached to the DOM. `evt.event:details` contains the details of the element.
  • +
  • syntax-highlight:connected - When an instance of the component is attached to the DOM. `evt.event:details` contains the details of the element.
  • -
  • visible-console:disconnected - When an instance of the component is removed from the DOM. `evt.event:details` contains the details of the element.
  • +
  • component-template:ready - Alias for connected.event: The instance can handle property & attribute changes
  • -
  • visible-console:attribChanged - When a watched attribute changes. `evt.details` contains the details of the change. -NOTE that listeners can be attached either to the `document` or to the specific element instance. +
  • syntax-highlight:disconnected - When an instance of the component is removed from the DOM. `evt.event:details` contains the details of the element.
  • +
  • syntax-highlight:attribChanged - When a watched attribute changes. `evt.details` contains the details of the change. +NOTE that listeners can be attached either to the `document` or to the specific element instance. Standard watched attributes (common across all my components):event:
@@ -1224,7 +1164,10 @@
Fires:
Example
-
<visible-console></visible-console>
+
Set the json property on the element
+  const showMsg = document.getElementsByTagName('syntax-highlight')[0]
+  showMsg.json({....})
+METHODS FROM BASE:
@@ -1234,7 +1177,7 @@
Example
-

(static) createHTMLVisualizer Creates an HTML visualisation of the input()

+

(static) highlight Convert object to HTML()

@@ -1242,7 +1185,7 @@

- A zero dependency web component that will display JavaScript console output on-page. + Define a new zero dependency custom web component ECMA module that can be used as an HTML tag
@@ -1283,13 +1226,13 @@

Properties:
- version + _iCount -string +number @@ -1299,7 +1242,7 @@
Properties:
- Static. The component version string (date updated). Also has a getter. + Static. The component version string (date updated) @@ -1375,13 +1318,13 @@
Properties:
- _iCount + name -number +string @@ -1391,7 +1334,7 @@
Properties:
- The component version string (date updated) + Placeholder for the optional name attribute @@ -1414,21 +1357,20 @@
Properties:
- This components controllable options - get/set using the `config()` method -Other props: + This components controllable options - get/set using the `config()` method - colors + version -object +string @@ -1438,43 +1380,27 @@
Properties:
- + Static. The component version string (date updated). Also has a getter that returns component and base version strings. +Other props: - bgColors + json object +| +JSON +| - - - - - - - - - - - - - - - icons - - - - - -object +string @@ -1484,7 +1410,8 @@
Properties:
- + JSON to convert +By default, all attributes are also created as properties @@ -1523,7 +1450,7 @@
Properties:
Source:
@@ -1540,13 +1467,14 @@
Properties:
Fires:
    -
  • visible-console:connected - When an instance of the component is attached to the DOM. `evt.event:details` contains the details of the element.
  • +
  • syntax-highlight:connected - When an instance of the component is attached to the DOM. `evt.event:details` contains the details of the element.
  • -
  • visible-console:disconnected - When an instance of the component is removed from the DOM. `evt.event:details` contains the details of the element.
  • +
  • component-template:ready - Alias for connected.event: The instance can handle property & attribute changes
  • -
  • visible-console:attribChanged - When a watched attribute changes. `evt.details` contains the details of the change. -NOTE that listeners can be attached either to the `document` or to the specific element instance. +
  • syntax-highlight:disconnected - When an instance of the component is removed from the DOM. `evt.event:details` contains the details of the element.
  • +
  • syntax-highlight:attribChanged - When a watched attribute changes. `evt.details` contains the details of the change. +NOTE that listeners can be attached either to the `document` or to the specific element instance. Standard watched attributes (common across all my components):event:
@@ -1566,7 +1494,10 @@
Fires:
Example
-
<visible-console></visible-console>
+
Set the json property on the element
+  const showMsg = document.getElementsByTagName('syntax-highlight')[0]
+  showMsg.json({....})
+METHODS FROM BASE:
@@ -1599,6 +1530,8 @@

Beta

+
Namespace
+ @@ -1632,7 +1565,7 @@

Beta

Source:
@@ -1720,13 +1653,13 @@
Properties:
- version + _iCount -string +number @@ -1736,7 +1669,7 @@
Properties:
- Static. The component version string (date updated). Also has a getter. + Static. The component version string (date updated) @@ -1812,13 +1745,13 @@
Properties:
- _iCount + name -number +string @@ -1828,7 +1761,7 @@
Properties:
- The component version string (date updated) + Placeholder for the optional name attribute @@ -1851,7 +1784,31 @@
Properties:
- This components controllable options - get/set using the `config()` method + This components controllable options - get/set using the `config()` method + + + + + + + version + + + + + +string + + + + + + + + + + Static. The component version string (date updated). Also has a getter that returns component and base version strings. + Other props: @@ -1960,7 +1917,7 @@
Properties:
Source:
@@ -1979,11 +1936,12 @@
Fires:
  • visible-console:connected - When an instance of the component is attached to the DOM. `evt.event:details` contains the details of the element.
  • +
  • component-template:ready - Alias for connected.event: The instance can handle property & attribute changes
  • +
  • visible-console:disconnected - When an instance of the component is removed from the DOM. `evt.event:details` contains the details of the element.
  • visible-console:attribChanged - When a watched attribute changes. `evt.details` contains the details of the change. NOTE that listeners can be attached either to the `document` or to the specific element instance. - Standard watched attributes (common across all my components):event:
@@ -2003,7 +1961,8 @@
Fires:
Example
-
<visible-console></visible-console>
+
<visible-console></visible-console>
+METHODS FROM BASE:
@@ -2062,13 +2021,13 @@
Properties:
- version + _iCount -string +number @@ -2078,7 +2037,7 @@
Properties:
- Static. The component version string (date updated). Also has a getter. + Static. The component version string (date updated) @@ -2154,13 +2113,13 @@
Properties:
- _iCount + name -number +string @@ -2170,7 +2129,7 @@
Properties:
- The component version string (date updated) + Placeholder for the optional name attribute @@ -2193,7 +2152,31 @@
Properties:
- This components controllable options - get/set using the `config()` method + This components controllable options - get/set using the `config()` method + + + + + + + version + + + + + +string + + + + + + + + + + Static. The component version string (date updated). Also has a getter that returns component and base version strings. + Other props: @@ -2302,7 +2285,7 @@
Properties:
Source:
@@ -2321,11 +2304,12 @@
Fires:
  • visible-console:connected - When an instance of the component is attached to the DOM. `evt.event:details` contains the details of the element.
  • +
  • component-template:ready - Alias for connected.event: The instance can handle property & attribute changes
  • +
  • visible-console:disconnected - When an instance of the component is removed from the DOM. `evt.event:details` contains the details of the element.
  • visible-console:attribChanged - When a watched attribute changes. `evt.details` contains the details of the change. NOTE that listeners can be attached either to the `document` or to the specific element instance. - Standard watched attributes (common across all my components):event:
@@ -2345,106 +2329,10 @@
Fires:
Example
-
<visible-console></visible-console>
- - - - - - - - - -
- -
- - - - - - - -
- -
- -

Beta

- - -
- -
-
- - -
Namespace
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - -
- - - - - - - - - - - - +
<visible-console></visible-console>
+METHODS FROM BASE:
- - -

Methods

@@ -2452,7 +2340,7 @@

Methods

-

(static) createHTMLVisualizer Creates an HTML visualisation of the input()

+

(static) highlight Convert object to HTML()

@@ -2460,7 +2348,7 @@

- A zero dependency web component that will display JavaScript console output on-page. + Define a new zero dependency custom web component ECMA module that can be used as an HTML tag
@@ -2501,13 +2389,13 @@

Properties:
- version + _iCount -string +number @@ -2517,7 +2405,7 @@
Properties:
- Static. The component version string (date updated). Also has a getter. + Static. The component version string (date updated) @@ -2593,13 +2481,13 @@
Properties:
- _iCount + name -number +string @@ -2609,7 +2497,7 @@
Properties:
- The component version string (date updated) + Placeholder for the optional name attribute @@ -2632,21 +2520,20 @@
Properties:
- This components controllable options - get/set using the `config()` method -Other props: + This components controllable options - get/set using the `config()` method - colors + version -object +string @@ -2656,43 +2543,27 @@
Properties:
- + Static. The component version string (date updated). Also has a getter that returns component and base version strings. +Other props: - bgColors + json object +| +JSON +| - - - - - - - - - - - - - - - icons - - - - - -object +string @@ -2702,7 +2573,8 @@
Properties:
- + JSON to convert +By default, all attributes are also created as properties @@ -2741,7 +2613,7 @@
Properties:
Source:
@@ -2758,13 +2630,14 @@
Properties:
Fires:
    -
  • visible-console:connected - When an instance of the component is attached to the DOM. `evt.event:details` contains the details of the element.
  • +
  • syntax-highlight:connected - When an instance of the component is attached to the DOM. `evt.event:details` contains the details of the element.
  • -
  • visible-console:disconnected - When an instance of the component is removed from the DOM. `evt.event:details` contains the details of the element.
  • +
  • component-template:ready - Alias for connected.event: The instance can handle property & attribute changes
  • -
  • visible-console:attribChanged - When a watched attribute changes. `evt.details` contains the details of the change. -NOTE that listeners can be attached either to the `document` or to the specific element instance. +
  • syntax-highlight:disconnected - When an instance of the component is removed from the DOM. `evt.event:details` contains the details of the element.
  • +
  • syntax-highlight:attribChanged - When a watched attribute changes. `evt.details` contains the details of the change. +NOTE that listeners can be attached either to the `document` or to the specific element instance. Standard watched attributes (common across all my components):event:
@@ -2784,7 +2657,10 @@
Fires:
Example
-
<visible-console></visible-console>
+
Set the json property on the element
+  const showMsg = document.getElementsByTagName('syntax-highlight')[0]
+  showMsg.json({....})
+METHODS FROM BASE:
@@ -2794,7 +2670,7 @@
Example
-

(static) createHTMLVisualizer Creates an HTML visualisation of the input()

+

(static) highlight Convert object to HTML()

@@ -2802,7 +2678,7 @@

- A zero dependency web component that will display JavaScript console output on-page. + Define a new zero dependency custom web component ECMA module that can be used as an HTML tag
@@ -2843,13 +2719,13 @@

Properties:
- version + _iCount -string +number @@ -2859,7 +2735,7 @@
Properties:
- Static. The component version string (date updated). Also has a getter. + Static. The component version string (date updated) @@ -2935,13 +2811,13 @@
Properties:
- _iCount + name -number +string @@ -2951,7 +2827,7 @@
Properties:
- The component version string (date updated) + Placeholder for the optional name attribute @@ -2974,21 +2850,20 @@
Properties:
- This components controllable options - get/set using the `config()` method -Other props: + This components controllable options - get/set using the `config()` method - colors + version -object +string @@ -2998,20 +2873,27 @@
Properties:
- + Static. The component version string (date updated). Also has a getter that returns component and base version strings. +Other props: - bgColors + json object +| + +JSON +| + +string @@ -3021,20 +2903,10446 @@
Properties:
- + JSON to convert +By default, all attributes are also created as properties + + + + + + +
+ + - - - icons - + - - - -object + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + +
Fires:
+
    +
  • syntax-highlight:connected - When an instance of the component is attached to the DOM. `evt.event:details` contains the details of the element.
  • + +
  • component-template:ready - Alias for connected.event: The instance can handle property & attribute changes
  • + +
  • syntax-highlight:disconnected - When an instance of the component is removed from the DOM. `evt.event:details` contains the details of the element.
  • + +
  • syntax-highlight:attribChanged - When a watched attribute changes. `evt.details` contains the details of the change. +NOTE that listeners can be attached either to the `document` or to the specific element instance. +Standard watched attributes (common across all my components):event:
  • +
+ + + + + + + + + + + + + + + +
Example
+ +
Set the json property on the element
+  const showMsg = document.getElementsByTagName('syntax-highlight')[0]
+  showMsg.json({....})
+METHODS FROM BASE:
+ + + + + + + + + +
+ +
+ + + + + + + +
+ +
+ +

Beta

+ + +
+ +
+
+ + +
Namespace
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + +
+ + + + + + + + + + + + + + + + +

Methods

+ + + + + + + +

(static) createHTMLVisualizer Creates an HTML visualisation of the input()

+ + + + + + +
+ A zero dependency web component that will display JavaScript console output on-page. +
+ + + + + + + + + + + + + +
Properties:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
_iCount + + +number + + + + Static. The component version string (date updated)
uib + + +boolean + + + + True if UIBUILDER for Node-RED is loaded
$ + + +function + + + + jQuery-like shadow dom selector
$$ + + +function + + + + jQuery-like shadow dom multi-selector
name + + +string + + + + Placeholder for the optional name attribute
opts + + +object + + + + This components controllable options - get/set using the `config()` method
version + + +string + + + + Static. The component version string (date updated). Also has a getter that returns component and base version strings. + +Other props:
colors + + +object + + + +
bgColors + + +object + + + +
icons + + +object + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + +
Fires:
+
    +
  • visible-console:connected - When an instance of the component is attached to the DOM. `evt.event:details` contains the details of the element.
  • + +
  • component-template:ready - Alias for connected.event: The instance can handle property & attribute changes
  • + +
  • visible-console:disconnected - When an instance of the component is removed from the DOM. `evt.event:details` contains the details of the element.
  • + +
  • visible-console:attribChanged - When a watched attribute changes. `evt.details` contains the details of the change. +NOTE that listeners can be attached either to the `document` or to the specific element instance. +Standard watched attributes (common across all my components):event:
  • +
+ + + + + + + + + + + + + + + +
Example
+ +
<visible-console></visible-console>
+METHODS FROM BASE:
+ + + + + + + + + +

(static) createHTMLVisualizer Creates an HTML visualisation of the input()

+ + + + + + +
+ A zero dependency web component that will display JavaScript console output on-page. +
+ + + + + + + + + + + + + +
Properties:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
_iCount + + +number + + + + Static. The component version string (date updated)
uib + + +boolean + + + + True if UIBUILDER for Node-RED is loaded
$ + + +function + + + + jQuery-like shadow dom selector
$$ + + +function + + + + jQuery-like shadow dom multi-selector
name + + +string + + + + Placeholder for the optional name attribute
opts + + +object + + + + This components controllable options - get/set using the `config()` method
version + + +string + + + + Static. The component version string (date updated). Also has a getter that returns component and base version strings. + +Other props:
colors + + +object + + + +
bgColors + + +object + + + +
icons + + +object + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + +
Fires:
+
    +
  • visible-console:connected - When an instance of the component is attached to the DOM. `evt.event:details` contains the details of the element.
  • + +
  • component-template:ready - Alias for connected.event: The instance can handle property & attribute changes
  • + +
  • visible-console:disconnected - When an instance of the component is removed from the DOM. `evt.event:details` contains the details of the element.
  • + +
  • visible-console:attribChanged - When a watched attribute changes. `evt.details` contains the details of the change. +NOTE that listeners can be attached either to the `document` or to the specific element instance. +Standard watched attributes (common across all my components):event:
  • +
+ + + + + + + + + + + + + + + +
Example
+ +
<visible-console></visible-console>
+METHODS FROM BASE:
+ + + + + + + + + +

(static) highlight Convert object to HTML()

+ + + + + + +
+ Define a new zero dependency custom web component ECMA module that can be used as an HTML tag +
+ + + + + + + + + + + + + +
Properties:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
_iCount + + +number + + + + Static. The component version string (date updated)
uib + + +boolean + + + + True if UIBUILDER for Node-RED is loaded
$ + + +function + + + + jQuery-like shadow dom selector
$$ + + +function + + + + jQuery-like shadow dom multi-selector
name + + +string + + + + Placeholder for the optional name attribute
opts + + +object + + + + This components controllable options - get/set using the `config()` method
version + + +string + + + + Static. The component version string (date updated). Also has a getter that returns component and base version strings. +Other props:
json + + +object +| + +JSON +| + +string + + + + JSON to convert +By default, all attributes are also created as properties
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + +
Fires:
+
    +
  • syntax-highlight:connected - When an instance of the component is attached to the DOM. `evt.event:details` contains the details of the element.
  • + +
  • component-template:ready - Alias for connected.event: The instance can handle property & attribute changes
  • + +
  • syntax-highlight:disconnected - When an instance of the component is removed from the DOM. `evt.event:details` contains the details of the element.
  • + +
  • syntax-highlight:attribChanged - When a watched attribute changes. `evt.details` contains the details of the change. +NOTE that listeners can be attached either to the `document` or to the specific element instance. +Standard watched attributes (common across all my components):event:
  • +
+ + + + + + + + + + + + + + + +
Example
+ +
Set the json property on the element
+  const showMsg = document.getElementsByTagName('syntax-highlight')[0]
+  showMsg.json({....})
+METHODS FROM BASE:
+ + + + + + + + + +

(static) highlight Convert object to HTML()

+ + + + + + +
+ Define a new zero dependency custom web component ECMA module that can be used as an HTML tag +
+ + + + + + + + + + + + + +
Properties:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
_iCount + + +number + + + + Static. The component version string (date updated)
uib + + +boolean + + + + True if UIBUILDER for Node-RED is loaded
$ + + +function + + + + jQuery-like shadow dom selector
$$ + + +function + + + + jQuery-like shadow dom multi-selector
name + + +string + + + + Placeholder for the optional name attribute
opts + + +object + + + + This components controllable options - get/set using the `config()` method
version + + +string + + + + Static. The component version string (date updated). Also has a getter that returns component and base version strings. +Other props:
json + + +object +| + +JSON +| + +string + + + + JSON to convert +By default, all attributes are also created as properties
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + +
Fires:
+
    +
  • syntax-highlight:connected - When an instance of the component is attached to the DOM. `evt.event:details` contains the details of the element.
  • + +
  • component-template:ready - Alias for connected.event: The instance can handle property & attribute changes
  • + +
  • syntax-highlight:disconnected - When an instance of the component is removed from the DOM. `evt.event:details` contains the details of the element.
  • + +
  • syntax-highlight:attribChanged - When a watched attribute changes. `evt.details` contains the details of the change. +NOTE that listeners can be attached either to the `document` or to the specific element instance. +Standard watched attributes (common across all my components):event:
  • +
+ + + + + + + + + + + + + + + +
Example
+ +
Set the json property on the element
+  const showMsg = document.getElementsByTagName('syntax-highlight')[0]
+  showMsg.json({....})
+METHODS FROM BASE:
+ + + + + + + + + +
+ +
+ + + + + + + +
+ +
+ +

Beta

+ + +
+ +
+
+ + +
Namespace
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + +
+ + + + + + + + + + + + + + + + +

Methods

+ + + + + + + +

(static) createHTMLVisualizer Creates an HTML visualisation of the input()

+ + + + + + +
+ A zero dependency web component that will display JavaScript console output on-page. +
+ + + + + + + + + + + + + +
Properties:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
_iCount + + +number + + + + Static. The component version string (date updated)
uib + + +boolean + + + + True if UIBUILDER for Node-RED is loaded
$ + + +function + + + + jQuery-like shadow dom selector
$$ + + +function + + + + jQuery-like shadow dom multi-selector
name + + +string + + + + Placeholder for the optional name attribute
opts + + +object + + + + This components controllable options - get/set using the `config()` method
version + + +string + + + + Static. The component version string (date updated). Also has a getter that returns component and base version strings. + +Other props:
colors + + +object + + + +
bgColors + + +object + + + +
icons + + +object + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + +
Fires:
+
    +
  • visible-console:connected - When an instance of the component is attached to the DOM. `evt.event:details` contains the details of the element.
  • + +
  • component-template:ready - Alias for connected.event: The instance can handle property & attribute changes
  • + +
  • visible-console:disconnected - When an instance of the component is removed from the DOM. `evt.event:details` contains the details of the element.
  • + +
  • visible-console:attribChanged - When a watched attribute changes. `evt.details` contains the details of the change. +NOTE that listeners can be attached either to the `document` or to the specific element instance. +Standard watched attributes (common across all my components):event:
  • +
+ + + + + + + + + + + + + + + +
Example
+ +
<visible-console></visible-console>
+METHODS FROM BASE:
+ + + + + + + + + +

(static) createHTMLVisualizer Creates an HTML visualisation of the input()

+ + + + + + +
+ A zero dependency web component that will display JavaScript console output on-page. +
+ + + + + + + + + + + + + +
Properties:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
_iCount + + +number + + + + Static. The component version string (date updated)
uib + + +boolean + + + + True if UIBUILDER for Node-RED is loaded
$ + + +function + + + + jQuery-like shadow dom selector
$$ + + +function + + + + jQuery-like shadow dom multi-selector
name + + +string + + + + Placeholder for the optional name attribute
opts + + +object + + + + This components controllable options - get/set using the `config()` method
version + + +string + + + + Static. The component version string (date updated). Also has a getter that returns component and base version strings. + +Other props:
colors + + +object + + + +
bgColors + + +object + + + +
icons + + +object + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + +
Fires:
+
    +
  • visible-console:connected - When an instance of the component is attached to the DOM. `evt.event:details` contains the details of the element.
  • + +
  • component-template:ready - Alias for connected.event: The instance can handle property & attribute changes
  • + +
  • visible-console:disconnected - When an instance of the component is removed from the DOM. `evt.event:details` contains the details of the element.
  • + +
  • visible-console:attribChanged - When a watched attribute changes. `evt.details` contains the details of the change. +NOTE that listeners can be attached either to the `document` or to the specific element instance. +Standard watched attributes (common across all my components):event:
  • +
+ + + + + + + + + + + + + + + +
Example
+ +
<visible-console></visible-console>
+METHODS FROM BASE:
+ + + + + + + + + +

(static) highlight Convert object to HTML()

+ + + + + + +
+ Define a new zero dependency custom web component ECMA module that can be used as an HTML tag +
+ + + + + + + + + + + + + +
Properties:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
_iCount + + +number + + + + Static. The component version string (date updated)
uib + + +boolean + + + + True if UIBUILDER for Node-RED is loaded
$ + + +function + + + + jQuery-like shadow dom selector
$$ + + +function + + + + jQuery-like shadow dom multi-selector
name + + +string + + + + Placeholder for the optional name attribute
opts + + +object + + + + This components controllable options - get/set using the `config()` method
version + + +string + + + + Static. The component version string (date updated). Also has a getter that returns component and base version strings. +Other props:
json + + +object +| + +JSON +| + +string + + + + JSON to convert +By default, all attributes are also created as properties
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + +
Fires:
+
    +
  • syntax-highlight:connected - When an instance of the component is attached to the DOM. `evt.event:details` contains the details of the element.
  • + +
  • component-template:ready - Alias for connected.event: The instance can handle property & attribute changes
  • + +
  • syntax-highlight:disconnected - When an instance of the component is removed from the DOM. `evt.event:details` contains the details of the element.
  • + +
  • syntax-highlight:attribChanged - When a watched attribute changes. `evt.details` contains the details of the change. +NOTE that listeners can be attached either to the `document` or to the specific element instance. +Standard watched attributes (common across all my components):event:
  • +
+ + + + + + + + + + + + + + + +
Example
+ +
Set the json property on the element
+  const showMsg = document.getElementsByTagName('syntax-highlight')[0]
+  showMsg.json({....})
+METHODS FROM BASE:
+ + + + + + + + + +

(static) highlight Convert object to HTML()

+ + + + + + +
+ Define a new zero dependency custom web component ECMA module that can be used as an HTML tag +
+ + + + + + + + + + + + + +
Properties:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
_iCount + + +number + + + + Static. The component version string (date updated)
uib + + +boolean + + + + True if UIBUILDER for Node-RED is loaded
$ + + +function + + + + jQuery-like shadow dom selector
$$ + + +function + + + + jQuery-like shadow dom multi-selector
name + + +string + + + + Placeholder for the optional name attribute
opts + + +object + + + + This components controllable options - get/set using the `config()` method
version + + +string + + + + Static. The component version string (date updated). Also has a getter that returns component and base version strings. +Other props:
json + + +object +| + +JSON +| + +string + + + + JSON to convert +By default, all attributes are also created as properties
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + +
Fires:
+
    +
  • syntax-highlight:connected - When an instance of the component is attached to the DOM. `evt.event:details` contains the details of the element.
  • + +
  • component-template:ready - Alias for connected.event: The instance can handle property & attribute changes
  • + +
  • syntax-highlight:disconnected - When an instance of the component is removed from the DOM. `evt.event:details` contains the details of the element.
  • + +
  • syntax-highlight:attribChanged - When a watched attribute changes. `evt.details` contains the details of the change. +NOTE that listeners can be attached either to the `document` or to the specific element instance. +Standard watched attributes (common across all my components):event:
  • +
+ + + + + + + + + + + + + + + +
Example
+ +
Set the json property on the element
+  const showMsg = document.getElementsByTagName('syntax-highlight')[0]
+  showMsg.json({....})
+METHODS FROM BASE:
+ + + + + + + + + +
+ +
+ + + + + + + +
+ +
+ +

Beta

+ + +
+ +
+
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + +
+ + + + + + + + + + + + + + + + +

Methods

+ + + + + + + +

(static) createHTMLVisualizer Creates an HTML visualisation of the input()

+ + + + + + +
+ A zero dependency web component that will display JavaScript console output on-page. +
+ + + + + + + + + + + + + +
Properties:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
_iCount + + +number + + + + Static. The component version string (date updated)
uib + + +boolean + + + + True if UIBUILDER for Node-RED is loaded
$ + + +function + + + + jQuery-like shadow dom selector
$$ + + +function + + + + jQuery-like shadow dom multi-selector
name + + +string + + + + Placeholder for the optional name attribute
opts + + +object + + + + This components controllable options - get/set using the `config()` method
version + + +string + + + + Static. The component version string (date updated). Also has a getter that returns component and base version strings. + +Other props:
colors + + +object + + + +
bgColors + + +object + + + +
icons + + +object + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + +
Fires:
+
    +
  • visible-console:connected - When an instance of the component is attached to the DOM. `evt.event:details` contains the details of the element.
  • + +
  • component-template:ready - Alias for connected.event: The instance can handle property & attribute changes
  • + +
  • visible-console:disconnected - When an instance of the component is removed from the DOM. `evt.event:details` contains the details of the element.
  • + +
  • visible-console:attribChanged - When a watched attribute changes. `evt.details` contains the details of the change. +NOTE that listeners can be attached either to the `document` or to the specific element instance. +Standard watched attributes (common across all my components):event:
  • +
+ + + + + + + + + + + + + + + +
Example
+ +
<visible-console></visible-console>
+METHODS FROM BASE:
+ + + + + + + + + +

(static) createHTMLVisualizer Creates an HTML visualisation of the input()

+ + + + + + +
+ A zero dependency web component that will display JavaScript console output on-page. +
+ + + + + + + + + + + + + +
Properties:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
_iCount + + +number + + + + Static. The component version string (date updated)
uib + + +boolean + + + + True if UIBUILDER for Node-RED is loaded
$ + + +function + + + + jQuery-like shadow dom selector
$$ + + +function + + + + jQuery-like shadow dom multi-selector
name + + +string + + + + Placeholder for the optional name attribute
opts + + +object + + + + This components controllable options - get/set using the `config()` method
version + + +string + + + + Static. The component version string (date updated). Also has a getter that returns component and base version strings. + +Other props:
colors + + +object + + + +
bgColors + + +object + + + +
icons + + +object + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + +
Fires:
+
    +
  • visible-console:connected - When an instance of the component is attached to the DOM. `evt.event:details` contains the details of the element.
  • + +
  • component-template:ready - Alias for connected.event: The instance can handle property & attribute changes
  • + +
  • visible-console:disconnected - When an instance of the component is removed from the DOM. `evt.event:details` contains the details of the element.
  • + +
  • visible-console:attribChanged - When a watched attribute changes. `evt.details` contains the details of the change. +NOTE that listeners can be attached either to the `document` or to the specific element instance. +Standard watched attributes (common across all my components):event:
  • +
+ + + + + + + + + + + + + + + +
Example
+ +
<visible-console></visible-console>
+METHODS FROM BASE:
+ + + + + + + + + +

(static) highlight Convert object to HTML()

+ + + + + + +
+ Define a new zero dependency custom web component ECMA module that can be used as an HTML tag +
+ + + + + + + + + + + + + +
Properties:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
_iCount + + +number + + + + Static. The component version string (date updated)
uib + + +boolean + + + + True if UIBUILDER for Node-RED is loaded
$ + + +function + + + + jQuery-like shadow dom selector
$$ + + +function + + + + jQuery-like shadow dom multi-selector
name + + +string + + + + Placeholder for the optional name attribute
opts + + +object + + + + This components controllable options - get/set using the `config()` method
version + + +string + + + + Static. The component version string (date updated). Also has a getter that returns component and base version strings. +Other props:
json + + +object +| + +JSON +| + +string + + + + JSON to convert +By default, all attributes are also created as properties
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + +
Fires:
+
    +
  • syntax-highlight:connected - When an instance of the component is attached to the DOM. `evt.event:details` contains the details of the element.
  • + +
  • component-template:ready - Alias for connected.event: The instance can handle property & attribute changes
  • + +
  • syntax-highlight:disconnected - When an instance of the component is removed from the DOM. `evt.event:details` contains the details of the element.
  • + +
  • syntax-highlight:attribChanged - When a watched attribute changes. `evt.details` contains the details of the change. +NOTE that listeners can be attached either to the `document` or to the specific element instance. +Standard watched attributes (common across all my components):event:
  • +
+ + + + + + + + + + + + + + + +
Example
+ +
Set the json property on the element
+  const showMsg = document.getElementsByTagName('syntax-highlight')[0]
+  showMsg.json({....})
+METHODS FROM BASE:
+ + + + + + + + + +

(static) highlight Convert object to HTML()

+ + + + + + +
+ Define a new zero dependency custom web component ECMA module that can be used as an HTML tag +
+ + + + + + + + + + + + + +
Properties:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
_iCount + + +number + + + + Static. The component version string (date updated)
uib + + +boolean + + + + True if UIBUILDER for Node-RED is loaded
$ + + +function + + + + jQuery-like shadow dom selector
$$ + + +function + + + + jQuery-like shadow dom multi-selector
name + + +string + + + + Placeholder for the optional name attribute
opts + + +object + + + + This components controllable options - get/set using the `config()` method
version + + +string + + + + Static. The component version string (date updated). Also has a getter that returns component and base version strings. +Other props:
json + + +object +| + +JSON +| + +string + + + + JSON to convert +By default, all attributes are also created as properties
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + +
Fires:
+
    +
  • syntax-highlight:connected - When an instance of the component is attached to the DOM. `evt.event:details` contains the details of the element.
  • + +
  • component-template:ready - Alias for connected.event: The instance can handle property & attribute changes
  • + +
  • syntax-highlight:disconnected - When an instance of the component is removed from the DOM. `evt.event:details` contains the details of the element.
  • + +
  • syntax-highlight:attribChanged - When a watched attribute changes. `evt.details` contains the details of the change. +NOTE that listeners can be attached either to the `document` or to the specific element instance. +Standard watched attributes (common across all my components):event:
  • +
+ + + + + + + + + + + + + + + +
Example
+ +
Set the json property on the element
+  const showMsg = document.getElementsByTagName('syntax-highlight')[0]
+  showMsg.json({....})
+METHODS FROM BASE:
+ + + + + + + + + +
+ +
+ + + + + + + +
+ +
+ +

Beta

+ + +
+ +
+
+ + +
Namespace
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + +
+ + + + + + + + + + + + + + + + +

Methods

+ + + + + + + +

(static) createHTMLVisualizer Creates an HTML visualisation of the input()

+ + + + + + +
+ A zero dependency web component that will display JavaScript console output on-page. +
+ + + + + + + + + + + + + +
Properties:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
_iCount + + +number + + + + Static. The component version string (date updated)
uib + + +boolean + + + + True if UIBUILDER for Node-RED is loaded
$ + + +function + + + + jQuery-like shadow dom selector
$$ + + +function + + + + jQuery-like shadow dom multi-selector
name + + +string + + + + Placeholder for the optional name attribute
opts + + +object + + + + This components controllable options - get/set using the `config()` method
version + + +string + + + + Static. The component version string (date updated). Also has a getter that returns component and base version strings. + +Other props:
colors + + +object + + + +
bgColors + + +object + + + +
icons + + +object + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + +
Fires:
+
    +
  • visible-console:connected - When an instance of the component is attached to the DOM. `evt.event:details` contains the details of the element.
  • + +
  • component-template:ready - Alias for connected.event: The instance can handle property & attribute changes
  • + +
  • visible-console:disconnected - When an instance of the component is removed from the DOM. `evt.event:details` contains the details of the element.
  • + +
  • visible-console:attribChanged - When a watched attribute changes. `evt.details` contains the details of the change. +NOTE that listeners can be attached either to the `document` or to the specific element instance. +Standard watched attributes (common across all my components):event:
  • +
+ + + + + + + + + + + + + + + +
Example
+ +
<visible-console></visible-console>
+METHODS FROM BASE:
+ + + + + + + + + +

(static) createHTMLVisualizer Creates an HTML visualisation of the input()

+ + + + + + +
+ A zero dependency web component that will display JavaScript console output on-page. +
+ + + + + + + + + + + + + +
Properties:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
_iCount + + +number + + + + Static. The component version string (date updated)
uib + + +boolean + + + + True if UIBUILDER for Node-RED is loaded
$ + + +function + + + + jQuery-like shadow dom selector
$$ + + +function + + + + jQuery-like shadow dom multi-selector
name + + +string + + + + Placeholder for the optional name attribute
opts + + +object + + + + This components controllable options - get/set using the `config()` method
version + + +string + + + + Static. The component version string (date updated). Also has a getter that returns component and base version strings. + +Other props:
colors + + +object + + + +
bgColors + + +object + + + +
icons + + +object + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + +
Fires:
+
    +
  • visible-console:connected - When an instance of the component is attached to the DOM. `evt.event:details` contains the details of the element.
  • + +
  • component-template:ready - Alias for connected.event: The instance can handle property & attribute changes
  • + +
  • visible-console:disconnected - When an instance of the component is removed from the DOM. `evt.event:details` contains the details of the element.
  • + +
  • visible-console:attribChanged - When a watched attribute changes. `evt.details` contains the details of the change. +NOTE that listeners can be attached either to the `document` or to the specific element instance. +Standard watched attributes (common across all my components):event:
  • +
+ + + + + + + + + + + + + + + +
Example
+ +
<visible-console></visible-console>
+METHODS FROM BASE:
+ + + + + + + + + +

(static) highlight Convert object to HTML()

+ + + + + + +
+ Define a new zero dependency custom web component ECMA module that can be used as an HTML tag +
+ + + + + + + + + + + + + +
Properties:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
_iCount + + +number + + + + Static. The component version string (date updated)
uib + + +boolean + + + + True if UIBUILDER for Node-RED is loaded
$ + + +function + + + + jQuery-like shadow dom selector
$$ + + +function + + + + jQuery-like shadow dom multi-selector
name + + +string + + + + Placeholder for the optional name attribute
opts + + +object + + + + This components controllable options - get/set using the `config()` method
version + + +string + + + + Static. The component version string (date updated). Also has a getter that returns component and base version strings. +Other props:
json + + +object +| + +JSON +| + +string + + + + JSON to convert +By default, all attributes are also created as properties
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + +
Fires:
+
    +
  • syntax-highlight:connected - When an instance of the component is attached to the DOM. `evt.event:details` contains the details of the element.
  • + +
  • component-template:ready - Alias for connected.event: The instance can handle property & attribute changes
  • + +
  • syntax-highlight:disconnected - When an instance of the component is removed from the DOM. `evt.event:details` contains the details of the element.
  • + +
  • syntax-highlight:attribChanged - When a watched attribute changes. `evt.details` contains the details of the change. +NOTE that listeners can be attached either to the `document` or to the specific element instance. +Standard watched attributes (common across all my components):event:
  • +
+ + + + + + + + + + + + + + + +
Example
+ +
Set the json property on the element
+  const showMsg = document.getElementsByTagName('syntax-highlight')[0]
+  showMsg.json({....})
+METHODS FROM BASE:
+ + + + + + + + + +

(static) highlight Convert object to HTML()

+ + + + + + +
+ Define a new zero dependency custom web component ECMA module that can be used as an HTML tag +
+ + + + + + + + + + + + + +
Properties:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
_iCount + + +number + + + + Static. The component version string (date updated)
uib + + +boolean + + + + True if UIBUILDER for Node-RED is loaded
$ + + +function + + + + jQuery-like shadow dom selector
$$ + + +function + + + + jQuery-like shadow dom multi-selector
name + + +string + + + + Placeholder for the optional name attribute
opts + + +object + + + + This components controllable options - get/set using the `config()` method
version + + +string + + + + Static. The component version string (date updated). Also has a getter that returns component and base version strings. +Other props:
json + + +object +| + +JSON +| + +string + + + + JSON to convert +By default, all attributes are also created as properties
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + +
Fires:
+
    +
  • syntax-highlight:connected - When an instance of the component is attached to the DOM. `evt.event:details` contains the details of the element.
  • + +
  • component-template:ready - Alias for connected.event: The instance can handle property & attribute changes
  • + +
  • syntax-highlight:disconnected - When an instance of the component is removed from the DOM. `evt.event:details` contains the details of the element.
  • + +
  • syntax-highlight:attribChanged - When a watched attribute changes. `evt.details` contains the details of the change. +NOTE that listeners can be attached either to the `document` or to the specific element instance. +Standard watched attributes (common across all my components):event:
  • +
+ + + + + + + + + + + + + + + +
Example
+ +
Set the json property on the element
+  const showMsg = document.getElementsByTagName('syntax-highlight')[0]
+  showMsg.json({....})
+METHODS FROM BASE:
+ + + + + + + + + +
+ +
+ + + + + + + +
+ +
+ +

Beta

+ + +
+ +
+
+ + +
Namespace
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + +
+ + + + + + + + + + + + + + + + +

Methods

+ + + + + + + +

(static) createHTMLVisualizer Creates an HTML visualisation of the input()

+ + + + + + +
+ A zero dependency web component that will display JavaScript console output on-page. +
+ + + + + + + + + + + + + +
Properties:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
_iCount + + +number + + + + Static. The component version string (date updated)
uib + + +boolean + + + + True if UIBUILDER for Node-RED is loaded
$ + + +function + + + + jQuery-like shadow dom selector
$$ + + +function + + + + jQuery-like shadow dom multi-selector
name + + +string + + + + Placeholder for the optional name attribute
opts + + +object + + + + This components controllable options - get/set using the `config()` method
version + + +string + + + + Static. The component version string (date updated). Also has a getter that returns component and base version strings. + +Other props:
colors + + +object + + + +
bgColors + + +object + + + +
icons + + +object + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + +
Fires:
+
    +
  • visible-console:connected - When an instance of the component is attached to the DOM. `evt.event:details` contains the details of the element.
  • + +
  • component-template:ready - Alias for connected.event: The instance can handle property & attribute changes
  • + +
  • visible-console:disconnected - When an instance of the component is removed from the DOM. `evt.event:details` contains the details of the element.
  • + +
  • visible-console:attribChanged - When a watched attribute changes. `evt.details` contains the details of the change. +NOTE that listeners can be attached either to the `document` or to the specific element instance. +Standard watched attributes (common across all my components):event:
  • +
+ + + + + + + + + + + + + + + +
Example
+ +
<visible-console></visible-console>
+METHODS FROM BASE:
+ + + + + + + + + +

(static) createHTMLVisualizer Creates an HTML visualisation of the input()

+ + + + + + +
+ A zero dependency web component that will display JavaScript console output on-page. +
+ + + + + + + + + + + + + +
Properties:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
_iCount + + +number + + + + Static. The component version string (date updated)
uib + + +boolean + + + + True if UIBUILDER for Node-RED is loaded
$ + + +function + + + + jQuery-like shadow dom selector
$$ + + +function + + + + jQuery-like shadow dom multi-selector
name + + +string + + + + Placeholder for the optional name attribute
opts + + +object + + + + This components controllable options - get/set using the `config()` method
version + + +string + + + + Static. The component version string (date updated). Also has a getter that returns component and base version strings. + +Other props:
colors + + +object + + + +
bgColors + + +object + + + +
icons + + +object + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + +
Fires:
+
    +
  • visible-console:connected - When an instance of the component is attached to the DOM. `evt.event:details` contains the details of the element.
  • + +
  • component-template:ready - Alias for connected.event: The instance can handle property & attribute changes
  • + +
  • visible-console:disconnected - When an instance of the component is removed from the DOM. `evt.event:details` contains the details of the element.
  • + +
  • visible-console:attribChanged - When a watched attribute changes. `evt.details` contains the details of the change. +NOTE that listeners can be attached either to the `document` or to the specific element instance. +Standard watched attributes (common across all my components):event:
  • +
+ + + + + + + + + + + + + + + +
Example
+ +
<visible-console></visible-console>
+METHODS FROM BASE:
+ + + + + + + + + +

(static) highlight Convert object to HTML()

+ + + + + + +
+ Define a new zero dependency custom web component ECMA module that can be used as an HTML tag +
+ + + + + + + + + + + + + +
Properties:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
_iCount + + +number + + + + Static. The component version string (date updated)
uib + + +boolean + + + + True if UIBUILDER for Node-RED is loaded
$ + + +function + + + + jQuery-like shadow dom selector
$$ + + +function + + + + jQuery-like shadow dom multi-selector
name + + +string + + + + Placeholder for the optional name attribute
opts + + +object + + + + This components controllable options - get/set using the `config()` method
version + + +string + + + + Static. The component version string (date updated). Also has a getter that returns component and base version strings. +Other props:
json + + +object +| + +JSON +| + +string + + + + JSON to convert +By default, all attributes are also created as properties
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + +
Fires:
+
    +
  • syntax-highlight:connected - When an instance of the component is attached to the DOM. `evt.event:details` contains the details of the element.
  • + +
  • component-template:ready - Alias for connected.event: The instance can handle property & attribute changes
  • + +
  • syntax-highlight:disconnected - When an instance of the component is removed from the DOM. `evt.event:details` contains the details of the element.
  • + +
  • syntax-highlight:attribChanged - When a watched attribute changes. `evt.details` contains the details of the change. +NOTE that listeners can be attached either to the `document` or to the specific element instance. +Standard watched attributes (common across all my components):event:
  • +
+ + + + + + + + + + + + + + + +
Example
+ +
Set the json property on the element
+  const showMsg = document.getElementsByTagName('syntax-highlight')[0]
+  showMsg.json({....})
+METHODS FROM BASE:
+ + + + + + + + + +

(static) highlight Convert object to HTML()

+ + + + + + +
+ Define a new zero dependency custom web component ECMA module that can be used as an HTML tag +
+ + + + + + + + + + + + + +
Properties:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
_iCount + + +number + + + + Static. The component version string (date updated)
uib + + +boolean + + + + True if UIBUILDER for Node-RED is loaded
$ + + +function + + + + jQuery-like shadow dom selector
$$ + + +function + + + + jQuery-like shadow dom multi-selector
name + + +string + + + + Placeholder for the optional name attribute
opts + + +object + + + + This components controllable options - get/set using the `config()` method
version + + +string + + + + Static. The component version string (date updated). Also has a getter that returns component and base version strings. +Other props:
json + + +object +| + +JSON +| + +string + + + + JSON to convert +By default, all attributes are also created as properties
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + +
Fires:
+
    +
  • syntax-highlight:connected - When an instance of the component is attached to the DOM. `evt.event:details` contains the details of the element.
  • + +
  • component-template:ready - Alias for connected.event: The instance can handle property & attribute changes
  • + +
  • syntax-highlight:disconnected - When an instance of the component is removed from the DOM. `evt.event:details` contains the details of the element.
  • + +
  • syntax-highlight:attribChanged - When a watched attribute changes. `evt.details` contains the details of the change. +NOTE that listeners can be attached either to the `document` or to the specific element instance. +Standard watched attributes (common across all my components):event:
  • +
+ + + + + + + + + + + + + + + +
Example
+ +
Set the json property on the element
+  const showMsg = document.getElementsByTagName('syntax-highlight')[0]
+  showMsg.json({....})
+METHODS FROM BASE:
+ + + + + + + + + +
+ +
+ + + + + + + +
+ +
+ +

Beta

+ + +
+ +
+
+ + +
Namespace
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + +
+ + + + + + + + + + + + + + + + +

Methods

+ + + + + + + +

(static) createHTMLVisualizer Creates an HTML visualisation of the input()

+ + + + + + +
+ A zero dependency web component that will display JavaScript console output on-page. +
+ + + + + + + + + + + + + +
Properties:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
_iCount + + +number + + + + Static. The component version string (date updated)
uib + + +boolean + + + + True if UIBUILDER for Node-RED is loaded
$ + + +function + + + + jQuery-like shadow dom selector
$$ + + +function + + + + jQuery-like shadow dom multi-selector
name + + +string + + + + Placeholder for the optional name attribute
opts + + +object + + + + This components controllable options - get/set using the `config()` method
version + + +string + + + + Static. The component version string (date updated). Also has a getter that returns component and base version strings. + +Other props:
colors + + +object + + + +
bgColors + + +object + + + +
icons + + +object + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + +
Fires:
+
    +
  • visible-console:connected - When an instance of the component is attached to the DOM. `evt.event:details` contains the details of the element.
  • + +
  • component-template:ready - Alias for connected.event: The instance can handle property & attribute changes
  • + +
  • visible-console:disconnected - When an instance of the component is removed from the DOM. `evt.event:details` contains the details of the element.
  • + +
  • visible-console:attribChanged - When a watched attribute changes. `evt.details` contains the details of the change. +NOTE that listeners can be attached either to the `document` or to the specific element instance. +Standard watched attributes (common across all my components):event:
  • +
+ + + + + + + + + + + + + + + +
Example
+ +
<visible-console></visible-console>
+METHODS FROM BASE:
+ + + + + + + + + +

(static) createHTMLVisualizer Creates an HTML visualisation of the input()

+ + + + + + +
+ A zero dependency web component that will display JavaScript console output on-page. +
+ + + + + + + + + + + + + +
Properties:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
_iCount + + +number + + + + Static. The component version string (date updated)
uib + + +boolean + + + + True if UIBUILDER for Node-RED is loaded
$ + + +function + + + + jQuery-like shadow dom selector
$$ + + +function + + + + jQuery-like shadow dom multi-selector
name + + +string + + + + Placeholder for the optional name attribute
opts + + +object + + + + This components controllable options - get/set using the `config()` method
version + + +string + + + + Static. The component version string (date updated). Also has a getter that returns component and base version strings. + +Other props:
colors + + +object + + + +
bgColors + + +object + + + +
icons + + +object + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + +
Fires:
+
    +
  • visible-console:connected - When an instance of the component is attached to the DOM. `evt.event:details` contains the details of the element.
  • + +
  • component-template:ready - Alias for connected.event: The instance can handle property & attribute changes
  • + +
  • visible-console:disconnected - When an instance of the component is removed from the DOM. `evt.event:details` contains the details of the element.
  • + +
  • visible-console:attribChanged - When a watched attribute changes. `evt.details` contains the details of the change. +NOTE that listeners can be attached either to the `document` or to the specific element instance. +Standard watched attributes (common across all my components):event:
  • +
+ + + + + + + + + + + + + + + +
Example
+ +
<visible-console></visible-console>
+METHODS FROM BASE:
+ + + + + + + + + +

(static) highlight Convert object to HTML()

+ + + + + + +
+ Define a new zero dependency custom web component ECMA module that can be used as an HTML tag +
+ + + + + + + + + + + + + +
Properties:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
_iCount + + +number + + + + Static. The component version string (date updated)
uib + + +boolean + + + + True if UIBUILDER for Node-RED is loaded
$ + + +function + + + + jQuery-like shadow dom selector
$$ + + +function + + + + jQuery-like shadow dom multi-selector
name + + +string + + + + Placeholder for the optional name attribute
opts + + +object + + + + This components controllable options - get/set using the `config()` method
version + + +string + + + + Static. The component version string (date updated). Also has a getter that returns component and base version strings. +Other props:
json + + +object +| + +JSON +| + +string + + + + JSON to convert +By default, all attributes are also created as properties
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + +
Fires:
+
    +
  • syntax-highlight:connected - When an instance of the component is attached to the DOM. `evt.event:details` contains the details of the element.
  • + +
  • component-template:ready - Alias for connected.event: The instance can handle property & attribute changes
  • + +
  • syntax-highlight:disconnected - When an instance of the component is removed from the DOM. `evt.event:details` contains the details of the element.
  • + +
  • syntax-highlight:attribChanged - When a watched attribute changes. `evt.details` contains the details of the change. +NOTE that listeners can be attached either to the `document` or to the specific element instance. +Standard watched attributes (common across all my components):event:
  • +
+ + + + + + + + + + + + + + + +
Example
+ +
Set the json property on the element
+  const showMsg = document.getElementsByTagName('syntax-highlight')[0]
+  showMsg.json({....})
+METHODS FROM BASE:
+ + + + + + + + + +

(static) highlight Convert object to HTML()

+ + + + + + +
+ Define a new zero dependency custom web component ECMA module that can be used as an HTML tag +
+ + + + + + + + + + + + + +
Properties:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
_iCount + + +number + + + + Static. The component version string (date updated)
uib + + +boolean + + + + True if UIBUILDER for Node-RED is loaded
$ + + +function + + + + jQuery-like shadow dom selector
$$ + + +function + + + + jQuery-like shadow dom multi-selector
name + + +string + + + + Placeholder for the optional name attribute
opts + + +object + + + + This components controllable options - get/set using the `config()` method
version + + +string + + + + Static. The component version string (date updated). Also has a getter that returns component and base version strings. +Other props:
json + + +object +| + +JSON +| + +string + + + + JSON to convert +By default, all attributes are also created as properties
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + +
Fires:
+
    +
  • syntax-highlight:connected - When an instance of the component is attached to the DOM. `evt.event:details` contains the details of the element.
  • + +
  • component-template:ready - Alias for connected.event: The instance can handle property & attribute changes
  • + +
  • syntax-highlight:disconnected - When an instance of the component is removed from the DOM. `evt.event:details` contains the details of the element.
  • + +
  • syntax-highlight:attribChanged - When a watched attribute changes. `evt.details` contains the details of the change. +NOTE that listeners can be attached either to the `document` or to the specific element instance. +Standard watched attributes (common across all my components):event:
  • +
+ + + + + + + + + + + + + + + +
Example
+ +
Set the json property on the element
+  const showMsg = document.getElementsByTagName('syntax-highlight')[0]
+  showMsg.json({....})
+METHODS FROM BASE:
+ + + + + + + + + +
+ +
+ + + + + + + +
+ +
+ +

Beta

+ + +
+ +
+
+ + +
Namespace
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + +
+ + + + + + + + + + + + + + + + +

Methods

+ + + + + + + +

(static) createHTMLVisualizer Creates an HTML visualisation of the input()

+ + + + + + +
+ A zero dependency web component that will display JavaScript console output on-page. +
+ + + + + + + + + + + + + +
Properties:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
_iCount + + +number + + + + Static. The component version string (date updated)
uib + + +boolean + + + + True if UIBUILDER for Node-RED is loaded
$ + + +function + + + + jQuery-like shadow dom selector
$$ + + +function + + + + jQuery-like shadow dom multi-selector
name + + +string + + + + Placeholder for the optional name attribute
opts + + +object + + + + This components controllable options - get/set using the `config()` method
version + + +string + + + + Static. The component version string (date updated). Also has a getter that returns component and base version strings. + +Other props:
colors + + +object + + + +
bgColors + + +object + + + +
icons + + +object + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + +
Fires:
+
    +
  • visible-console:connected - When an instance of the component is attached to the DOM. `evt.event:details` contains the details of the element.
  • + +
  • component-template:ready - Alias for connected.event: The instance can handle property & attribute changes
  • + +
  • visible-console:disconnected - When an instance of the component is removed from the DOM. `evt.event:details` contains the details of the element.
  • + +
  • visible-console:attribChanged - When a watched attribute changes. `evt.details` contains the details of the change. +NOTE that listeners can be attached either to the `document` or to the specific element instance. +Standard watched attributes (common across all my components):event:
  • +
+ + + + + + + + + + + + + + + +
Example
+ +
<visible-console></visible-console>
+METHODS FROM BASE:
+ + + + + + + + + +

(static) createHTMLVisualizer Creates an HTML visualisation of the input()

+ + + + + + +
+ A zero dependency web component that will display JavaScript console output on-page. +
+ + + + + + + + + + + + + +
Properties:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
_iCount + + +number + + + + Static. The component version string (date updated)
uib + + +boolean + + + + True if UIBUILDER for Node-RED is loaded
$ + + +function + + + + jQuery-like shadow dom selector
$$ + + +function + + + + jQuery-like shadow dom multi-selector
name + + +string + + + + Placeholder for the optional name attribute
opts + + +object + + + + This components controllable options - get/set using the `config()` method
version + + +string + + + + Static. The component version string (date updated). Also has a getter that returns component and base version strings. + +Other props:
colors + + +object + + + +
bgColors + + +object + + + +
icons + + +object + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + +
Fires:
+
    +
  • visible-console:connected - When an instance of the component is attached to the DOM. `evt.event:details` contains the details of the element.
  • + +
  • component-template:ready - Alias for connected.event: The instance can handle property & attribute changes
  • + +
  • visible-console:disconnected - When an instance of the component is removed from the DOM. `evt.event:details` contains the details of the element.
  • + +
  • visible-console:attribChanged - When a watched attribute changes. `evt.details` contains the details of the change. +NOTE that listeners can be attached either to the `document` or to the specific element instance. +Standard watched attributes (common across all my components):event:
  • +
+ + + + + + + + + + + + + + + +
Example
+ +
<visible-console></visible-console>
+METHODS FROM BASE:
+ + + + + + + + + +

(static) highlight Convert object to HTML()

+ + + + + + +
+ Define a new zero dependency custom web component ECMA module that can be used as an HTML tag +
+ + + + + + + + + + + + + +
Properties:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
_iCount + + +number + + + + Static. The component version string (date updated)
uib + + +boolean + + + + True if UIBUILDER for Node-RED is loaded
$ + + +function + + + + jQuery-like shadow dom selector
$$ + + +function + + + + jQuery-like shadow dom multi-selector
name + + +string + + + + Placeholder for the optional name attribute
opts + + +object + + + + This components controllable options - get/set using the `config()` method
version + + +string + + + + Static. The component version string (date updated). Also has a getter that returns component and base version strings. +Other props:
json + + +object +| + +JSON +| + +string + + + + JSON to convert +By default, all attributes are also created as properties
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + +
Fires:
+
    +
  • syntax-highlight:connected - When an instance of the component is attached to the DOM. `evt.event:details` contains the details of the element.
  • + +
  • component-template:ready - Alias for connected.event: The instance can handle property & attribute changes
  • + +
  • syntax-highlight:disconnected - When an instance of the component is removed from the DOM. `evt.event:details` contains the details of the element.
  • + +
  • syntax-highlight:attribChanged - When a watched attribute changes. `evt.details` contains the details of the change. +NOTE that listeners can be attached either to the `document` or to the specific element instance. +Standard watched attributes (common across all my components):event:
  • +
+ + + + + + + + + + + + + + + +
Example
+ +
Set the json property on the element
+  const showMsg = document.getElementsByTagName('syntax-highlight')[0]
+  showMsg.json({....})
+METHODS FROM BASE:
+ + + + + + + + + +

(static) highlight Convert object to HTML()

+ + + + + + +
+ Define a new zero dependency custom web component ECMA module that can be used as an HTML tag +
+ + + + + + + + + + + + + +
Properties:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -3083,7 +13392,7 @@
Properties:
Source:
@@ -3100,13 +13409,14 @@
Properties:
Fires:
    -
  • visible-console:connected - When an instance of the component is attached to the DOM. `evt.event:details` contains the details of the element.
  • +
  • syntax-highlight:connected - When an instance of the component is attached to the DOM. `evt.event:details` contains the details of the element.
  • -
  • visible-console:disconnected - When an instance of the component is removed from the DOM. `evt.event:details` contains the details of the element.
  • +
  • component-template:ready - Alias for connected.event: The instance can handle property & attribute changes
  • -
  • visible-console:attribChanged - When a watched attribute changes. `evt.details` contains the details of the change. -NOTE that listeners can be attached either to the `document` or to the specific element instance. +
  • syntax-highlight:disconnected - When an instance of the component is removed from the DOM. `evt.event:details` contains the details of the element.
  • +
  • syntax-highlight:attribChanged - When a watched attribute changes. `evt.details` contains the details of the change. +NOTE that listeners can be attached either to the `document` or to the specific element instance. Standard watched attributes (common across all my components):event:
@@ -3126,7 +13436,10 @@
Fires:
Example
-
<visible-console></visible-console>
+
Set the json property on the element
+  const showMsg = document.getElementsByTagName('syntax-highlight')[0]
+  showMsg.json({....})
+METHODS FROM BASE:
@@ -3159,8 +13472,6 @@

Beta

-
Namespace
- @@ -3194,7 +13505,7 @@

Beta

Source:
@@ -3282,13 +13593,13 @@
Properties:
- + + @@ -3374,13 +13685,13 @@
Properties:
- + + @@ -3413,7 +13724,31 @@
Properties:
- + + + + + + + + + + + + + + + + @@ -3522,7 +13857,7 @@
Properties:
Source:
@@ -3541,11 +13876,12 @@
Fires:
  • visible-console:connected - When an instance of the component is attached to the DOM. `evt.event:details` contains the details of the element.
  • +
  • component-template:ready - Alias for connected.event: The instance can handle property & attribute changes
  • +
  • visible-console:disconnected - When an instance of the component is removed from the DOM. `evt.event:details` contains the details of the element.
  • visible-console:attribChanged - When a watched attribute changes. `evt.details` contains the details of the change. NOTE that listeners can be attached either to the `document` or to the specific element instance. - Standard watched attributes (common across all my components):event:
@@ -3565,7 +13901,8 @@
Fires:
Example
-
<visible-console></visible-console>
+
<visible-console></visible-console>
+METHODS FROM BASE:
@@ -3624,13 +13961,13 @@
Properties:
- + + @@ -3716,13 +14053,13 @@
Properties:
- + + @@ -3755,7 +14092,31 @@
Properties:
- + + + + + + + + + + + + + + + + @@ -3864,7 +14225,7 @@
Properties:
Source:
@@ -3883,11 +14244,12 @@
Fires:
  • visible-console:connected - When an instance of the component is attached to the DOM. `evt.event:details` contains the details of the element.
  • +
  • component-template:ready - Alias for connected.event: The instance can handle property & attribute changes
  • +
  • visible-console:disconnected - When an instance of the component is removed from the DOM. `evt.event:details` contains the details of the element.
  • visible-console:attribChanged - When a watched attribute changes. `evt.details` contains the details of the change. NOTE that listeners can be attached either to the `document` or to the specific element instance. - Standard watched attributes (common across all my components):event:
@@ -3907,104 +14269,10 @@
Fires:
Example
-
<visible-console></visible-console>
- - - - - - - - - - - - - - - - - - - -
- -
- -

Beta

- - -
- -
-
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - -
- - - - - - - - - - - - +
<visible-console></visible-console>
+METHODS FROM BASE:
- - -

Methods

@@ -4012,7 +14280,7 @@

Methods

-

(static) createHTMLVisualizer Creates an HTML visualisation of the input()

+

(static) highlight Convert object to HTML()

@@ -4020,7 +14288,7 @@

- A zero dependency web component that will display JavaScript console output on-page. + Define a new zero dependency custom web component ECMA module that can be used as an HTML tag
@@ -4061,13 +14329,13 @@

Properties:
- + + @@ -4153,13 +14421,13 @@
Properties:
- + + @@ -4192,21 +14460,20 @@
Properties:
- + - + + - + - - - - - - - - - - - - - - - - + @@ -4301,7 +14553,7 @@
Properties:
Source:
@@ -4318,13 +14570,14 @@
Properties:
Fires:
    -
  • visible-console:connected - When an instance of the component is attached to the DOM. `evt.event:details` contains the details of the element.
  • +
  • syntax-highlight:connected - When an instance of the component is attached to the DOM. `evt.event:details` contains the details of the element.
  • -
  • visible-console:disconnected - When an instance of the component is removed from the DOM. `evt.event:details` contains the details of the element.
  • +
  • component-template:ready - Alias for connected.event: The instance can handle property & attribute changes
  • -
  • visible-console:attribChanged - When a watched attribute changes. `evt.details` contains the details of the change. -NOTE that listeners can be attached either to the `document` or to the specific element instance. +
  • syntax-highlight:disconnected - When an instance of the component is removed from the DOM. `evt.event:details` contains the details of the element.
  • +
  • syntax-highlight:attribChanged - When a watched attribute changes. `evt.details` contains the details of the change. +NOTE that listeners can be attached either to the `document` or to the specific element instance. Standard watched attributes (common across all my components):event:
@@ -4344,7 +14597,10 @@
Fires:
Example
-
<visible-console></visible-console>
+
Set the json property on the element
+  const showMsg = document.getElementsByTagName('syntax-highlight')[0]
+  showMsg.json({....})
+METHODS FROM BASE:
@@ -4354,7 +14610,7 @@
Example
-

(static) createHTMLVisualizer Creates an HTML visualisation of the input()

+

(static) highlight Convert object to HTML()

@@ -4362,7 +14618,7 @@

- A zero dependency web component that will display JavaScript console output on-page. + Define a new zero dependency custom web component ECMA module that can be used as an HTML tag
@@ -4403,13 +14659,13 @@

Properties:
- + + @@ -4495,13 +14751,13 @@
Properties:
- + + @@ -4534,21 +14790,20 @@
Properties:
- + - + + - + - - - - - - - - - - - - - - - - + @@ -4643,7 +14883,7 @@
Properties:
Source:
@@ -4660,13 +14900,14 @@
Properties:
Fires:
    -
  • visible-console:connected - When an instance of the component is attached to the DOM. `evt.event:details` contains the details of the element.
  • +
  • syntax-highlight:connected - When an instance of the component is attached to the DOM. `evt.event:details` contains the details of the element.
  • -
  • visible-console:disconnected - When an instance of the component is removed from the DOM. `evt.event:details` contains the details of the element.
  • +
  • component-template:ready - Alias for connected.event: The instance can handle property & attribute changes
  • -
  • visible-console:attribChanged - When a watched attribute changes. `evt.details` contains the details of the change. -NOTE that listeners can be attached either to the `document` or to the specific element instance. +
  • syntax-highlight:disconnected - When an instance of the component is removed from the DOM. `evt.event:details` contains the details of the element.
  • +
  • syntax-highlight:attribChanged - When a watched attribute changes. `evt.details` contains the details of the change. +NOTE that listeners can be attached either to the `document` or to the specific element instance. Standard watched attributes (common across all my components):event:
@@ -4686,7 +14927,10 @@
Fires:
Example
-
<visible-console></visible-console>
+
Set the json property on the element
+  const showMsg = document.getElementsByTagName('syntax-highlight')[0]
+  showMsg.json({....})
+METHODS FROM BASE:
@@ -4706,13 +14950,13 @@
Example

- Documentation generated by JSDoc 4.0.3 on Tue Sep 24 2024 19:36:38 GMT+0100 (British Summer Time) + Documentation generated by JSDoc 4.0.3 on Sun Sep 29 2024 17:56:15 GMT+0100 (British Summer Time)
diff --git a/docs/jsdoc/ButtonSend.html b/docs/jsdoc/ButtonSend.html index c322137..9b2d55f 100644 --- a/docs/jsdoc/ButtonSend.html +++ b/docs/jsdoc/ButtonSend.html @@ -93,7 +93,7 @@

new ButtonS
Source:
@@ -187,7 +187,7 @@

_msgSource:
@@ -249,7 +249,7 @@

_msgSource:
@@ -311,7 +311,7 @@

_uiSource:
@@ -373,7 +373,7 @@

_uiSource:
@@ -445,7 +445,7 @@
Type:
Source:
@@ -517,7 +517,7 @@
Type:
Source:
@@ -592,7 +592,7 @@
Type:
Source:
@@ -667,7 +667,7 @@
Type:
Source:
@@ -729,7 +729,7 @@

versionSource:
@@ -791,7 +791,7 @@

versionSource:
@@ -853,7 +853,7 @@

(static)
Source:
@@ -915,7 +915,7 @@

(static)
Source:
@@ -1090,7 +1090,7 @@
Parameters:
Source:
@@ -1273,7 +1273,7 @@
Parameters:
Source:
@@ -1361,7 +1361,7 @@

conn
Source:
@@ -1449,7 +1449,7 @@

conn
Source:
@@ -1537,7 +1537,7 @@

d
Source:
@@ -1625,7 +1625,7 @@

d
Source:
@@ -1762,7 +1762,7 @@

Parameters:
Source:
@@ -1899,7 +1899,7 @@
Parameters:
Source:
@@ -2014,7 +2014,7 @@

new ButtonS
Source:
@@ -2108,7 +2108,7 @@

_msgSource:
@@ -2170,7 +2170,7 @@

_msgSource:
@@ -2232,7 +2232,7 @@

_uiSource:
@@ -2294,7 +2294,7 @@

_uiSource:
@@ -2366,7 +2366,7 @@
Type:
Source:
@@ -2438,7 +2438,7 @@
Type:
Source:
@@ -2513,7 +2513,7 @@
Type:
Source:
@@ -2588,7 +2588,7 @@
Type:
Source:
@@ -2650,7 +2650,7 @@

versionSource:
@@ -2712,7 +2712,7 @@

versionSource:
@@ -2774,7 +2774,7 @@

(static)
Source:
@@ -2836,7 +2836,7 @@

(static)
Source:
@@ -3011,7 +3011,7 @@
Parameters:
Source:
@@ -3194,7 +3194,7 @@
Parameters:
Source:
@@ -3282,7 +3282,7 @@

conn
Source:
@@ -3370,7 +3370,7 @@

conn
Source:
@@ -3458,7 +3458,7 @@

d
Source:
@@ -3546,7 +3546,7 @@

d
Source:
@@ -3683,7 +3683,7 @@

Parameters:
Source:
@@ -3820,7 +3820,7 @@
Parameters:
Source:
@@ -3866,13 +3866,13 @@
Parameters:

- Documentation generated by JSDoc 4.0.3 on Tue Sep 24 2024 19:36:38 GMT+0100 (British Summer Time) + Documentation generated by JSDoc 4.0.3 on Sun Sep 29 2024 17:56:15 GMT+0100 (British Summer Time)
diff --git a/docs/jsdoc/CallOut.html b/docs/jsdoc/CallOut.html new file mode 100644 index 0000000..cf11acb --- /dev/null +++ b/docs/jsdoc/CallOut.html @@ -0,0 +1,2249 @@ + + + + + JSDoc: Class: CallOut + + + + + + + + + + +
+ +

Class: CallOut

+ + + + + + +
+ +
+ +

CallOut()

+ + +
+ +
+
+ + + + + + +

new CallOut()

+ + + + + + +
+ NB: Attributes not available here - use connectedCallback to reference +
+ + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + +

Members

+ + + +

version

+ + + + +
+ Component version +
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

version

+ + + + +
+ Component version +
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

(static) observedAttributes

+ + + + +
+ Makes HTML attribute change watched +
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

(static) observedAttributes

+ + + + +
+ Makes HTML attribute change watched +
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + +

Methods

+ + + + + + + +

attributeChangedCallback(attrib, oldVal, newVal)

+ + + + + + +
+ Runs when an observed attribute changes - Note: values are always strings +
+ + + + + + + + + +
Parameters:
+ + +

NameTypeDescription
_iCount + + +number + + + + Static. The component version string (date updated)
uib + + +boolean + + + + True if UIBUILDER for Node-RED is loaded
$ + + +function + + + + jQuery-like shadow dom selector
$$ + + +function + + + + jQuery-like shadow dom multi-selector
name + + +string + + + + Placeholder for the optional name attribute
opts + + +object + + + + This components controllable options - get/set using the `config()` method
version + + +string + + + + Static. The component version string (date updated). Also has a getter that returns component and base version strings. +Other props:
json + + +object +| + +JSON +| + +string @@ -3044,7 +13352,8 @@
Properties:
-
JSON to convert +By default, all attributes are also created as properties
version_iCount -string +number @@ -3298,7 +13609,7 @@
Properties:
-
Static. The component version string (date updated). Also has a getter.Static. The component version string (date updated)
_iCountname -number +string @@ -3390,7 +13701,7 @@
Properties:
-
The component version string (date updated)Placeholder for the optional name attribute
This components controllable options - get/set using the `config()` method + This components controllable options - get/set using the `config()` method
version + + +string + + + + Static. The component version string (date updated). Also has a getter that returns component and base version strings. + Other props:
version_iCount -string +number @@ -3640,7 +13977,7 @@
Properties:
-
Static. The component version string (date updated). Also has a getter.Static. The component version string (date updated)
_iCountname -number +string @@ -3732,7 +14069,7 @@
Properties:
-
The component version string (date updated)Placeholder for the optional name attribute
This components controllable options - get/set using the `config()` method + This components controllable options - get/set using the `config()` method
version + + +string + + + + Static. The component version string (date updated). Also has a getter that returns component and base version strings. + Other props:
version_iCount -string +number @@ -4077,7 +14345,7 @@
Properties:
-
Static. The component version string (date updated). Also has a getter.Static. The component version string (date updated)
_iCountname -number +string @@ -4169,7 +14437,7 @@
Properties:
-
The component version string (date updated)Placeholder for the optional name attribute
This components controllable options - get/set using the `config()` method -Other props:This components controllable options - get/set using the `config()` method
colorsversion -object +string @@ -4216,43 +14483,27 @@
Properties:
-
Static. The component version string (date updated). Also has a getter that returns component and base version strings. +Other props:
bgColorsjson object +| +JSON +| - -
icons - - -object +string @@ -4262,7 +14513,8 @@
Properties:
-
JSON to convert +By default, all attributes are also created as properties
version_iCount -string +number @@ -4419,7 +14675,7 @@
Properties:
-
Static. The component version string (date updated). Also has a getter.Static. The component version string (date updated)
_iCountname -number +string @@ -4511,7 +14767,7 @@
Properties:
-
The component version string (date updated)Placeholder for the optional name attribute
This components controllable options - get/set using the `config()` method -Other props:This components controllable options - get/set using the `config()` method
colorsversion -object +string @@ -4558,43 +14813,27 @@
Properties:
-
Static. The component version string (date updated). Also has a getter that returns component and base version strings. +Other props:
bgColorsjson object +| +JSON +| - -
icons - - -object +string @@ -4604,7 +14843,8 @@
Properties:
-
JSON to convert +By default, all attributes are also created as properties
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
attrib + + +string + + + + Name of watched attribute that has changed
oldVal + + +string + + + + The previous attribute value
newVal + + +string + + + + The new attribute value
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

attributeChangedCallback(attrib, oldVal, newVal)

+ + + + + + +
+ Runs when an observed attribute changes - Note: values are always strings +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
attrib + + +string + + + + Name of watched attribute that has changed
oldVal + + +string + + + + The previous attribute value
newVal + + +string + + + + The new attribute value
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

connectedCallback()

+ + + + + + +
+ Runs when an instance is added to the DOM +
+ + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

connectedCallback()

+ + + + + + +
+ Runs when an instance is added to the DOM +
+ + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

disconnectedCallback()

+ + + + + + +
+ Runs when an instance is removed from the DOM +
+ + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

disconnectedCallback()

+ + + + + + +
+ Runs when an instance is removed from the DOM +
+ + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + +
+ +
+ +

CallOut()

+ + +
+ +
+
+ + + + + + +

new CallOut()

+ + + + + + +
+ NB: Attributes not available here - use connectedCallback to reference +
+ + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + +

Members

+ + + +

version

+ + + + +
+ Component version +
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

version

+ + + + +
+ Component version +
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

(static) observedAttributes

+ + + + +
+ Makes HTML attribute change watched +
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

(static) observedAttributes

+ + + + +
+ Makes HTML attribute change watched +
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + +

Methods

+ + + + + + + +

attributeChangedCallback(attrib, oldVal, newVal)

+ + + + + + +
+ Runs when an observed attribute changes - Note: values are always strings +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
attrib + + +string + + + + Name of watched attribute that has changed
oldVal + + +string + + + + The previous attribute value
newVal + + +string + + + + The new attribute value
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

attributeChangedCallback(attrib, oldVal, newVal)

+ + + + + + +
+ Runs when an observed attribute changes - Note: values are always strings +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
attrib + + +string + + + + Name of watched attribute that has changed
oldVal + + +string + + + + The previous attribute value
newVal + + +string + + + + The new attribute value
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

connectedCallback()

+ + + + + + +
+ Runs when an instance is added to the DOM +
+ + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

connectedCallback()

+ + + + + + +
+ Runs when an instance is added to the DOM +
+ + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

disconnectedCallback()

+ + + + + + +
+ Runs when an instance is removed from the DOM +
+ + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

disconnectedCallback()

+ + + + + + +
+ Runs when an instance is removed from the DOM +
+ + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + +
+ +
+ Documentation generated by JSDoc 4.0.3 on Sun Sep 29 2024 17:56:15 GMT+0100 (British Summer Time) +
+ + + + + \ No newline at end of file diff --git a/docs/jsdoc/CollapsibleHeadings.html b/docs/jsdoc/CollapsibleHeadings.html index 92e0d6a..d4c4849 100644 --- a/docs/jsdoc/CollapsibleHeadings.html +++ b/docs/jsdoc/CollapsibleHeadings.html @@ -93,7 +93,7 @@

ne
Source:
@@ -187,7 +187,7 @@

versionSource:
@@ -249,7 +249,7 @@

versionSource:
@@ -311,7 +311,7 @@

(static)
Source:
@@ -373,7 +373,7 @@

(static)
Source:
@@ -548,7 +548,7 @@
Parameters:
Source:
@@ -731,7 +731,7 @@
Parameters:
Source:
@@ -819,7 +819,7 @@

conn
Source:
@@ -907,7 +907,7 @@

conn
Source:
@@ -995,7 +995,7 @@

d
Source:
@@ -1083,7 +1083,7 @@

d
Source:
@@ -1220,7 +1220,7 @@

Parameters:
Source:
@@ -1357,7 +1357,7 @@
Parameters:
Source:
@@ -1448,7 +1448,7 @@

pro
Source:
@@ -1539,7 +1539,7 @@

pro
Source:
@@ -1654,7 +1654,7 @@

ne
Source:
@@ -1748,7 +1748,7 @@

versionSource:
@@ -1810,7 +1810,7 @@

versionSource:
@@ -1872,7 +1872,7 @@

(static)
Source:
@@ -1934,7 +1934,7 @@

(static)
Source:
@@ -2109,7 +2109,7 @@
Parameters:
Source:
@@ -2292,7 +2292,7 @@
Parameters:
Source:
@@ -2380,7 +2380,7 @@

conn
Source:
@@ -2468,7 +2468,7 @@

conn
Source:
@@ -2556,7 +2556,7 @@

d
Source:
@@ -2644,7 +2644,7 @@

d
Source:
@@ -2781,7 +2781,7 @@

Parameters:
Source:
@@ -2918,7 +2918,7 @@
Parameters:
Source:
@@ -3009,7 +3009,7 @@

pro
Source:
@@ -3100,7 +3100,7 @@

pro
Source:
@@ -3146,13 +3146,13 @@

pro
- Documentation generated by JSDoc 4.0.3 on Tue Sep 24 2024 19:36:38 GMT+0100 (British Summer Time) + Documentation generated by JSDoc 4.0.3 on Sun Sep 29 2024 17:56:15 GMT+0100 (British Summer Time)
diff --git a/docs/jsdoc/ComponentTemplate.html b/docs/jsdoc/ComponentTemplate.html index 8965ac3..6a9051a 100644 --- a/docs/jsdoc/ComponentTemplate.html +++ b/docs/jsdoc/ComponentTemplate.html @@ -93,7 +93,7 @@

new
Source:
@@ -187,7 +187,7 @@

versionSource:
@@ -249,7 +249,7 @@

versionSource:
@@ -311,7 +311,7 @@

(static)
Source:
@@ -373,7 +373,7 @@

(static)
Source:
@@ -548,7 +548,7 @@
Parameters:
Source:
@@ -731,7 +731,7 @@
Parameters:
Source:
@@ -819,7 +819,7 @@

conn
Source:
@@ -907,7 +907,7 @@

conn
Source:
@@ -995,7 +995,7 @@

d
Source:
@@ -1083,7 +1083,7 @@

d
Source:
@@ -1198,7 +1198,7 @@

new
Source:
@@ -1292,7 +1292,7 @@

versionSource:
@@ -1354,7 +1354,7 @@

versionSource:
@@ -1416,7 +1416,7 @@

(static)
Source:
@@ -1478,7 +1478,7 @@

(static)
Source:
@@ -1653,7 +1653,7 @@
Parameters:
Source:
@@ -1836,7 +1836,7 @@
Parameters:
Source:
@@ -1924,7 +1924,7 @@

conn
Source:
@@ -2012,7 +2012,7 @@

conn
Source:
@@ -2100,7 +2100,7 @@

d
Source:
@@ -2188,7 +2188,7 @@

d
Source:
@@ -2234,13 +2234,13 @@

d
- Documentation generated by JSDoc 4.0.3 on Tue Sep 24 2024 19:36:38 GMT+0100 (British Summer Time) + Documentation generated by JSDoc 4.0.3 on Sun Sep 29 2024 17:56:15 GMT+0100 (British Summer Time)
diff --git a/docs/jsdoc/StateTimeline.html b/docs/jsdoc/StateTimeline.html index 0526848..5ee62b2 100644 --- a/docs/jsdoc/StateTimeline.html +++ b/docs/jsdoc/StateTimeline.html @@ -6814,13 +6814,13 @@

Returns:

- Documentation generated by JSDoc 4.0.3 on Tue Sep 24 2024 19:36:38 GMT+0100 (British Summer Time) + Documentation generated by JSDoc 4.0.3 on Sun Sep 29 2024 17:56:15 GMT+0100 (British Summer Time)
diff --git a/docs/jsdoc/SyntaxHighlight.html b/docs/jsdoc/SyntaxHighlight.html new file mode 100644 index 0000000..f25deed --- /dev/null +++ b/docs/jsdoc/SyntaxHighlight.html @@ -0,0 +1,3145 @@ + + + + + JSDoc: Class: SyntaxHighlight + + + + + + + + + + +
+ +

Class: SyntaxHighlight

+ + + + + + +
+ +
+ +

SyntaxHighlight()

+ + +
+ +
+
+ + + + + + +

new SyntaxHighlight()

+ + + + + + +
+ NB: Attributes not available here - use connectedCallback to reference +
+ + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + +

Members

+ + + +

json

+ + + + +
+ Element.json = {...} to show the json object +
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

json

+ + + + +
+ Element.json = {...} to show the json object +
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

version

+ + + + +
+ Component version +
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

version

+ + + + +
+ Component version +
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

(static) observedAttributes

+ + + + +
+ Makes HTML attribute change watched +
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

(static) observedAttributes

+ + + + +
+ Makes HTML attribute change watched +
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + +

Methods

+ + + + + + + +

attributeChangedCallback(attrib, oldVal, newVal)

+ + + + + + +
+ Runs when an observed attribute changes - Note: values are always strings +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
attrib + + +string + + + + Name of watched attribute that has changed
oldVal + + +string + + + + The previous attribute value
newVal + + +string + + + + The new attribute value
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

attributeChangedCallback(attrib, oldVal, newVal)

+ + + + + + +
+ Runs when an observed attribute changes - Note: values are always strings +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
attrib + + +string + + + + Name of watched attribute that has changed
oldVal + + +string + + + + The previous attribute value
newVal + + +string + + + + The new attribute value
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

connectedCallback()

+ + + + + + +
+ Runs when an instance is added to the DOM +
+ + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

connectedCallback()

+ + + + + + +
+ Runs when an instance is added to the DOM +
+ + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

disconnectedCallback()

+ + + + + + +
+ Runs when an instance is removed from the DOM +
+ + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

disconnectedCallback()

+ + + + + + +
+ Runs when an instance is removed from the DOM +
+ + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

(static) highlight(json) → {HTMLElement}

+ + + + + + +
+ Return a formatted HTML version of JSON object +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
json + + +object +| + +JSON + + + + JSON object to convert
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + +
+ Highlighted JSON wrapped in a `
` tag
+
+ + + +
+
+ Type +
+
+ +HTMLElement + + +
+
+ + + + + + + + + + + + + +

(static) highlight(json) → {HTMLElement}

+ + + + + + +
+ Return a formatted HTML version of JSON object +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
json + + +object +| + +JSON + + + + JSON object to convert
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + +
+ Highlighted JSON wrapped in a `
` tag
+
+ + + +
+
+ Type +
+
+ +HTMLElement + + +
+
+ + + + + + + + + + + + + +
+ +
+ + + + + + + +
+ +
+ +

SyntaxHighlight()

+ + +
+ +
+
+ + + + + + +

new SyntaxHighlight()

+ + + + + + +
+ NB: Attributes not available here - use connectedCallback to reference +
+ + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + +

Members

+ + + +

json

+ + + + +
+ Element.json = {...} to show the json object +
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

json

+ + + + +
+ Element.json = {...} to show the json object +
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

version

+ + + + +
+ Component version +
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

version

+ + + + +
+ Component version +
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

(static) observedAttributes

+ + + + +
+ Makes HTML attribute change watched +
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

(static) observedAttributes

+ + + + +
+ Makes HTML attribute change watched +
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + +

Methods

+ + + + + + + +

attributeChangedCallback(attrib, oldVal, newVal)

+ + + + + + +
+ Runs when an observed attribute changes - Note: values are always strings +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
attrib + + +string + + + + Name of watched attribute that has changed
oldVal + + +string + + + + The previous attribute value
newVal + + +string + + + + The new attribute value
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

attributeChangedCallback(attrib, oldVal, newVal)

+ + + + + + +
+ Runs when an observed attribute changes - Note: values are always strings +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
attrib + + +string + + + + Name of watched attribute that has changed
oldVal + + +string + + + + The previous attribute value
newVal + + +string + + + + The new attribute value
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

connectedCallback()

+ + + + + + +
+ Runs when an instance is added to the DOM +
+ + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

connectedCallback()

+ + + + + + +
+ Runs when an instance is added to the DOM +
+ + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

disconnectedCallback()

+ + + + + + +
+ Runs when an instance is removed from the DOM +
+ + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

disconnectedCallback()

+ + + + + + +
+ Runs when an instance is removed from the DOM +
+ + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

(static) highlight(json) → {HTMLElement}

+ + + + + + +
+ Return a formatted HTML version of JSON object +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
json + + +object +| + +JSON + + + + JSON object to convert
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + +
+ Highlighted JSON wrapped in a `
` tag
+
+ + + +
+
+ Type +
+
+ +HTMLElement + + +
+
+ + + + + + + + + + + + + +

(static) highlight(json) → {HTMLElement}

+ + + + + + +
+ Return a formatted HTML version of JSON object +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
json + + +object +| + +JSON + + + + JSON object to convert
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + +
+ Highlighted JSON wrapped in a `
` tag
+
+ + + +
+
+ Type +
+
+ +HTMLElement + + +
+
+ + + + + + + + + + + + + +
+ +
+ + + + +
+ + + +
+ +
+ Documentation generated by JSDoc 4.0.3 on Sun Sep 29 2024 17:56:15 GMT+0100 (British Summer Time) +
+ + + + + \ No newline at end of file diff --git a/docs/jsdoc/VisibleConsole.html b/docs/jsdoc/VisibleConsole.html index 9923b99..412a080 100644 --- a/docs/jsdoc/VisibleConsole.html +++ b/docs/jsdoc/VisibleConsole.html @@ -93,7 +93,7 @@

new Vis
Source:
@@ -187,7 +187,7 @@

optsSource:
@@ -249,7 +249,7 @@

optsSource:
@@ -311,7 +311,7 @@

versionSource:
@@ -373,7 +373,7 @@

versionSource:
@@ -435,7 +435,7 @@

(static)
Source:
@@ -497,7 +497,7 @@

(static)
Source:
@@ -674,7 +674,7 @@
Parameters:
Source:
@@ -859,7 +859,7 @@
Parameters:
Source:
@@ -996,7 +996,7 @@
Parameters:
Source:
@@ -1155,7 +1155,7 @@
Parameters:
Source:
@@ -1265,7 +1265,7 @@

conn
Source:
@@ -1353,7 +1353,7 @@

conn
Source:
@@ -1490,7 +1490,7 @@

Parameters:
Source:
@@ -1645,7 +1645,7 @@
Parameters:
Source:
@@ -1751,7 +1751,7 @@

d
Source:
@@ -1839,7 +1839,7 @@

d
Source:
@@ -1999,7 +1999,7 @@

Parameters:
Source:
@@ -2159,7 +2159,7 @@
Parameters:
Source:
@@ -2247,7 +2247,7 @@

redire
Source:
@@ -2335,7 +2335,7 @@

redire
Source:
@@ -2450,7 +2450,7 @@

new Vis
Source:
@@ -2544,7 +2544,7 @@

optsSource:
@@ -2606,7 +2606,7 @@

optsSource:
@@ -2668,7 +2668,7 @@

versionSource:
@@ -2730,7 +2730,7 @@

versionSource:
@@ -2792,7 +2792,7 @@

(static)
Source:
@@ -2854,7 +2854,7 @@

(static)
Source:
@@ -3031,7 +3031,7 @@
Parameters:
Source:
@@ -3216,7 +3216,7 @@
Parameters:
Source:
@@ -3353,7 +3353,7 @@
Parameters:
Source:
@@ -3512,7 +3512,7 @@
Parameters:
Source:
@@ -3622,7 +3622,7 @@

conn
Source:
@@ -3710,7 +3710,7 @@

conn
Source:
@@ -3847,7 +3847,7 @@

Parameters:
Source:
@@ -4002,7 +4002,7 @@
Parameters:
Source:
@@ -4108,7 +4108,7 @@

d
Source:
@@ -4196,7 +4196,7 @@

d
Source:
@@ -4356,7 +4356,7 @@

Parameters:
Source:
@@ -4516,7 +4516,7 @@
Parameters:
Source:
@@ -4604,7 +4604,7 @@

redire
Source:
@@ -4692,7 +4692,7 @@

redire
Source:
@@ -4738,13 +4738,13 @@

redire
- Documentation generated by JSDoc 4.0.3 on Tue Sep 24 2024 19:36:38 GMT+0100 (British Summer Time) + Documentation generated by JSDoc 4.0.3 on Sun Sep 29 2024 17:56:15 GMT+0100 (British Summer Time)
diff --git a/docs/jsdoc/alpha_chart-frappe.js.html b/docs/jsdoc/alpha_chart-frappe.js.html index 4f65ea6..a8b773b 100644 --- a/docs/jsdoc/alpha_chart-frappe.js.html +++ b/docs/jsdoc/alpha_chart-frappe.js.html @@ -285,13 +285,13 @@

Source: alpha/chart-frappe.js


- Documentation generated by JSDoc 4.0.3 on Tue Sep 24 2024 19:36:38 GMT+0100 (British Summer Time) + Documentation generated by JSDoc 4.0.3 on Sun Sep 29 2024 17:56:15 GMT+0100 (British Summer Time)
diff --git a/docs/jsdoc/alpha_chart-high.js.html b/docs/jsdoc/alpha_chart-high.js.html index cb59199..25b82db 100644 --- a/docs/jsdoc/alpha_chart-high.js.html +++ b/docs/jsdoc/alpha_chart-high.js.html @@ -301,13 +301,13 @@

Source: alpha/chart-high.js


- Documentation generated by JSDoc 4.0.3 on Tue Sep 24 2024 19:36:38 GMT+0100 (British Summer Time) + Documentation generated by JSDoc 4.0.3 on Sun Sep 29 2024 17:56:15 GMT+0100 (British Summer Time)
diff --git a/docs/jsdoc/alpha_component-template.js.html b/docs/jsdoc/alpha_component-template.js.html index 780f91f..53d9731 100644 --- a/docs/jsdoc/alpha_component-template.js.html +++ b/docs/jsdoc/alpha_component-template.js.html @@ -82,30 +82,36 @@

Source: alpha/component-template.js

* @method deepAssign Object deep merger * @method doInheritStyles If requested, add link to an external style sheet * @method ensureId Adds a unique ID to the tag if no ID defined. - * @method _uibMsgHandler If UIBUILDER for Node-RED is active, auto-handle incoming messages targetted at instance id + * @method _uibMsgHandler Not yet in use + * @method _event(name,data) Standardised custom event dispatcher + * @method _ready Call from end of connectedCallback. Sets connected prop and outputs events * OTHER METHODS: * None * @fires component-template:connected - When an instance of the component is attached to the DOM. `evt.details` contains the details of the element. + * @fires component-template:ready - Alias for connected. The instance can handle property & attribute changes * @fires component-template:disconnected - When an instance of the component is removed from the DOM. `evt.details` contains the details of the element. * @fires component-template:attribChanged - When a watched attribute changes. `evt.details` contains the details of the change. * NOTE that listeners can be attached either to the `document` or to the specific element instance. * Standard watched attributes (common across all my components): * @attr {string|boolean} inherit-style - Optional. Load external styles into component (only useful if using template). If present but empty, will default to './index.css'. Optionally give a URL to load. + * @attr {string} name - Optional. HTML name attribute. Included in output _meta prop. * Other watched attributes: * None * Standard props (common across all my components): - * @prop {boolean} uib True if UIBUILDER for Node-RED is loaded. In base class - * @prop {function(string): Element} $ jQuery-like shadow dom selector. In base class - * @prop {function(string): NodeList} $$ jQuery-like shadow dom multi-selector. In base class - * @prop {number} _iCount The component version string (date updated). In base class - * @prop {object} opts This components controllable options - get/set using the `config()` method. In base class + * @prop {number} _iCount Static. The component version string (date updated) + * @prop {boolean} uib True if UIBUILDER for Node-RED is loaded + * @prop {function(string): Element} $ jQuery-like shadow dom selector + * @prop {function(string): NodeList} $$ jQuery-like shadow dom multi-selector + * @prop {boolean} connected False until connectedCallback finishes + * @prop {string} name Placeholder for the optional name attribute + * @prop {object} opts This components controllable options - get/set using the `config()` method * - * @prop {string} version Static. The component version string (date updated). Also has a getter. + * @prop {string} version Static. The component version string (date updated). Also has a getter that returns component and base version strings. * Other props: * By default, all attributes are also created as properties @@ -116,7 +122,7 @@

Source: alpha/component-template.js

*/ class ComponentTemplate extends TiBaseComponent { /** Component version */ - static version = '2024-09-22' + static version = '2024-09-29' /** Makes HTML attribute change watched * @returns {Array<string>} List of all of the html attribs (props) listened to @@ -124,7 +130,7 @@

Source: alpha/component-template.js

static get observedAttributes() { return [ // Standard watched attributes: - 'inherit-style', + 'inherit-style', 'name', // Other watched attributes: ] } @@ -133,8 +139,8 @@

Source: alpha/component-template.js

constructor() { super() + // Only attach the shadow dom if code and style isolation is needed this.attachShadow({ mode: 'open', delegatesFocus: true }) - // Only append the template if code and style isolation is needed .append(template.content.cloneNode(true)) // jQuery-like selectors but for the shadow. NB: Returns are STATIC not dynamic lists @@ -151,15 +157,10 @@

Source: alpha/component-template.js

// OPTIONAL. Listen for a uibuilder msg that is targetted at this instance of the component if (this.uib) document.addEventListener(`uibuilder:msg:_ui:update:${this.id}`, this._uibMsgHandler.bind(this) ) - // Keep at end. Let everyone know that a new instance of the component has been connected - this.dispatchEvent(new CustomEvent(`${this.localName}:connected`, { - bubbles: true, - composed: true, - detail: { - id: this.id, - name: this.name - }, - } ) ) + // Keep at end. Let everyone know that a new instance of the component has been connected & is ready + this.connected = true + this._event('connected') + this._event('ready') } /** Runs when an instance is removed from the DOM */ @@ -168,14 +169,7 @@

Source: alpha/component-template.js

document.removeEventListener(`uibuilder:msg:_ui:update:${this.id}`, this._uibMsgHandler ) // Keep at end. Let everyone know that an instance of the component has been disconnected - this.dispatchEvent(new CustomEvent(`${this.localName}:disconnected`, { - bubbles: true, - composed: true, - detail: { - id: this.id, - name: this.name - }, - } ) ) + this._event('disconnected') } /** Runs when an observed attribute changes - Note: values are always strings @@ -184,6 +178,11 @@

Source: alpha/component-template.js

* @param {string} newVal The new attribute value */ attributeChangedCallback(attrib, oldVal, newVal) { + /** Optionally ignore attrib changes until instance is fully connected + * Otherwise this can fire BEFORE everthing is fully connected. + */ + // if (!this.connected) return + // Don't bother if the new value same as old if ( oldVal === newVal ) return // Create a property from the value - WARN: Be careful with name clashes @@ -193,17 +192,7 @@

Source: alpha/component-template.js

// If attribute processing doesn't need to be dynamic, process in connectedCallback as that happens earlier in the lifecycle // Keep at end. Let everyone know that an attribute has changed for this instance of the component - this.dispatchEvent(new CustomEvent(`${this.localName}:attribChanged`, { - bubbles: true, - composed: true, - detail: { - id: this.id, - name: this.name, - attribute: attrib, - newVal: newVal, - oldVal: oldVal, - } - } ) ) + this._event('attribChanged', { attribute: attrib, newVal: newVal, oldVal: oldVal }) } } // ---- end of Class ---- // @@ -228,13 +217,13 @@

Source: alpha/component-template.js


- Documentation generated by JSDoc 4.0.3 on Tue Sep 24 2024 19:36:38 GMT+0100 (British Summer Time) + Documentation generated by JSDoc 4.0.3 on Sun Sep 29 2024 17:56:15 GMT+0100 (British Summer Time)
diff --git a/docs/jsdoc/alpha_definition-list.js.html b/docs/jsdoc/alpha_definition-list.js.html index 57a658d..98eedc9 100644 --- a/docs/jsdoc/alpha_definition-list.js.html +++ b/docs/jsdoc/alpha_definition-list.js.html @@ -175,13 +175,13 @@

Source: alpha/definition-list.js


- Documentation generated by JSDoc 4.0.3 on Tue Sep 24 2024 19:36:38 GMT+0100 (British Summer Time) + Documentation generated by JSDoc 4.0.3 on Sun Sep 29 2024 17:56:15 GMT+0100 (British Summer Time)
diff --git a/docs/jsdoc/alpha_dynamic-list.js.html b/docs/jsdoc/alpha_dynamic-list.js.html new file mode 100644 index 0000000..4eee476 --- /dev/null +++ b/docs/jsdoc/alpha_dynamic-list.js.html @@ -0,0 +1,192 @@ + + + + + JSDoc: Source: alpha/dynamic-list.js + + + + + + + + + + +
+ +

Source: alpha/dynamic-list.js

+ + + + + + +
+
+

+let template = document.createElement('template');
+template.innerHTML = /*html*/ `
+    <div>List items:</div>
+    <ul></ul>
+`
+
+let instanceCount = 0
+const instance = {}
+
+// Create a GLOBAL var for this component
+// window.dataList = {
+//     count: 0,
+//     instances: {},
+
+    
+
+//     setData: (elementId, elementData) => {
+//         console.log('>> setData this >>', window.dataList.instances[elementId])
+//         // Get ref to element
+//         let el = document.getElementById(elementId)
+
+//         // Set the data
+
+//     },
+// }
+
+export default class DataList extends HTMLElement {
+    constructor() {
+        super()
+        this.attachShadow({ mode: 'open', delegatesFocus: true })
+            .append(template.content.cloneNode(true))
+
+        
+
+        this._list = this.shadowRoot.querySelector('ul')
+
+        this._entries = {}
+    }
+
+    // Getter/setter for the `data` public property - maps to this._entries
+    set data(val) {
+        this._entries = val
+
+        this._list.innerHTML = ''
+        // Dynamically build the content of the ul/ol
+        Object.keys(this._entries).forEach( (key, i) => {
+            this._list.insertAdjacentHTML('beforeend', `<li id="${key}">${key} :: ${this._entries[key]}</li>`)
+        })
+    }
+    get data() {
+        return this._entries
+    }
+    entry(key, val) {
+        // this._list.innerHTML = ''
+        this._entries[key] = val
+        this.data = this._entries
+
+        let sr = this.shadowRoot.getElementById(key)
+        console.log('>> li key >>', sr)
+
+        
+        // Dynamically build the content of the ul/ol
+        // Object.keys(this._entries).forEach( (key, i) => {
+        //     this._list.insertAdjacentHTML('beforeend', `<li id="${key}">${key} :: ${this._entries[key]}</li>`)
+        // })
+    }
+
+    static get instances() {
+        return instanceCount
+    }
+
+    getInstance(instanceId) {
+        return instance[instanceId]
+    }
+
+    static get observedAttributes() { return [
+        'listvar', 'type',
+    ]}
+
+    attributeChangedCallback(name, oldVal, newVal) {
+
+        if ( oldVal === newVal ) return
+
+        if ( name === 'listvar' && window[newVal] ) {
+            if ( window[newVal] ) {
+
+                this.data = window[newVal]
+                // window.dataList.instances[this.id] = window[newVal]
+                // console.log('>> listvar change >>', this.id, this._entries, window.dataList.instances[this.id])
+                //window[newVal] = new Proxy()
+
+            } else {
+                console.error(`[DataList] window.${newVal} does not exist, ignoring.`)
+            }
+
+            return
+        }
+
+        this[name] = newVal
+
+    } // --- end of attributeChangedCallback --- //
+
+    connectedCallback() {
+        // Keep count of the number of instances
+        instanceCount++
+
+        // If no element id, create an ID that should be unique across all instances
+        if (!this.id) {
+            let myname = this.getAttribute('name')
+            if (myname) this.id = myname.replaceAll(' ', '_')
+            else this.id = `dataList${instanceCount}`
+        }
+
+        // Keep track of each instance
+        instance[this.id] = this
+
+        // Notify Event
+        
+    }
+
+    disconnectedCallback() {
+        // Keep count of the number of instances
+        instanceCount--
+
+        // Keep track of each instance
+        delete instance[this.id]
+    }
+}
+
+/** Self register the class to global
+ * Enables new data lists to be dynamically added via JS
+ * and lets the static methods be called
+ */
+window.DataList = DataList
+
+// Export the class as default
+// export default DataList
+
+// Self-register the HTML tag
+customElements.define('data-list', DataList)
+
+
+
+ + + + +
+ + + +
+ +
+ Documentation generated by JSDoc 4.0.3 on Sun Sep 29 2024 17:56:15 GMT+0100 (British Summer Time) +
+ + + + + diff --git a/docs/jsdoc/alpha_gauge-steel.js.html b/docs/jsdoc/alpha_gauge-steel.js.html index 21ef86f..5154b3a 100644 --- a/docs/jsdoc/alpha_gauge-steel.js.html +++ b/docs/jsdoc/alpha_gauge-steel.js.html @@ -256,13 +256,13 @@

Source: alpha/gauge-steel.js


- Documentation generated by JSDoc 4.0.3 on Tue Sep 24 2024 19:36:38 GMT+0100 (British Summer Time) + Documentation generated by JSDoc 4.0.3 on Sun Sep 29 2024 17:56:15 GMT+0100 (British Summer Time)
diff --git a/docs/jsdoc/alpha_ghost-thermometer.js.html b/docs/jsdoc/alpha_ghost-thermometer.js.html index 01e536c..ff95ac2 100644 --- a/docs/jsdoc/alpha_ghost-thermometer.js.html +++ b/docs/jsdoc/alpha_ghost-thermometer.js.html @@ -643,13 +643,13 @@

Source: alpha/ghost-thermometer.js


- Documentation generated by JSDoc 4.0.3 on Tue Sep 24 2024 19:36:38 GMT+0100 (British Summer Time) + Documentation generated by JSDoc 4.0.3 on Sun Sep 29 2024 17:56:15 GMT+0100 (British Summer Time)
diff --git a/docs/jsdoc/alpha_html-include.js.html b/docs/jsdoc/alpha_html-include.js.html deleted file mode 100644 index b62771a..0000000 --- a/docs/jsdoc/alpha_html-include.js.html +++ /dev/null @@ -1,160 +0,0 @@ - - - - - JSDoc: Source: alpha/html-include.js - - - - - - - - - - -
- -

Source: alpha/html-include.js

- - - - - - -
-
-
/** Zero dependency web component to load HTML/JSON dynamically
- * See https://github.com/justinfagnani/html-include-element for inspiration
- */
-
-const template = document.createElement('template')
-template.innerHTML = `
-    <slot></slot>
-    <inner-load></inner-load>
-`
-
-export class HtmlInclude extends HTMLElement {
-
-    constructor() {
-        super()
-        this.type = 'text'
-        this.text = ''
-        this.json = {}
-        this.attachShadow({ mode: 'open', delegatesFocus: true })
-            .appendChild(template.content.cloneNode(true))
-    }
-
-    // component attributes
-    static get observedAttributes() {
-        return ['src']
-    }
-
-    /** The URL to fetch an HTML document from.
-     *  Setting this property causes a fetch the HTML from the URL.
-     *  We are reflecting the src attrib and the src prop.
-     */
-    get src() {
-        return this.getAttribute('src')
-    }
-
-    set src(value) {
-        this.setAttribute('src', value)
-    }
-
-    // attribute change
-    async attributeChangedCallback(property, oldValue, newValue) {
-
-        if (oldValue === newValue) return
-
-        if (property === 'src') {
-            const response = await fetch(newValue)
-
-            if (!response.ok) {
-                throw new Error(`html-include fetch failed: ${response.statusText}`)
-            }
-
-            const contentType = response.headers.get('content-type')
-            if (contentType) {
-                if (contentType.includes('text/html')) {
-                    this.type = 'html'
-                } else if (contentType.includes('application/json')) {
-                    this.type = 'json'
-                } else if (contentType.includes('multipart/form-data')) {
-                    this.type = 'form'
-                }
-            }
-
-            // Could add other binary types here. https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API/Using_Fetch#body
-            switch (this.type) {
-                case 'html': {
-                    this.text = await response.text()
-                    const parser = new DOMParser()
-                    const newDoc = parser.parseFromString( this.text, 'text/html' )
-                    this.shadowRoot.removeChild(this.shadowRoot.lastElementChild)
-                    this.shadowRoot.appendChild(newDoc.body)
-                    break
-                }
-
-                case 'json': {
-                    this.json = await response.json()
-                    this.text = JSON.stringify(this.json, null, 4)
-                    this.shadowRoot.removeChild(this.shadowRoot.lastElementChild)
-                    const myHtml = document.createElement('pre')
-                    myHtml.textContent = this.text
-                    this.shadowRoot.appendChild( myHtml )
-                    break
-                }
-
-                case 'form': {
-                    this.json = await response.formData()
-                    this.text = JSON.stringify(this.json)
-                    this.shadowRoot.removeChild(this.shadowRoot.lastElementChild)
-                    this.shadowRoot.append(this.text)
-                    break
-                }
-
-                default: {
-                    this.text = await response.text()
-                    this.shadowRoot.append(this.text)
-                    break
-                }
-            }
-
-        }
-
-    }
-
-    // connect component
-    // connectedCallback() {
-    //     console.log('>> HelloWorld >> connectedCallback >>')
-    // }
-
-}
-
-customElements.define('html-include', HtmlInclude)
-
-
-
- - - - -
- - - -
- -
- Documentation generated by JSDoc 4.0.3 on Tue Sep 24 2024 19:36:38 GMT+0100 (British Summer Time) -
- - - - - diff --git a/docs/jsdoc/alpha_labelled-value.js.html b/docs/jsdoc/alpha_labelled-value.js.html index 8c25ed5..c99829a 100644 --- a/docs/jsdoc/alpha_labelled-value.js.html +++ b/docs/jsdoc/alpha_labelled-value.js.html @@ -272,13 +272,13 @@

Source: alpha/labelled-value.js


- Documentation generated by JSDoc 4.0.3 on Tue Sep 24 2024 19:36:38 GMT+0100 (British Summer Time) + Documentation generated by JSDoc 4.0.3 on Sun Sep 29 2024 17:56:15 GMT+0100 (British Summer Time)
diff --git a/docs/jsdoc/alpha_multi-way-switch.js.html b/docs/jsdoc/alpha_multi-way-switch.js.html index 72c8e12..7058895 100644 --- a/docs/jsdoc/alpha_multi-way-switch.js.html +++ b/docs/jsdoc/alpha_multi-way-switch.js.html @@ -292,13 +292,13 @@

Source: alpha/multi-way-switch.js


- Documentation generated by JSDoc 4.0.3 on Tue Sep 24 2024 19:36:38 GMT+0100 (British Summer Time) + Documentation generated by JSDoc 4.0.3 on Sun Sep 29 2024 17:56:15 GMT+0100 (British Summer Time)
diff --git a/docs/jsdoc/alpha_nav-bar.js.html b/docs/jsdoc/alpha_nav-bar.js.html index d96178c..850656b 100644 --- a/docs/jsdoc/alpha_nav-bar.js.html +++ b/docs/jsdoc/alpha_nav-bar.js.html @@ -399,13 +399,13 @@

Source: alpha/nav-bar.js


- Documentation generated by JSDoc 4.0.3 on Tue Sep 24 2024 19:36:38 GMT+0100 (British Summer Time) + Documentation generated by JSDoc 4.0.3 on Sun Sep 29 2024 17:56:15 GMT+0100 (British Summer Time)
diff --git a/docs/jsdoc/alpha_not-complete_chart-apex.js.html b/docs/jsdoc/alpha_not-complete_chart-apex.js.html index 0c106b5..144017c 100644 --- a/docs/jsdoc/alpha_not-complete_chart-apex.js.html +++ b/docs/jsdoc/alpha_not-complete_chart-apex.js.html @@ -274,13 +274,13 @@

Source: alpha/not-complete/chart-apex.js


- Documentation generated by JSDoc 4.0.3 on Tue Sep 24 2024 19:36:38 GMT+0100 (British Summer Time) + Documentation generated by JSDoc 4.0.3 on Sun Sep 29 2024 17:56:15 GMT+0100 (British Summer Time)
diff --git a/docs/jsdoc/alpha_not-complete_chart-js.js.html b/docs/jsdoc/alpha_not-complete_chart-js.js.html index 0d3e4ff..3dcb5d6 100644 --- a/docs/jsdoc/alpha_not-complete_chart-js.js.html +++ b/docs/jsdoc/alpha_not-complete_chart-js.js.html @@ -273,13 +273,13 @@

Source: alpha/not-complete/chart-js.js


- Documentation generated by JSDoc 4.0.3 on Tue Sep 24 2024 19:36:38 GMT+0100 (British Summer Time) + Documentation generated by JSDoc 4.0.3 on Sun Sep 29 2024 17:56:15 GMT+0100 (British Summer Time)
diff --git a/docs/jsdoc/alpha_not-complete_chart-plotly.js.html b/docs/jsdoc/alpha_not-complete_chart-plotly.js.html index f2363fa..bccd6a6 100644 --- a/docs/jsdoc/alpha_not-complete_chart-plotly.js.html +++ b/docs/jsdoc/alpha_not-complete_chart-plotly.js.html @@ -288,13 +288,13 @@

Source: alpha/not-complete/chart-plotly.js


- Documentation generated by JSDoc 4.0.3 on Tue Sep 24 2024 19:36:38 GMT+0100 (British Summer Time) + Documentation generated by JSDoc 4.0.3 on Sun Sep 29 2024 17:56:15 GMT+0100 (British Summer Time)
diff --git a/docs/jsdoc/alpha_not-complete_container-br.js.html b/docs/jsdoc/alpha_not-complete_container-br.js.html new file mode 100644 index 0000000..731ca1c --- /dev/null +++ b/docs/jsdoc/alpha_not-complete_container-br.js.html @@ -0,0 +1,143 @@ + + + + + JSDoc: Source: alpha/not-complete/container-br.js + + + + + + + + + + +
+ +

Source: alpha/not-complete/container-br.js

+ + + + + + +
+
+
/** Define a new zero dependency custom web component ECMA module that can be used as an HTML tag
+ *
+ * TO USE THIS TEMPLATE: CHANGE ALL INSTANCES OF 'ContainerBr' and 'container-br' & change version below
+ *
+ * @version 0.2 2022-05-11 Early-release
+ *
+ * See: https://web.dev/custom-elements-v1/, https://web.dev/shadowdom-v1/
+ *
+ * See https://github.com/runem/web-component-analyzer#-how-to-document-your-components-using-jsdoc on how to document
+ * Use `npx web-component-analyzer ./components/button-send.js` to create/update the documentation
+ *     or paste into https://runem.github.io/web-component-analyzer/
+ * Use `npx web-component-analyzer ./components/*.js --format vscode --outFile ./vscode-descriptors/ti-web-components.html-data.json`
+ *     to generate/update vscode custom data files. See https://github.com/microsoft/vscode-custom-data/tree/main/samples/webcomponents
+ *
+ **/
+/**
+ * Copyright (c) 2022 Julian Knight (Totally Information)
+ * https://it.knightnet.org.uk, https://github.com/TotallyInformation
+ *
+ * Licensed under the Apache License, Version 2.0 (the 'License');
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an 'AS IS' BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ **/
+
+// just for syntax highlighting in VSCode
+function html(strings, ...keys) {
+    return strings.map( (s, i) => {
+        return s + (keys[i] || '')
+    }).join('')
+}
+
+const componentName = 'container-br'
+const className = 'ContainerBr'
+
+const template = document.createElement('template')
+template.innerHTML = html`
+    <style>
+        :host {
+            display: block;   /* default is inline */
+            contain: content; /* performance boost */
+            flex-basis: 100%;
+            height: 0;
+        }
+    </style>
+`
+
+// Define the class and make it the default export
+/**
+ * @element container-br
+ *
+ * @fires container-br:construction - Document object event. evt.details contains the data
+ * @fires container-br:connected - When an instance of the component is attached to the DOM. `evt.details` contains the details of the element.
+ * @fires container-br:disconnected - When an instance of the component is removed from the DOM. `evt.details` contains the details of the element.
+ * @fires container-br:attribChanged - When a watched attribute changes. `evt.details` contains the details of the change.
+ * NOTE that listeners can be attached either to the `document` or to the specific element instance.
+ *
+ * @attr {string} name - Optional. Will be used to synthesize an ID if no ID is provided.
+ * attr {string} data-* - Optional. All data-* attributes are returned in the _meta prop as a _meta.data object.
+ *
+ * @prop {string} name - Sync'd from name attribute
+ *
+ * @slot Container contents
+ *
+ * @csspart ??? - Uses the uib-styles.css uibuilder master for variables where available.
+ */
+export default class ContainerBr extends HTMLElement {
+    constructor() {
+
+        super()
+        this.attachShadow({ mode: 'open', delegatesFocus: true })
+            .append(template.content.cloneNode(true))
+
+        this.dispatchEvent(new Event(`${componentName}:construction`, { bubbles: true, composed: true }))
+    } // ---- end of constructor ----
+} // ---- end of Class ---- //
+
+/** Self register the class to global
+ * Enables new data lists to be dynamically added via JS
+ * and lets the static methods be called
+ */
+window[className] = ContainerBr
+
+// Self-register the HTML tag
+customElements.define(componentName, ContainerBr)
+
+
+
+ + + + +
+ + + +
+ +
+ Documentation generated by JSDoc 4.0.3 on Sun Sep 29 2024 17:56:15 GMT+0100 (British Summer Time) +
+ + + + + diff --git a/docs/jsdoc/alpha_not-complete_simple-tree.js.html b/docs/jsdoc/alpha_not-complete_simple-tree.js.html index 968cb3f..da3332c 100644 --- a/docs/jsdoc/alpha_not-complete_simple-tree.js.html +++ b/docs/jsdoc/alpha_not-complete_simple-tree.js.html @@ -363,13 +363,13 @@

Source: alpha/not-complete/simple-tree.js


- Documentation generated by JSDoc 4.0.3 on Tue Sep 24 2024 19:36:38 GMT+0100 (British Summer Time) + Documentation generated by JSDoc 4.0.3 on Sun Sep 29 2024 17:56:15 GMT+0100 (British Summer Time)
diff --git a/docs/jsdoc/alpha_not-complete_uib-wrap.js.html b/docs/jsdoc/alpha_not-complete_uib-wrap.js.html index c4eb91a..7ddf8f1 100644 --- a/docs/jsdoc/alpha_not-complete_uib-wrap.js.html +++ b/docs/jsdoc/alpha_not-complete_uib-wrap.js.html @@ -175,13 +175,13 @@

Source: alpha/not-complete/uib-wrap.js


- Documentation generated by JSDoc 4.0.3 on Tue Sep 24 2024 19:36:38 GMT+0100 (British Summer Time) + Documentation generated by JSDoc 4.0.3 on Sun Sep 29 2024 17:56:15 GMT+0100 (British Summer Time)
diff --git a/docs/jsdoc/alpha_simple-card.js.html b/docs/jsdoc/alpha_simple-card.js.html index 1cecbb0..44ec894 100644 --- a/docs/jsdoc/alpha_simple-card.js.html +++ b/docs/jsdoc/alpha_simple-card.js.html @@ -431,13 +431,13 @@

Source: alpha/simple-card.js


- Documentation generated by JSDoc 4.0.3 on Tue Sep 24 2024 19:36:38 GMT+0100 (British Summer Time) + Documentation generated by JSDoc 4.0.3 on Sun Sep 29 2024 17:56:15 GMT+0100 (British Summer Time)
diff --git a/docs/jsdoc/alpha_simple-container.js.html b/docs/jsdoc/alpha_simple-container.js.html index fc31408..efbef1e 100644 --- a/docs/jsdoc/alpha_simple-container.js.html +++ b/docs/jsdoc/alpha_simple-container.js.html @@ -174,13 +174,13 @@

Source: alpha/simple-container.js


- Documentation generated by JSDoc 4.0.3 on Tue Sep 24 2024 19:36:38 GMT+0100 (British Summer Time) + Documentation generated by JSDoc 4.0.3 on Sun Sep 29 2024 17:56:15 GMT+0100 (British Summer Time)
diff --git a/docs/jsdoc/alpha_simple-gauge.js.html b/docs/jsdoc/alpha_simple-gauge.js.html index d345c62..a9f8c9c 100644 --- a/docs/jsdoc/alpha_simple-gauge.js.html +++ b/docs/jsdoc/alpha_simple-gauge.js.html @@ -252,13 +252,13 @@

Source: alpha/simple-gauge.js


- Documentation generated by JSDoc 4.0.3 on Tue Sep 24 2024 19:36:38 GMT+0100 (British Summer Time) + Documentation generated by JSDoc 4.0.3 on Sun Sep 29 2024 17:56:15 GMT+0100 (British Summer Time)
diff --git a/docs/jsdoc/alpha_simple-switch.js.html b/docs/jsdoc/alpha_simple-switch.js.html index d500497..3c1aaf3 100644 --- a/docs/jsdoc/alpha_simple-switch.js.html +++ b/docs/jsdoc/alpha_simple-switch.js.html @@ -58,6 +58,11 @@

Source: alpha/simple-switch.js

* limitations under the License. **/ +/** + * Refs: + * - https://discourse.nodered.org/t/size-of-custom-mdi-switch-icon/91280/9 + */ + const componentName = 'simple-switch' const className = 'SimpleSwitch' @@ -315,13 +320,13 @@

Source: alpha/simple-switch.js


- Documentation generated by JSDoc 4.0.3 on Tue Sep 24 2024 19:36:38 GMT+0100 (British Summer Time) + Documentation generated by JSDoc 4.0.3 on Sun Sep 29 2024 17:56:15 GMT+0100 (British Summer Time)
diff --git a/docs/jsdoc/alpha_state-timeline.js.html b/docs/jsdoc/alpha_state-timeline.js.html index 5ee0021..2154706 100644 --- a/docs/jsdoc/alpha_state-timeline.js.html +++ b/docs/jsdoc/alpha_state-timeline.js.html @@ -516,13 +516,13 @@

Source: alpha/state-timeline.js


- Documentation generated by JSDoc 4.0.3 on Tue Sep 24 2024 19:36:38 GMT+0100 (British Summer Time) + Documentation generated by JSDoc 4.0.3 on Sun Sep 29 2024 17:56:15 GMT+0100 (British Summer Time)
diff --git a/docs/jsdoc/alpha_syntax-highlight.js.html b/docs/jsdoc/alpha_syntax-highlight.js.html deleted file mode 100644 index ef66d69..0000000 --- a/docs/jsdoc/alpha_syntax-highlight.js.html +++ /dev/null @@ -1,251 +0,0 @@ - - - - - JSDoc: Source: alpha/syntax-highlight.js - - - - - - - - - - -
- -

Source: alpha/syntax-highlight.js

- - - - - - -
-
-
/** Zero dependency web component to show a JavaScript object as a highlighted box in the UI
- * Use with uibuilder as:
- *   @example html
- *     <!-- Shows the last incoming msg from Node-RED -->
- *     <syntax-highlight auto="msg">⇇ Latest msg from Node-RED:</syntax-highlight>
- *     <!-- Shows the last outgoing msg to Node-RED -->
- *     <!-- <syntax-highlight auto="sentMsg">⇉ Latest msg to Node-RED:</syntax-highlight> -->
- *     <!-- Shows the last incoming control msg from Node-RED -->
- *     <!-- <syntax-highlight auto="ctrl">⇐ Latest control msg from Node-RED:</syntax-highlight> -->
- *     <!-- Shows the last outgoing control msg to Node-RED -->
- *     <!-- <syntax-highlight auto="sentCtrlMsg">⇒ Latest control msg to Node-RED:</syntax-highlight> -->
- *   @example JavaScript
- *     import('./syntax-highlight')
- * Or use as
- * @example HTML:
- *   <syntax-highlight>Latest msg from Node-RED:</syntax-highlight>
- * @example JavaScript:
- *   const {dumpObject} = await import('./components/syntax-highlight.js')
- *   dumpObject(msg)
- * @example Alternative JavaScript:
- *   await import('./components/syntax-highlight.js')
- *   document.getElementsByTagName('syntax-highlight')[0].json = msg
- * @example Other update methods
- *   const showMsg = document.getElementsByTagName('syntax-highlight')[0]
- *   showMsg.dispatchEvent(new CustomEvent('new-msg', { bubbles: false, detail: msg }))
- *   showMsg.evt('new-msg', msg)
- * 
- */
-/*
-  Copyright (c) 2022 Julian Knight (Totally Information)
-
-  Licensed under the Apache License, Version 2.0 (the "License");
-  you may not use this file except in compliance with the License.
-  You may obtain a copy of the License at
-
-  http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing, software
-  distributed under the License is distributed on an "AS IS" BASIS,
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  See the License for the specific language governing permissions and
-  limitations under the License.
-*/
-
-const template = document.createElement('template')
-template.innerHTML = `
-    <style>
-        :host {
-            display: block;
-            color:white;
-            background-color:black;
-            margin-top: 0.5rem;
-            margin-bottom: 0.5rem;
-            padding: 0.5rem;
-        }
-        pre {
-            font-family: Consolas, "ui-monospace", "Lucida Console", monospace;
-            white-space: pre;
-            margin: 0;
-        }
-        .key {color:#ffbf35}
-        .string {color:#5dff39;}
-        .number {color:#70aeff;}
-        .boolean {color:#b993ff;}
-        .null {color:#93ffe4;}
-        .undefined {color:#ff93c9;}
-    </style>
-    <slot></slot>
-    <pre><i>No data</i></pre>
-`
-
-// return formatted HTML version of JSON object
-const returnHighlight = function (json) {
-    json = JSON.stringify(json, undefined, 4)
-    json = json.replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;')
-    json = json.replace(/("(\\u[a-zA-Z0-9]{4}|\\[^u]|[^\\"])*"(\s*:)?|\b(true|false|null)\b|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?)/g, function (match) {
-        var cls = 'number'
-        if ((/^"/).test(match)) {
-            if ((/:$/).test(match)) {
-                cls = 'key'
-            } else {
-                cls = 'string'
-            }
-        } else if ((/true|false/).test(match)) {
-            cls = 'boolean'
-        } else if ((/null/).test(match)) {
-            cls = 'null'
-        }
-        return '<span class="' + cls + '">' + match + '</span>'
-    })
-    const myHtml = document.createElement('pre')
-    myHtml.innerHTML = json
-    return myHtml
-} // --- End of syntaxHighlight --- //
-
-export default class SyntaxHighlight extends HTMLElement {
-
-    constructor() {
-        super()
-        this.attachShadow({ mode: 'open', delegatesFocus: true })
-            .append(template.content.cloneNode(true))
-
-        this.addEventListener('new-msg', evt => {
-            this.json = evt.detail
-        })
-
-        // Get a reference to the uibuilder FE client library if possible
-        try {
-            this.uibuilder = window.uibuilder
-        } catch (e) {
-            this.uibuilder = undefined
-        }
-    }
-
-    set json(value) {
-        //console.log(value, syntaxHighlight(value))
-        this.shadowRoot.removeChild(this.shadowRoot.lastElementChild)
-        this.shadowRoot.appendChild(returnHighlight(value))
-    }
-
-    evt(evtName, evtData) {
-        this.dispatchEvent(new CustomEvent(evtName, { bubbles: false, detail: evtData }))
-    }
-
-    static get observedAttributes() { return [
-        'auto', 
-    ]}
-
-    attributeChangedCallback(name, oldVal, newVal) {
-        if ( oldVal === newVal ) return
-
-        // auto attrib allows msgs to/from Node-RED to be shown as long as window.uibuilder is available
-        if ( name === 'auto' && this.uibuilder ) {
-            switch (newVal) {
-                case 'message':
-                case 'msg': {
-                    this.uibuilder.onChange('msg', (msg)=> {
-                        this.json = msg
-                    })
-                    break
-                }
-
-                case 'ctrl':
-                case 'control':
-                case 'ctrlMsg': {
-                    this.uibuilder.onChange('ctrlMsg', (msg)=> {
-                        this.json = msg
-                    })
-                    break
-                }
-
-                case 'sent':
-                case 'sentmsg':
-                case 'sentMsg': {
-                    this.uibuilder.onChange('sentMsg', (msg)=> {
-                        this.json = msg
-                    })
-                    break
-                }
-
-                case 'sentctrlmsg':
-                case 'sentCtrlMsg': {
-                    this.uibuilder.onChange('sentCtrlMsg', (msg)=> {
-                        this.json = msg
-                    })
-                    break
-                }
-
-                default: {
-                    break
-                }
-            } // -- end of switch --
-        } // -- end of if name=auto --
-        
-    } // --- end of attributeChangedCallback --- //
-
-} // ---- End of SyntaxHighlight class definition ---- //
-
-// Add the class as a new Custom Element to the window object
-customElements.define('syntax-highlight', SyntaxHighlight)
-
-// document.addEventListener('new-msg', evt => {
-//     console.log('GOT A MSG', evt)
-// })
-
-/** Quick and dirty method to dump a JavaScript object to the ui
- * Will put the output to the first <syntax-highlight> tag on the page
- * @param {*} obj Object to dump
- * @param {number} [ref] Optional, default=0. Which tag to use? If >1 <syntax-highlight> tag is on the page.
- */
-export const dumpObject = function showJson(obj, ref = 0) {
-    try {
-        const showMsg = document.getElementsByTagName('syntax-highlight')[ref]
-        showMsg.json = obj
-    } catch (e) {
-        console.error('[syntax-highlight:dumpObject] Cannot show object - is there a <syntax-highlight> tag?')
-    }
-}
-
-// Consider using a std to expose default functionality for a component
-export const syntaxHighlight = dumpObject
-
-
- - - - -
- - - -
- -
- Documentation generated by JSDoc 4.0.3 on Tue Sep 24 2024 19:36:38 GMT+0100 (British Summer Time) -
- - - - - diff --git a/docs/jsdoc/alpha_uib-theme-changer.js.html b/docs/jsdoc/alpha_uib-theme-changer.js.html index bab25e7..34041e7 100644 --- a/docs/jsdoc/alpha_uib-theme-changer.js.html +++ b/docs/jsdoc/alpha_uib-theme-changer.js.html @@ -658,13 +658,13 @@

Source: alpha/uib-theme-changer.js


- Documentation generated by JSDoc 4.0.3 on Tue Sep 24 2024 19:36:38 GMT+0100 (British Summer Time) + Documentation generated by JSDoc 4.0.3 on Sun Sep 29 2024 17:56:15 GMT+0100 (British Summer Time)
diff --git a/docs/jsdoc/global.html b/docs/jsdoc/global.html index bfd3045..dea420f 100644 --- a/docs/jsdoc/global.html +++ b/docs/jsdoc/global.html @@ -329,20 +329,8 @@

(constant) - Copyright (c) 2022 Julian Knight (Totally Information) -https://it.knightnet.org.uk, https://github.com/TotallyInformation - -Licensed under the Apache License, Version 2.0 (the 'License'); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - -http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an 'AS IS' BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. + Refs: +- https://discourse.nodered.org/t/size-of-custom-mdi-switch-icon/91280/9 @@ -380,7 +368,7 @@

(constant) Source:
@@ -704,20 +692,8 @@

(constant) - Copyright (c) 2022 Julian Knight (Totally Information) -https://it.knightnet.org.uk, https://github.com/TotallyInformation - -Licensed under the Apache License, Version 2.0 (the 'License'); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - -http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an 'AS IS' BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. + Refs: +- https://discourse.nodered.org/t/size-of-custom-mdi-switch-icon/91280/9 @@ -755,7 +731,7 @@

(constant) Source:
@@ -848,132 +824,6 @@

(constant) (constant) dumpObject

- - - - -
- Quick and dirty method to dump a JavaScript object to the ui -Will put the output to the first tag on the page -
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - -

(constant) dumpObject

- - - - -
- Quick and dirty method to dump a JavaScript object to the ui -Will put the output to the first tag on the page -
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - -

maxEntries

@@ -1558,7 +1408,7 @@

(constant) te
Source:
@@ -1582,11 +1432,7 @@

(constant) te
- TODO -- Add part transparent color backgrounds for at least warn and err -- std parts -- allow to be separate from console (via an attribute) for custom visual logging -- Max entry limit + Only use a template if you want to isolate the code and CSS
@@ -1624,7 +1470,7 @@

(constant) te
Source:
@@ -1686,7 +1532,131 @@

(constant) te
Source:
+ + + + + + + + + + + + + + + + +

(constant) template

+ + + + +
+ Only use a template if you want to isolate the code and CSS +
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

(constant) template

+ + + + +
+ Only use a template if you want to isolate the code and CSS +
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
@@ -1710,8 +1680,7 @@

(constant) te
- Zero dependency web component to load HTML/JSON dynamically -See https://github.com/justinfagnani/html-include-element for inspiration + Only use a template if you want to isolate the code and CSS
@@ -1749,7 +1718,7 @@

(constant) te
Source:
@@ -1960,7 +1929,7 @@

(constant) te
Source:
@@ -1984,11 +1953,7 @@

(constant) te
- TODO -- Add part transparent color backgrounds for at least warn and err -- std parts -- allow to be separate from console (via an attribute) for custom visual logging -- Max entry limit + Only use a template if you want to isolate the code and CSS
@@ -2026,7 +1991,7 @@

(constant) te
Source:
@@ -2088,7 +2053,7 @@

(constant) te
Source:
@@ -2112,8 +2077,7 @@

(constant) te
- Zero dependency web component to load HTML/JSON dynamically -See https://github.com/justinfagnani/html-include-element for inspiration + Only use a template if you want to isolate the code and CSS
@@ -2151,7 +2115,131 @@

(constant) te
Source:
+ + + + + + + +

+ + + + + + + + +

(constant) template

+ + + + +
+ Only use a template if you want to isolate the code and CSS +
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

(constant) template

+ + + + +
+ Only use a template if you want to isolate the code and CSS +
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
@@ -2618,7 +2706,7 @@

Source:
@@ -2643,7 +2731,7 @@

Self register the class to global -Enables new data lists to be dynamically added via JS +Enables new widgets to be dynamically added via JS and lets the static methods be called
@@ -2682,7 +2770,7 @@

Source:
@@ -2707,7 +2795,7 @@

Self register the class to global -Enables new widgets to be dynamically added via JS +Enables new data lists to be dynamically added via JS and lets the static methods be called
@@ -2746,7 +2834,7 @@

Source:
@@ -2810,7 +2898,7 @@

Source:
@@ -2874,7 +2962,7 @@

Source:
@@ -2938,7 +3026,7 @@

Source:
@@ -3002,7 +3090,7 @@

Source:
@@ -3066,7 +3154,7 @@

Source:
@@ -3258,7 +3346,7 @@

Source:
@@ -3450,7 +3538,7 @@

Source:
@@ -3475,7 +3563,7 @@

Self register the class to global -Enables new data lists to be dynamically added via JS +Enables new widgets to be dynamically added via JS and lets the static methods be called
@@ -3514,7 +3602,7 @@

Source:
@@ -3539,7 +3627,7 @@

Self register the class to global -Enables new widgets to be dynamically added via JS +Enables new data lists to be dynamically added via JS and lets the static methods be called
@@ -3578,7 +3666,7 @@

Source:
@@ -3642,7 +3730,7 @@

Source:
@@ -3706,7 +3794,7 @@

Source:
@@ -3770,7 +3858,7 @@

Source:
@@ -3834,7 +3922,7 @@

Source:
@@ -3898,7 +3986,7 @@

Source:
@@ -4090,7 +4178,7 @@

Source:
@@ -7292,7 +7380,7 @@

Parameters:
Source:
@@ -8662,7 +8750,7 @@
Parameters:
Source:
@@ -10606,13 +10694,13 @@

uibSend
- Documentation generated by JSDoc 4.0.3 on Tue Sep 24 2024 19:36:38 GMT+0100 (British Summer Time) + Documentation generated by JSDoc 4.0.3 on Sun Sep 29 2024 17:56:15 GMT+0100 (British Summer Time)
diff --git a/docs/jsdoc/index.html b/docs/jsdoc/index.html index bb0837b..c1953b5 100644 --- a/docs/jsdoc/index.html +++ b/docs/jsdoc/index.html @@ -49,6 +49,10 @@

Additional documentation is available in the docs folder which is also exposed as a website at https://totallyinformation.github.io/web-components/.

Useage

Install locally using npm or access via jsdelivr.

+

See the component documentation for specific usage information for each component.

+
+Useage details +

File locations

Files for live use are in the dist folder. The alpha quality components are in the dist/alpha folder.

Each component has 4 files but you only need 1 of them.

If using traditional JavaScript or just HTML, use the *.iife.min.js files in deferred links in your <head>.

@@ -57,13 +61,48 @@

Useage

If using ES Modules, import the *.esm.min.js files in your module code.

import 'https://cdn.jsdelivr.net/gh/totallyinformation/web-components/dist/visible-console.esm.min.js'
 
-
-

[!TIP] -If using with UIBUILDER for Node-RED, load after the uibuilder client library so that the component registers that uibuilder is in use and becomes responsive to it.

-

Each component self-registers its custom HTML tag. They also globally self-register their class name so that you can access static variables and functions if needed. The tag name and global name are both listed in the tables below.

When using your browser's developer tools, the matching .map file will be loaded. This ensures that reported line numbers and full variable/function names are reported.

The source for the components is in the src folder for the main components and in the alpha folder for the alpha quality components.

+

Useage with UIBUILDER for Node-RED

+
    +
  • You can install the components library using UIBUILDER's library manager.
  • +
  • In your front-end HTML, load the components after the uibuilder client library so that the components register that uibuilder is in use and becomes responsive to it.
  • +
+

If using with Node-RED, you can install the components with the help of node-red-contrib-uibuilder. The uibuilder node has a library manager feature and you should use that to install the repository direct from GitHub (requires uibuilder v5+). In that case, uibuilder adds the repository to its web server and you can access them as: ../uibuilder/vendor/@totallyinformation/web-components/dist/button-send.js. See below for details.

+

Local installation

+

If you wish to install locally, you can npm install from the GitHub repository with npm install totallyinformation/web-components. If these ever get published to npm, you would install with npm install @totallyinformation/web-components. However, note that, at this point, I am not intending to publish them quickly as they are still evolving quite rapidly.

+

If installing locally, you will need to make the installed web-components/components/ folder available to your web server as a static resource folder.

+

Loading components into your web page

+

The individual component documentation contains details on how to load the component files. In general, however, there are two choices on how to load them.

+

Load as an ECMA module

+

This is the preferred method. However, it is generally best to load via a script module. While you can load them via your HTML as a script link, you loose some capability this way.

+
<script type="module" async>
+   import '../uibuilder/vendor/@totallyinformation/web-components/components/simple-container.js'
+</script>
+
+

Load from HTML with a script tag

+

They must be loaded as a type "module".

+
<script type="module" async src="https://cdn.jsdelivr.net/gh/totallyinformation/web-components@master/components/button-send.js"></script>
+
+

Or from the local resource of course. Note that this is not recommended. It is better to load them from a script module and then you can use an import statement.

+

Load from a standard script

+

Alternatively, you can load them in your main JavaScript script using dynamic imports as:

+
<script defer async>
+   import('https://cdn.jsdelivr.net/gh/totallyinformation/web-components@master/components/button-send.js')
+</script>
+
+

The disadvantage of this method is that the import function is asynchronous and so your own code may try to execute before the module has loaded. Generally, this won't matter if you aren't assigning the import to a variable. If you are, you may need to use top-level async or the promise-style then/catch.

+

The potential advantage of this approach is that you can access exported variables and methods from the component if any are available (see the syntax-highlight component for an example).

+

Visual Studio Code (VSCode) Intelligence

+

VSCode supposts the use of HTML and CSS Custom Data JSON files that describe custom web components and CSS in a way that gives some intelligence to the editor when writing HTML and CSS code.

+

This collection of web components uses Web Component Analyzer to help document the components. It is also used to create an html custom data file that can be added to VSCode or to a specific workspace or folder settings to provide additional Intellisense help for the components.

+

To do so, find the html custom data setting in VSCode settings and add:

+
/path/to/totallyinformation/web-components/vscode-descriptors/ti-web-components.html-data.json
+
+
+

Demos

+

All of the components have demo web pages in tests. There is a built-in Node.js mini web server. Running the npm script tests will start the server on port 8080. Opening http://127.0.0.1:8080 or http://127.0.0.1:8080/list.html will give a list of all available demos.

Components

These components can be considered beta quality or better. They may not be complete but they should have basic usefulness.

@@ -75,6 +114,14 @@

Components

+ + + + + + + + @@ -96,10 +143,6 @@

Alpha Components

- - - - @@ -246,106 +289,6 @@

Other supporting files and folders

libs/uib-brand.css - a copy of the alternate (new) stylesheet from uibuilder that these components can use.

-

Requirements

-

These are the requirements for any web component to be included in this repository.

-
    -
  • -

    MUST be standalone with no external requirements. Common internal library modules may be permitted however.

    -
  • -
  • -

    MUST be useable in the majority of modern browsers, anything supporting ES2019+ should be usable. IE will not be supported.

    -
  • -
  • -

    MUST use ES6+. Maxumum JavaScript version should be 2 years behind the leading edge and only features supported by the majority of mainstream browsers are allowed. Other features MAY be permitted as long as they are optional and do not produce errors.

    -
  • -
  • -

    MUST be linted using ESLINT. SHOULD use JavaScript Standard format (with some variations documented in the .eslintrc.js file).

    -
  • -
  • -

    MUST self-register the custom tag using customElements.define.

    -
  • -
  • -

    MUST use a Class name using a CamelCase version of the component name with an initial upper-case letter (e.g. syntax-highlight will be export default class SyntaxHighlight extends HTMLElement { ... } ).

    -
  • -
  • -

    MUST be documented in the docs folder.{}

    -
  • -
  • -

    SHOULD have a <slot> to allow nested rich content (where it makes sense).

    -
  • -
  • -

    SHOULD export a camelCase version of the component-name which contains any useful methods and data. (e.g. syntax-highlight should export syntaxHighlight).

    -
  • -
  • -

    SHOULD meet the Web Components Gold Standard.

    -
  • -
  • -

    SHOULD define any shadow template content and required component name as static variables in the class.

    -
  • -
  • -

    Best practices

    -
  • -
-

HTML Standards limitations

-
    -
  • Custom HTML tags MUST use pascal-case with at least 1 -.
  • -
  • Custom HTML tags MUST use lower-case attribute names.
  • -
-

Installation and loading

-

You can use these components directly from the jsdelivr CDN by referencing like: https://cdn.jsdelivr.net/gh/totallyinformation/web-components@master/components/button-send.js. So no install is required if you are happy to load from the Internet.

-

Local installation

-

If you wish to install locally, you can npm install from the GitHub repository with npm install totallyinformation/web-components. If these ever get published to npm, you would install with npm install @totallyinformation/web-components. However, note that, at this point, I am not intending to publish them quickly as they are still evolving quite rapidly.

-

If installing locally, you will need to make the installed web-components/components/ folder available to your web server as a static resource folder.

-

Using with Node-RED and uibuilder

-

If using with Node-RED, you can install the components with the help of node-red-contrib-uibuilder. The uibuilder node has a library manager feature and you should use that to install the repository direct from GitHub (requires uibuilder v5+). In that case, uibuilder adds the repository to its web server and you can access them as: ../uibuilder/vendor/@totallyinformation/web-components/components/button-send.js. See below for details.

-

Loading components into your web page

-

The individual component documentation contains details on how to load the component files. In general, however, there are two choices on how to load them.

-

Load as an ECMA module

-

This is the preferred method. However, it is generally best to load via a script module. While you can load them via your HTML as a script link, you loose some capability this way.

-
<script type="module" async>
-   import '../uibuilder/vendor/@totallyinformation/web-components/components/simple-container.js'
-</script>
-
-

Load from HTML with a script tag

-

They must be loaded as a type "module".

-
<script type="module" async src="https://cdn.jsdelivr.net/gh/totallyinformation/web-components@master/components/button-send.js"></script>
-
-

Or from the local resource of course. Note that this is not recommended. It is better to load them from a script module and then you can use an import statement.

-

Load from a standard script

-

Alternatively, you can load them in your main JavaScript script using dynamic imports as:

-
<script defer async>
-   import('https://cdn.jsdelivr.net/gh/totallyinformation/web-components@master/components/button-send.js')
-</script>
-
-

The disadvantage of this method is that the import function is asynchronous and so your own code may try to execute before the module has loaded. Generally, this won't matter if you aren't assigning the import to a variable. If you are, you may need to use top-level async or the promise-style then/catch.

-

The potential advantage of this approach is that you can access exported variables and methods from the component if any are available (see the syntax-highlight component for an example).

-

Stand-alone use

-

Installation and loading

-

See the general information above.

-

Using the components

-

See the component documentation for specific usage information for each component.

-

Use with Node-RED and node-red-contrib-uibuilder

-

Installation and loading

-

You can, of course, use the components direct from a CDN as shown above.

-

Otherwise, install this repository using the library manager in a uibuilder node in Node-RED.

-uibuilder library manager -

Which results in something like:

-uibuilder installed library -

Noting that this library does not actually have a default script so the listed on is spurious.

-

You can then access the components by loading them into your html or JavaScript as shown above.

-

Using the components

-

The components can, of course, be used in the same way as if not using uibuilder. However, there are additional capabilities aimed at making their use in conjunction with Node-RED and uibuilder even easier. Specifically reducing the amount of code required to use them.

-

Components will automatically recognise when uibuilder is being used. They will each:

-
    -
  • Have a specific msg schema - when a msg with the matching schema is sent from Node-RED via uibuilder, a singular instance of the component on a page will be automatically updated. Where multiple instances are present, the msg must include an html id so that the msg will target that instance.
  • -
-

See the component documentation for specific usage information for each component.

-

Visual Studio Code (VSCode) Intelligence

-

VSCode supposts the use of HTML and CSS Custom Data JSON files that describe custom web components and CSS in a way that gives some intelligence to the editor when writing HTML and CSS code.

-

This collection of web components uses Web Component Analyzer to help document the components. It is also used to create an html custom data file that can be added to VSCode or to a specific workspace or folder settings to provide additional Intellisense help for the components.

-

To do so, find the html custom data setting in VSCode settings and add:

-
/path/to/totallyinformation/web-components/vscode-descriptors/ti-web-components.html-data.json
-

Discussions and suggestions

The best place to ask questions, or suggest improvements about these components is the GitHub discussion board for this repository.

Contributing

@@ -369,13 +312,13 @@

Developers/Contributors


- Documentation generated by JSDoc 4.0.3 on Tue Sep 24 2024 19:36:38 GMT+0100 (British Summer Time) + Documentation generated by JSDoc 4.0.3 on Sun Sep 29 2024 17:56:15 GMT+0100 (British Summer Time)
diff --git a/docs/jsdoc/module.exports.html b/docs/jsdoc/module.exports.html index 8197345..50199ba 100644 --- a/docs/jsdoc/module.exports.html +++ b/docs/jsdoc/module.exports.html @@ -867,7 +867,7 @@

$Source:
@@ -1549,7 +1549,7 @@

$Source:
@@ -2169,7 +2169,7 @@

_iCountSource:
@@ -2789,7 +2789,7 @@

_iCountSource:
@@ -3533,7 +3533,7 @@

_uiSource:
@@ -4277,7 +4277,7 @@

_uiSource:
@@ -5309,7 +5309,7 @@

nameSource:
@@ -5929,7 +5929,7 @@

nameSource:
@@ -8040,7 +8040,7 @@

$Source:
@@ -8722,7 +8722,7 @@

$Source:
@@ -9342,7 +9342,7 @@

_iCountSource:
@@ -9962,7 +9962,7 @@

_iCountSource:
@@ -10706,7 +10706,7 @@

_uiSource:
@@ -11450,7 +11450,7 @@

_uiSource:
@@ -12482,7 +12482,7 @@

nameSource:
@@ -13102,7 +13102,7 @@

nameSource:
@@ -14376,6 +14376,10 @@

uibexports()

+
A Zero dependency button web component that sends a msg or a document event when clicked. + Contains relevant data from data-*, topic and payload attributes (or properties), + includes a _meta object showing whether any modifier keys were used, the element id/name
+ @@ -14385,6 +14389,8 @@

exportsConstructor

+

new exports()

@@ -14432,12 +14438,15 @@
Properties:

- + + @@ -14487,7 +14496,7 @@
Properties:
Source:
@@ -14504,14 +14513,9 @@
Properties:
Fires:
    -
  • container-br:construction - Document object event. evt.event:details contains the data
  • - -
  • container-br:connected - When an instance of the component is attached to the DOM. `evt.event:details` contains the details of the element.
  • - -
  • container-br:disconnected - When an instance of the component is removed from the DOM. `evt.event:details` contains the details of the element.
  • +
  • button-send:click - Document object event. evt.event:details contains the data
  • -
  • container-br:attribChanged - When a watched attribute changes. `evt.details` contains the details of the change. -NOTE that listeners can be attached either to the `document` or to the specific element instance.event:
  • +
  • {function} uibuilder.send - Sends a msg back to Node-RED if uibuilder available. topic,event: payload and _meta props may all be set.
@@ -15213,7 +15217,7 @@

$Source:
@@ -15895,7 +15899,7 @@

$Source:
@@ -16515,7 +16519,7 @@

_iCountSource:
@@ -17135,7 +17139,7 @@

_iCountSource:
@@ -17879,7 +17883,7 @@

_uiSource:
@@ -18623,7 +18627,7 @@

_uiSource:
@@ -19655,7 +19659,7 @@

nameSource:
@@ -20275,7 +20279,7 @@

nameSource:
@@ -21549,10 +21553,6 @@

uibexports()

-
A Zero dependency button web component that sends a msg or a document event when clicked. - Contains relevant data from data-*, topic and payload attributes (or properties), - includes a _meta object showing whether any modifier keys were used, the element id/name
- @@ -21562,8 +21562,6 @@

exportsConstructor

-

new exports()

@@ -21611,15 +21609,12 @@
Properties:

- + + @@ -21669,7 +21664,7 @@
Properties:
Source:
@@ -21686,9 +21681,14 @@
Properties:
Fires:
    -
  • button-send:click - Document object event. evt.event:details contains the data
  • +
  • gauge-steel:construction - Document object event. evt.event:details contains the data
  • -
  • {function} uibuilder.send - Sends a msg back to Node-RED if uibuilder available. topic,event: payload and _meta props may all be set.
  • +
  • gauge-steel:connected - When an instance of the component is attached to the DOM. `evt.event:details` contains the details of the element.
  • + +
  • gauge-steel:disconnected - When an instance of the component is removed from the DOM. `evt.event:details` contains the details of the element.
  • + +
  • gauge-steel:attribChanged - When a watched attribute changes. `evt.details` contains the details of the change. +NOTE that listeners can be attached either to the `document` or to the specific element instance.event:
@@ -22390,7 +22390,7 @@

$Source:
@@ -23072,7 +23072,7 @@

$Source:
@@ -23692,7 +23692,7 @@

_iCountSource:
@@ -24312,7 +24312,7 @@

_iCountSource:
@@ -25056,7 +25056,7 @@

_uiSource:
@@ -25800,7 +25800,7 @@

_uiSource:
@@ -26832,7 +26832,7 @@

nameSource:
@@ -27452,7 +27452,7 @@

nameSource:
@@ -28726,6 +28726,10 @@

uibexports()

+
A Zero dependency button web component that will display a circular thermometer display and controller for heating systems. + Contains relevant data from data-*, topic and payload attributes (or properties), + includes a _meta object showing whether any modifier keys were used, the element id/name
+ @@ -28735,6 +28739,8 @@

exportsConstructor

+

new exports()

@@ -28782,12 +28788,15 @@
Properties:

- + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -28837,7 +28892,7 @@
Properties:
Source:
@@ -28854,14 +28909,9 @@
Properties:
Fires:
    -
  • gauge-steel:construction - Document object event. evt.event:details contains the data
  • - -
  • gauge-steel:connected - When an instance of the component is attached to the DOM. `evt.event:details` contains the details of the element.
  • - -
  • gauge-steel:disconnected - When an instance of the component is removed from the DOM. `evt.event:details` contains the details of the element.
  • +
  • button-send:click - Document object event. evt.event:details contains the data
  • -
  • gauge-steel:attribChanged - When a watched attribute changes. `evt.details` contains the details of the change. -NOTE that listeners can be attached either to the `document` or to the specific element instance.event:
  • +
  • {function} uibuilder.send - Sends a msg back to Node-RED if uibuilder available. topic,event: payload and _meta props may all be set.
@@ -29563,7 +29613,7 @@

$Source:
@@ -30245,7 +30295,7 @@

$Source:
@@ -30865,7 +30915,7 @@

_iCountSource:
@@ -31485,7 +31535,7 @@

_iCountSource:
@@ -32229,7 +32279,7 @@

_uiSource:
@@ -32973,7 +33023,7 @@

_uiSource:
@@ -34005,7 +34055,7 @@

nameSource:
@@ -34625,7 +34675,7 @@

nameSource:
@@ -35899,10 +35949,6 @@

uibexports()

-
A Zero dependency button web component that will display a circular thermometer display and controller for heating systems. - Contains relevant data from data-*, topic and payload attributes (or properties), - includes a _meta object showing whether any modifier keys were used, the element id/name
- @@ -35912,8 +35958,6 @@

exportsConstructor

-

new exports()

@@ -35961,33 +36005,7 @@
Properties:

- - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - + @@ -36065,7 +36060,7 @@
Properties:
Source:
@@ -36082,9 +36077,14 @@
Properties:
Fires:
    -
  • button-send:click - Document object event. evt.event:details contains the data
  • +
  • labelled-value:construction - Document object event. evt.event:details contains the data
  • -
  • {function} uibuilder.send - Sends a msg back to Node-RED if uibuilder available. topic,event: payload and _meta props may all be set.
  • +
  • labelled-value:connected - When an instance of the component is attached to the DOM. `evt.event:details` contains the details of the element.
  • + +
  • labelled-value:disconnected - When an instance of the component is removed from the DOM. `evt.event:details` contains the details of the element.
  • + +
  • labelled-value:attribChanged - When a watched attribute changes. `evt.details` contains the details of the change. +NOTE that listeners can be attached either to the `document` or to the specific element instance.event:
@@ -36786,7 +36786,7 @@

$Source:
@@ -37468,7 +37468,7 @@

$Source:
@@ -38088,7 +38088,7 @@

_iCountSource:
@@ -38708,7 +38708,7 @@

_iCountSource:
@@ -39452,7 +39452,7 @@

_uiSource:
@@ -40196,7 +40196,7 @@

_uiSource:
@@ -41228,7 +41228,7 @@

nameSource:
@@ -41848,7 +41848,7 @@

nameSource:
@@ -43233,7 +43233,7 @@
Properties:
Source:
@@ -43250,13 +43250,13 @@
Properties:
Fires:
    -
  • labelled-value:construction - Document object event. evt.event:details contains the data
  • +
  • nav-bar:construction - Document object event. evt.event:details contains the data
  • -
  • labelled-value:connected - When an instance of the component is attached to the DOM. `evt.event:details` contains the details of the element.
  • +
  • nav-bar:connected - When an instance of the component is attached to the DOM. `evt.event:details` contains the details of the element.
  • -
  • labelled-value:disconnected - When an instance of the component is removed from the DOM. `evt.event:details` contains the details of the element.
  • +
  • nav-bar:disconnected - When an instance of the component is removed from the DOM. `evt.event:details` contains the details of the element.
  • -
  • labelled-value:attribChanged - When a watched attribute changes. `evt.details` contains the details of the change. +
  • nav-bar:attribChanged - When a watched attribute changes. `evt.details` contains the details of the change. NOTE that listeners can be attached either to the `document` or to the specific element instance.event:
@@ -43959,7 +43959,7 @@

$Source:
@@ -44641,7 +44641,7 @@

$Source:
@@ -45261,7 +45261,7 @@

_iCountSource:
@@ -45881,7 +45881,7 @@

_iCountSource:
@@ -46625,7 +46625,7 @@

_uiSource:
@@ -47369,7 +47369,7 @@

_uiSource:
@@ -48401,7 +48401,7 @@

nameSource:
@@ -49021,7 +49021,7 @@

nameSource:
@@ -50406,7 +50406,7 @@
Properties:
Source:
@@ -50423,13 +50423,13 @@
Properties:
Fires:
    -
  • nav-bar:construction - Document object event. evt.event:details contains the data
  • +
  • chart-apex:construction - Document object event. evt.event:details contains the data
  • -
  • nav-bar:connected - When an instance of the component is attached to the DOM. `evt.event:details` contains the details of the element.
  • +
  • chart-apex:connected - When an instance of the component is attached to the DOM. `evt.event:details` contains the details of the element.
  • -
  • nav-bar:disconnected - When an instance of the component is removed from the DOM. `evt.event:details` contains the details of the element.
  • +
  • chart-apex:disconnected - When an instance of the component is removed from the DOM. `evt.event:details` contains the details of the element.
  • -
  • nav-bar:attribChanged - When a watched attribute changes. `evt.details` contains the details of the change. +
  • chart-apex:attribChanged - When a watched attribute changes. `evt.details` contains the details of the change. NOTE that listeners can be attached either to the `document` or to the specific element instance.event:
@@ -51132,7 +51132,7 @@

$Source:
@@ -51814,7 +51814,7 @@

$Source:
@@ -52434,7 +52434,7 @@

_iCountSource:
@@ -53054,7 +53054,7 @@

_iCountSource:
@@ -53798,7 +53798,7 @@

_uiSource:
@@ -54542,7 +54542,7 @@

_uiSource:
@@ -55574,7 +55574,7 @@

nameSource:
@@ -56194,7 +56194,7 @@

nameSource:
@@ -57579,7 +57579,7 @@
Properties:
Source:
@@ -57596,13 +57596,13 @@
Properties:
Fires:
    -
  • chart-apex:construction - Document object event. evt.event:details contains the data
  • +
  • chart-js:construction - Document object event. evt.event:details contains the data
  • -
  • chart-apex:connected - When an instance of the component is attached to the DOM. `evt.event:details` contains the details of the element.
  • +
  • chart-js:connected - When an instance of the component is attached to the DOM. `evt.event:details` contains the details of the element.
  • -
  • chart-apex:disconnected - When an instance of the component is removed from the DOM. `evt.event:details` contains the details of the element.
  • +
  • chart-js:disconnected - When an instance of the component is removed from the DOM. `evt.event:details` contains the details of the element.
  • -
  • chart-apex:attribChanged - When a watched attribute changes. `evt.details` contains the details of the change. +
  • chart-js:attribChanged - When a watched attribute changes. `evt.details` contains the details of the change. NOTE that listeners can be attached either to the `document` or to the specific element instance.event:
@@ -58305,7 +58305,7 @@

$Source:
@@ -58987,7 +58987,7 @@

$Source:
@@ -59607,7 +59607,7 @@

_iCountSource:
@@ -60227,7 +60227,7 @@

_iCountSource:
@@ -60971,7 +60971,7 @@

_uiSource:
@@ -61715,7 +61715,7 @@

_uiSource:
@@ -62747,7 +62747,7 @@

nameSource:
@@ -63367,7 +63367,7 @@

nameSource:
@@ -64752,7 +64752,7 @@
Properties:
Source:
@@ -64769,13 +64769,13 @@
Properties:
Fires:
    -
  • chart-js:construction - Document object event. evt.event:details contains the data
  • +
  • chart-plotly:construction - Document object event. evt.event:details contains the data
  • -
  • chart-js:connected - When an instance of the component is attached to the DOM. `evt.event:details` contains the details of the element.
  • +
  • chart-plotly:connected - When an instance of the component is attached to the DOM. `evt.event:details` contains the details of the element.
  • -
  • chart-js:disconnected - When an instance of the component is removed from the DOM. `evt.event:details` contains the details of the element.
  • +
  • chart-plotly:disconnected - When an instance of the component is removed from the DOM. `evt.event:details` contains the details of the element.
  • -
  • chart-js:attribChanged - When a watched attribute changes. `evt.details` contains the details of the change. +
  • chart-plotly:attribChanged - When a watched attribute changes. `evt.details` contains the details of the change. NOTE that listeners can be attached either to the `document` or to the specific element instance.event:
@@ -65478,7 +65478,7 @@

$Source:
@@ -66160,7 +66160,7 @@

$Source:
@@ -66780,7 +66780,7 @@

_iCountSource:
@@ -67400,7 +67400,7 @@

_iCountSource:
@@ -68144,7 +68144,7 @@

_uiSource:
@@ -68888,7 +68888,7 @@

_uiSource:
@@ -69920,7 +69920,7 @@

nameSource:
@@ -70540,7 +70540,7 @@

nameSource:
@@ -71925,7 +71925,7 @@
Properties:
Source:
@@ -71942,13 +71942,13 @@
Properties:
Fires:
    -
  • chart-plotly:construction - Document object event. evt.event:details contains the data
  • +
  • container-br:construction - Document object event. evt.event:details contains the data
  • -
  • chart-plotly:connected - When an instance of the component is attached to the DOM. `evt.event:details` contains the details of the element.
  • +
  • container-br:connected - When an instance of the component is attached to the DOM. `evt.event:details` contains the details of the element.
  • -
  • chart-plotly:disconnected - When an instance of the component is removed from the DOM. `evt.event:details` contains the details of the element.
  • +
  • container-br:disconnected - When an instance of the component is removed from the DOM. `evt.event:details` contains the details of the element.
  • -
  • chart-plotly:attribChanged - When a watched attribute changes. `evt.details` contains the details of the change. +
  • container-br:attribChanged - When a watched attribute changes. `evt.details` contains the details of the change. NOTE that listeners can be attached either to the `document` or to the specific element instance.event:
@@ -72651,7 +72651,7 @@

$Source:
@@ -73333,7 +73333,7 @@

$Source:
@@ -73953,7 +73953,7 @@

_iCountSource:
@@ -74573,7 +74573,7 @@

_iCountSource:
@@ -75317,7 +75317,7 @@

_uiSource:
@@ -76061,7 +76061,7 @@

_uiSource:
@@ -77093,7 +77093,7 @@

nameSource:
@@ -77713,7 +77713,7 @@

nameSource:
@@ -79824,7 +79824,7 @@

$Source:
@@ -80506,7 +80506,7 @@

$Source:
@@ -81126,7 +81126,7 @@

_iCountSource:
@@ -81746,7 +81746,7 @@

_iCountSource:
@@ -82490,7 +82490,7 @@

_uiSource:
@@ -83234,7 +83234,7 @@

_uiSource:
@@ -84266,7 +84266,7 @@

nameSource:
@@ -84886,7 +84886,7 @@

nameSource:
@@ -87079,7 +87079,7 @@

$Source:
@@ -87761,7 +87761,7 @@

$Source:
@@ -88381,7 +88381,7 @@

_iCountSource:
@@ -89001,7 +89001,7 @@

_iCountSource:
@@ -89745,7 +89745,7 @@

_uiSource:
@@ -90489,7 +90489,7 @@

_uiSource:
@@ -91521,7 +91521,7 @@

nameSource:
@@ -92141,7 +92141,7 @@

nameSource:
@@ -94192,7 +94192,7 @@

$Source:
@@ -94874,7 +94874,7 @@

$Source:
@@ -95494,7 +95494,7 @@

_iCountSource:
@@ -96114,7 +96114,7 @@

_iCountSource:
@@ -96858,7 +96858,7 @@

_uiSource:
@@ -97602,7 +97602,7 @@

_uiSource:
@@ -98634,7 +98634,7 @@

nameSource:
@@ -99254,7 +99254,7 @@

nameSource:
@@ -100639,7 +100639,7 @@
Properties:
Source:
@@ -101365,7 +101365,7 @@

$Source:
@@ -102047,7 +102047,7 @@

$Source:
@@ -102667,7 +102667,7 @@

_iCountSource:
@@ -103287,7 +103287,7 @@

_iCountSource:
@@ -104031,7 +104031,7 @@

_uiSource:
@@ -104775,7 +104775,7 @@

_uiSource:
@@ -105807,7 +105807,7 @@

nameSource:
@@ -106427,7 +106427,7 @@

nameSource:
@@ -108538,7 +108538,7 @@

$Source:
@@ -109220,7 +109220,7 @@

$Source:
@@ -109840,7 +109840,7 @@

_iCountSource:
@@ -110460,7 +110460,7 @@

_iCountSource:
@@ -111204,7 +111204,7 @@

_uiSource:
@@ -111948,7 +111948,7 @@

_uiSource:
@@ -112980,7 +112980,7 @@

nameSource:
@@ -113600,7 +113600,7 @@

nameSource:
@@ -115711,7 +115711,7 @@

$Source:
@@ -116393,7 +116393,7 @@

$Source:
@@ -117013,7 +117013,7 @@

_iCountSource:
@@ -117633,7 +117633,7 @@

_iCountSource:
@@ -118377,7 +118377,7 @@

_uiSource:
@@ -119121,7 +119121,7 @@

_uiSource:
@@ -120153,7 +120153,7 @@

nameSource:
@@ -120773,7 +120773,7 @@

nameSource:
@@ -122047,6 +122047,10 @@

uibexports()

+
A Zero dependency button web component that sends a msg or a document event when clicked. + Contains relevant data from data-*, topic and payload attributes (or properties), + includes a _meta object showing whether any modifier keys were used, the element id/name
+ @@ -122056,6 +122060,8 @@

exportsConstructor

+

new exports()

@@ -122103,12 +122109,15 @@
Properties:

- + + @@ -122158,7 +122167,7 @@
Properties:
Source:
@@ -122175,14 +122184,9 @@
Properties:
Fires:
    -
  • container-br:construction - Document object event. evt.event:details contains the data
  • - -
  • container-br:connected - When an instance of the component is attached to the DOM. `evt.event:details` contains the details of the element.
  • - -
  • container-br:disconnected - When an instance of the component is removed from the DOM. `evt.event:details` contains the details of the element.
  • +
  • button-send:click - Document object event. evt.event:details contains the data
  • -
  • container-br:attribChanged - When a watched attribute changes. `evt.details` contains the details of the change. -NOTE that listeners can be attached either to the `document` or to the specific element instance.event:
  • +
  • {function} uibuilder.send - Sends a msg back to Node-RED if uibuilder available. topic,event: payload and _meta props may all be set.
@@ -122884,7 +122888,7 @@

$Source:
@@ -123566,7 +123570,7 @@

$Source:
@@ -124186,7 +124190,7 @@

_iCountSource:
@@ -124806,7 +124810,7 @@

_iCountSource:
@@ -125550,7 +125554,7 @@

_uiSource:
@@ -126294,7 +126298,7 @@

_uiSource:
@@ -127326,7 +127330,7 @@

nameSource:
@@ -127946,7 +127950,7 @@

nameSource:
@@ -129220,10 +129224,6 @@

uibexports()

-
A Zero dependency button web component that sends a msg or a document event when clicked. - Contains relevant data from data-*, topic and payload attributes (or properties), - includes a _meta object showing whether any modifier keys were used, the element id/name
- @@ -129233,8 +129233,6 @@

exportsConstructor

-

new exports()

@@ -129282,15 +129280,12 @@
Properties:

- + + @@ -129340,7 +129335,7 @@
Properties:
Source:
@@ -129357,9 +129352,14 @@
Properties:
Fires:
    -
  • button-send:click - Document object event. evt.event:details contains the data
  • +
  • gauge-steel:construction - Document object event. evt.event:details contains the data
  • -
  • {function} uibuilder.send - Sends a msg back to Node-RED if uibuilder available. topic,event: payload and _meta props may all be set.
  • +
  • gauge-steel:connected - When an instance of the component is attached to the DOM. `evt.event:details` contains the details of the element.
  • + +
  • gauge-steel:disconnected - When an instance of the component is removed from the DOM. `evt.event:details` contains the details of the element.
  • + +
  • gauge-steel:attribChanged - When a watched attribute changes. `evt.details` contains the details of the change. +NOTE that listeners can be attached either to the `document` or to the specific element instance.event:
@@ -130061,7 +130061,7 @@

$Source:
@@ -130743,7 +130743,7 @@

$Source:
@@ -131363,7 +131363,7 @@

_iCountSource:
@@ -131983,7 +131983,7 @@

_iCountSource:
@@ -132727,7 +132727,7 @@

_uiSource:
@@ -133471,7 +133471,7 @@

_uiSource:
@@ -134503,7 +134503,7 @@

nameSource:
@@ -135123,7 +135123,7 @@

nameSource:
@@ -136397,6 +136397,10 @@

uibexports()

+
A Zero dependency button web component that will display a circular thermometer display and controller for heating systems. + Contains relevant data from data-*, topic and payload attributes (or properties), + includes a _meta object showing whether any modifier keys were used, the element id/name
+ @@ -136406,6 +136410,8 @@

exportsConstructor

+

new exports()

@@ -136453,12 +136459,15 @@
Properties:

- + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -136508,7 +136563,7 @@
Properties:
Source:
@@ -136525,14 +136580,9 @@
Properties:
Fires:
    -
  • gauge-steel:construction - Document object event. evt.event:details contains the data
  • - -
  • gauge-steel:connected - When an instance of the component is attached to the DOM. `evt.event:details` contains the details of the element.
  • - -
  • gauge-steel:disconnected - When an instance of the component is removed from the DOM. `evt.event:details` contains the details of the element.
  • +
  • button-send:click - Document object event. evt.event:details contains the data
  • -
  • gauge-steel:attribChanged - When a watched attribute changes. `evt.details` contains the details of the change. -NOTE that listeners can be attached either to the `document` or to the specific element instance.event:
  • +
  • {function} uibuilder.send - Sends a msg back to Node-RED if uibuilder available. topic,event: payload and _meta props may all be set.
@@ -137234,7 +137284,7 @@

$Source:
@@ -137916,7 +137966,7 @@

$Source:
@@ -138536,7 +138586,7 @@

_iCountSource:
@@ -139156,7 +139206,7 @@

_iCountSource:
@@ -139900,7 +139950,7 @@

_uiSource:
@@ -140644,7 +140694,7 @@

_uiSource:
@@ -141676,7 +141726,7 @@

nameSource:
@@ -142296,7 +142346,7 @@

nameSource:
@@ -143570,10 +143620,6 @@

uibexports()

-
A Zero dependency button web component that will display a circular thermometer display and controller for heating systems. - Contains relevant data from data-*, topic and payload attributes (or properties), - includes a _meta object showing whether any modifier keys were used, the element id/name
- @@ -143583,8 +143629,6 @@

exportsConstructor

-

new exports()

@@ -143632,33 +143676,7 @@
Properties:

- - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - + @@ -143736,7 +143731,7 @@
Properties:
Source:
@@ -143753,9 +143748,14 @@
Properties:
Fires:
    -
  • button-send:click - Document object event. evt.event:details contains the data
  • +
  • labelled-value:construction - Document object event. evt.event:details contains the data
  • -
  • {function} uibuilder.send - Sends a msg back to Node-RED if uibuilder available. topic,event: payload and _meta props may all be set.
  • +
  • labelled-value:connected - When an instance of the component is attached to the DOM. `evt.event:details` contains the details of the element.
  • + +
  • labelled-value:disconnected - When an instance of the component is removed from the DOM. `evt.event:details` contains the details of the element.
  • + +
  • labelled-value:attribChanged - When a watched attribute changes. `evt.details` contains the details of the change. +NOTE that listeners can be attached either to the `document` or to the specific element instance.event:
@@ -144457,7 +144457,7 @@

$Source:
@@ -145139,7 +145139,7 @@

$Source:
@@ -145759,7 +145759,7 @@

_iCountSource:
@@ -146379,7 +146379,7 @@

_iCountSource:
@@ -147123,7 +147123,7 @@

_uiSource:
@@ -147867,7 +147867,7 @@

_uiSource:
@@ -148899,7 +148899,7 @@

nameSource:
@@ -149519,7 +149519,7 @@

nameSource:
@@ -150904,7 +150904,7 @@
Properties:
Source:
@@ -150921,13 +150921,13 @@
Properties:
Fires:
    -
  • labelled-value:construction - Document object event. evt.event:details contains the data
  • +
  • nav-bar:construction - Document object event. evt.event:details contains the data
  • -
  • labelled-value:connected - When an instance of the component is attached to the DOM. `evt.event:details` contains the details of the element.
  • +
  • nav-bar:connected - When an instance of the component is attached to the DOM. `evt.event:details` contains the details of the element.
  • -
  • labelled-value:disconnected - When an instance of the component is removed from the DOM. `evt.event:details` contains the details of the element.
  • +
  • nav-bar:disconnected - When an instance of the component is removed from the DOM. `evt.event:details` contains the details of the element.
  • -
  • labelled-value:attribChanged - When a watched attribute changes. `evt.details` contains the details of the change. +
  • nav-bar:attribChanged - When a watched attribute changes. `evt.details` contains the details of the change. NOTE that listeners can be attached either to the `document` or to the specific element instance.event:
@@ -151630,7 +151630,7 @@

$Source:
@@ -152312,7 +152312,7 @@

$Source:
@@ -152932,7 +152932,7 @@

_iCountSource:
@@ -153552,7 +153552,7 @@

_iCountSource:
@@ -154296,7 +154296,7 @@

_uiSource:
@@ -155040,7 +155040,7 @@

_uiSource:
@@ -156072,7 +156072,7 @@

nameSource:
@@ -156692,7 +156692,7 @@

nameSource:
@@ -158077,7 +158077,7 @@
Properties:
Source:
@@ -158094,13 +158094,13 @@
Properties:
Fires:
    -
  • nav-bar:construction - Document object event. evt.event:details contains the data
  • +
  • chart-apex:construction - Document object event. evt.event:details contains the data
  • -
  • nav-bar:connected - When an instance of the component is attached to the DOM. `evt.event:details` contains the details of the element.
  • +
  • chart-apex:connected - When an instance of the component is attached to the DOM. `evt.event:details` contains the details of the element.
  • -
  • nav-bar:disconnected - When an instance of the component is removed from the DOM. `evt.event:details` contains the details of the element.
  • +
  • chart-apex:disconnected - When an instance of the component is removed from the DOM. `evt.event:details` contains the details of the element.
  • -
  • nav-bar:attribChanged - When a watched attribute changes. `evt.details` contains the details of the change. +
  • chart-apex:attribChanged - When a watched attribute changes. `evt.details` contains the details of the change. NOTE that listeners can be attached either to the `document` or to the specific element instance.event:
@@ -158803,7 +158803,7 @@

$Source:
@@ -159485,7 +159485,7 @@

$Source:
@@ -160105,7 +160105,7 @@

_iCountSource:
@@ -160725,7 +160725,7 @@

_iCountSource:
@@ -161469,7 +161469,7 @@

_uiSource:
@@ -162213,7 +162213,7 @@

_uiSource:
@@ -163245,7 +163245,7 @@

nameSource:
@@ -163865,7 +163865,7 @@

nameSource:
@@ -165250,7 +165250,7 @@
Properties:
Source:
@@ -165267,13 +165267,13 @@
Properties:
Fires:
    -
  • chart-apex:construction - Document object event. evt.event:details contains the data
  • +
  • chart-js:construction - Document object event. evt.event:details contains the data
  • -
  • chart-apex:connected - When an instance of the component is attached to the DOM. `evt.event:details` contains the details of the element.
  • +
  • chart-js:connected - When an instance of the component is attached to the DOM. `evt.event:details` contains the details of the element.
  • -
  • chart-apex:disconnected - When an instance of the component is removed from the DOM. `evt.event:details` contains the details of the element.
  • +
  • chart-js:disconnected - When an instance of the component is removed from the DOM. `evt.event:details` contains the details of the element.
  • -
  • chart-apex:attribChanged - When a watched attribute changes. `evt.details` contains the details of the change. +
  • chart-js:attribChanged - When a watched attribute changes. `evt.details` contains the details of the change. NOTE that listeners can be attached either to the `document` or to the specific element instance.event:
@@ -165976,7 +165976,7 @@

$Source:
@@ -166658,7 +166658,7 @@

$Source:
@@ -167278,7 +167278,7 @@

_iCountSource:
@@ -167898,7 +167898,7 @@

_iCountSource:
@@ -168642,7 +168642,7 @@

_uiSource:
@@ -169386,7 +169386,7 @@

_uiSource:
@@ -170418,7 +170418,7 @@

nameSource:
@@ -171038,7 +171038,7 @@

nameSource:
@@ -172423,7 +172423,7 @@
Properties:
Source:
@@ -172440,13 +172440,13 @@
Properties:
Fires:
    -
  • chart-js:construction - Document object event. evt.event:details contains the data
  • +
  • chart-plotly:construction - Document object event. evt.event:details contains the data
  • -
  • chart-js:connected - When an instance of the component is attached to the DOM. `evt.event:details` contains the details of the element.
  • +
  • chart-plotly:connected - When an instance of the component is attached to the DOM. `evt.event:details` contains the details of the element.
  • -
  • chart-js:disconnected - When an instance of the component is removed from the DOM. `evt.event:details` contains the details of the element.
  • +
  • chart-plotly:disconnected - When an instance of the component is removed from the DOM. `evt.event:details` contains the details of the element.
  • -
  • chart-js:attribChanged - When a watched attribute changes. `evt.details` contains the details of the change. +
  • chart-plotly:attribChanged - When a watched attribute changes. `evt.details` contains the details of the change. NOTE that listeners can be attached either to the `document` or to the specific element instance.event:
@@ -173149,7 +173149,7 @@

$Source:
@@ -173831,7 +173831,7 @@

$Source:
@@ -174451,7 +174451,7 @@

_iCountSource:
@@ -175071,7 +175071,7 @@

_iCountSource:
@@ -175815,7 +175815,7 @@

_uiSource:
@@ -176559,7 +176559,7 @@

_uiSource:
@@ -177591,7 +177591,7 @@

nameSource:
@@ -178211,7 +178211,7 @@

nameSource:
@@ -179596,7 +179596,7 @@
Properties:
Source:
@@ -179613,13 +179613,13 @@
Properties:
Fires:
    -
  • chart-plotly:construction - Document object event. evt.event:details contains the data
  • +
  • container-br:construction - Document object event. evt.event:details contains the data
  • -
  • chart-plotly:connected - When an instance of the component is attached to the DOM. `evt.event:details` contains the details of the element.
  • +
  • container-br:connected - When an instance of the component is attached to the DOM. `evt.event:details` contains the details of the element.
  • -
  • chart-plotly:disconnected - When an instance of the component is removed from the DOM. `evt.event:details` contains the details of the element.
  • +
  • container-br:disconnected - When an instance of the component is removed from the DOM. `evt.event:details` contains the details of the element.
  • -
  • chart-plotly:attribChanged - When a watched attribute changes. `evt.details` contains the details of the change. +
  • container-br:attribChanged - When a watched attribute changes. `evt.details` contains the details of the change. NOTE that listeners can be attached either to the `document` or to the specific element instance.event:
@@ -180322,7 +180322,7 @@

$Source:
@@ -181004,7 +181004,7 @@

$Source:
@@ -181624,7 +181624,7 @@

_iCountSource:
@@ -182244,7 +182244,7 @@

_iCountSource:
@@ -182988,7 +182988,7 @@

_uiSource:
@@ -183732,7 +183732,7 @@

_uiSource:
@@ -184764,7 +184764,7 @@

nameSource:
@@ -185384,7 +185384,7 @@

nameSource:
@@ -187495,7 +187495,7 @@

$Source:
@@ -188177,7 +188177,7 @@

$Source:
@@ -188797,7 +188797,7 @@

_iCountSource:
@@ -189417,7 +189417,7 @@

_iCountSource:
@@ -190161,7 +190161,7 @@

_uiSource:
@@ -190905,7 +190905,7 @@

_uiSource:
@@ -191937,7 +191937,7 @@

nameSource:
@@ -192557,7 +192557,7 @@

nameSource:
@@ -194750,7 +194750,7 @@

$Source:
@@ -195432,7 +195432,7 @@

$Source:
@@ -196052,7 +196052,7 @@

_iCountSource:
@@ -196672,7 +196672,7 @@

_iCountSource:
@@ -197416,7 +197416,7 @@

_uiSource:
@@ -198160,7 +198160,7 @@

_uiSource:
@@ -199192,7 +199192,7 @@

nameSource:
@@ -199812,7 +199812,7 @@

nameSource:
@@ -201863,7 +201863,7 @@

$Source:
@@ -202545,7 +202545,7 @@

$Source:
@@ -203165,7 +203165,7 @@

_iCountSource:
@@ -203785,7 +203785,7 @@

_iCountSource:
@@ -204529,7 +204529,7 @@

_uiSource:
@@ -205273,7 +205273,7 @@

_uiSource:
@@ -206305,7 +206305,7 @@

nameSource:
@@ -206925,7 +206925,7 @@

nameSource:
@@ -208310,7 +208310,7 @@
Properties:
Source:
@@ -209036,7 +209036,7 @@

$Source:
@@ -209718,7 +209718,7 @@

$Source:
@@ -210338,7 +210338,7 @@

_iCountSource:
@@ -210958,7 +210958,7 @@

_iCountSource:
@@ -211702,7 +211702,7 @@

_uiSource:
@@ -212446,7 +212446,7 @@

_uiSource:
@@ -213478,7 +213478,7 @@

nameSource:
@@ -214098,7 +214098,7 @@

nameSource:
@@ -215366,13 +215366,13 @@

uibHome

Namespaces

Classes

Global

+

Home

Namespaces

Classes

Global


- Documentation generated by JSDoc 4.0.3 on Tue Sep 24 2024 19:36:38 GMT+0100 (British Summer Time) + Documentation generated by JSDoc 4.0.3 on Sun Sep 29 2024 17:56:15 GMT+0100 (British Summer Time)
diff --git a/docs/jsdoc/src_button-send.js.html b/docs/jsdoc/src_button-send.js.html index c03bfad..3225964 100644 --- a/docs/jsdoc/src_button-send.js.html +++ b/docs/jsdoc/src_button-send.js.html @@ -32,18 +32,27 @@

Source: src/button-send.js

* * See ./docs/button-send.md for detailed documentation on installation and use. * - * TODO: - Add variants (see simple-card) + * Version: See the class code * - * @version: 1.0.2 2022-06-12 + **/ +/** Copyright (c) 2022-2024 Julian Knight (Totally Information) + * https://it.knightnet.org.uk, https://github.com/TotallyInformation * - * See https://github.com/runem/web-component-analyzer#-how-to-document-your-components-using-jsdoc on how to document + * Licensed under the Apache License, Version 2.0 (the 'License'); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * Use `npx web-component-analyzer ./components/button-send.js` to create/update the documentation - * or paste into https://runem.github.io/web-component-analyzer/ - * Use `npx web-component-analyzer ./components/*.js --format vscode --outFile ./vscode-descriptors/ti-web-components.html-data.json` - * to generate/update vscode custom data files. See https://github.com/microsoft/vscode-custom-data/tree/main/samples/webcomponents + * http://www.apache.org/licenses/LICENSE-2.0 * - * To Do: + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + **/ + +/** ToDo: + * - Add variants (see simple-card) * - Allow colour and background colour to be controlled with standard names (e.g. info, warning, error, etc) * - Create a unique identifier to use when id/name not specified. * - Allow std pre-formatted msg from uibuilder to change the attribs/props @@ -52,24 +61,10 @@

Source: src/button-send.js

* target so it can be ignored if desired. * - Also add processing for multi-click (detail property of click), contextMenu, auxclick, dblclick */ -/* - Copyright (c) 2022-2024 Julian Knight (Totally Information) - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ import TiBaseComponent from '../libs/ti-base-component' +/** Only use a template if you want to isolate the code and CSS */ const template = document.createElement('template') template.innerHTML = /*html*/` <style> @@ -136,12 +131,14 @@

Source: src/button-send.js

* @method deepAssign Object deep merger * @method doInheritStyles If requested, add link to an external style sheet * @method ensureId Adds a unique ID to the tag if no ID defined. - * @method _uibMsgHandler If UIBUILDER for Node-RED is active, auto-handle incoming messages targetted at instance id + * @method _uibMsgHandler Not yet in use + * @method _event(name,data) Standardised custom event dispatcher * OTHER METHODS: * None * @fires button-send:connected - When an instance of the component is attached to the DOM. `evt.details` contains the details of the element. + * @fires button-send:ready - Alias for connected. The instance can handle property & attribute changes * @fires button-send:disconnected - When an instance of the component is removed from the DOM. `evt.details` contains the details of the element. * @fires button-send:attribChanged - When a watched attribute changes. `evt.details` contains the details of the change. * @fires button-send:click - Document object event. evt.details contains the data @@ -150,13 +147,11 @@

Source: src/button-send.js

* Standard watched attributes (common across all my components): * @attr {string|boolean} inherit-style - Optional. Load external styles into component (only useful if using template). If present but empty, will default to './index.css'. Optionally give a URL to load. + * @attr {string} name - Optional. HTML name attribute. Included in output _meta prop. * Other watched attributes: * @attr {string} topic - Optional. Topic string to use. Mostly for node-red messages * @attr {string} payload - Optional. Payload string. Mostly for node-red messages. For non-string payload, see props below - * @attr {string} id - Optional. HTML ID, must be unique on page. Included in output _meta prop. - * @attr {string} name - Optional. HTML name attribute. Included in output _meta prop. - * @attr {string} data-* - Optional. All data-* attributes are returned in the _meta prop as a _meta.data object. * Standard props (common across all my components): * @prop {boolean} uib True if UIBUILDER for Node-RED is loaded. In base class @@ -165,7 +160,7 @@

Source: src/button-send.js

* @prop {number} _iCount The component version string (date updated). In base class * @prop {object} opts This components controllable options - get/set using the `config()` method. In base class * - * @prop {string} version Static. The component version string (date updated). Also has a getter. + * @prop {string} version Static. The component version string (date updated). Also has a getter that returns component and base version strings. * Other props: * @prop {any|string} payload - Can be an attribute or property. If used as property, must not use payload attribute in html, aAllows any data to be attached to payload. As an attribute, allows a string only. @@ -174,12 +169,12 @@

Source: src/button-send.js

* @slot default - Button label. Allows text, inline and most block tags to be included (unlike the standard button tag which only allows inline tags). * @csspart button - Uses the uib-styles.css uibuilder master for variables where available. + + * See https://github.com/runem/web-component-analyzer?tab=readme-ov-file#-how-to-document-your-components-using-jsdoc */ class ButtonSend extends TiBaseComponent { /** Component version */ - static version = '2024-09-22' - - //#region ---- Class Variables ---- + static version = '2024-09-29' sendEvents = true /** The topic to include in the output @@ -206,14 +201,12 @@

Source: src/button-send.js

static get observedAttributes() { return [ // Standard watched attributes: - 'inherit-style', + 'inherit-style', 'name', // Other watched attributes: 'topic', 'payload', ] } - //#endregion ---- ---- ---- ---- - /** NB: Attributes not available here - use connectedCallback to reference */ constructor() { super() @@ -252,14 +245,8 @@

Source: src/button-send.js

if (this.uib) document.addEventListener(`uibuilder:msg:_ui:update:${this.id}`, this._uibMsgHandler.bind(this) ) // Keep at end. Let everyone know that a new instance of the component has been connected - document.dispatchEvent(new CustomEvent(`${this.localName}:connected`, { - bubbles: true, - composed: true, - detail: { - id: this.id, - name: this.name - }, - })) + this._event('connected') + this._event('ready') } /** Runs when an instance is removed from the DOM */ @@ -269,14 +256,7 @@

Source: src/button-send.js

document.removeEventListener(`uibuilder:msg:_ui:update:${this.id}`, this._uibMsgHandler ) // Keep at end. Let everyone know that an instance of the component has been disconnected - document.dispatchEvent(new CustomEvent(`${this.localName}:disconnected`, { - bubbles: true, - composed: true, - detail: { - id: this.id, - name: this.name - }, - })) + this._event('disconnected') } /** Runs when an observed attribute changes - Note: values are always strings @@ -300,17 +280,8 @@

Source: src/button-send.js

_ui: { ...this._ui } } ) } - document.dispatchEvent(new CustomEvent(`${this.localName}:attribChanged`, { - bubbles: true, - composed: true, - detail: { - id: this.id, - name: this.name, - attribute: attrib, - newVal: newVal, - oldVal: oldVal, - } - })) + // Keep at end. Let everyone know that an attribute has changed for this instance of the component + this._event('attribChanged', { attribute: attrib, newVal: newVal, oldVal: oldVal }) } _setMsg(evtName) { @@ -412,13 +383,13 @@

Source: src/button-send.js


- Documentation generated by JSDoc 4.0.3 on Tue Sep 24 2024 19:36:38 GMT+0100 (British Summer Time) + Documentation generated by JSDoc 4.0.3 on Sun Sep 29 2024 17:56:15 GMT+0100 (British Summer Time)
diff --git a/docs/jsdoc/src_call-out.js.html b/docs/jsdoc/src_call-out.js.html new file mode 100644 index 0000000..688e42f --- /dev/null +++ b/docs/jsdoc/src_call-out.js.html @@ -0,0 +1,352 @@ + + + + + JSDoc: Source: src/call-out.js + + + + + + + + + + +
+ +

Source: src/call-out.js

+ + + + + + +
+
+
/** Define a new zero dependency custom web component ECMA module that can be used to show a GitHub Markdown-style callout box
+ * Version: See the class code
+ **/
+/** Copyright (c) 2024-2024 Julian Knight (Totally Information)
+ * https://it.knightnet.org.uk, https://github.com/TotallyInformation
+ *
+ * Licensed under the Apache License, Version 2.0 (the 'License');
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an 'AS IS' BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ **/
+
+/** TODO
+ * - Use a css var for background transparency
+ * - Allow for a different background in the head
+ * - Use html in head, not just text.
+ * - Allow for image icons
+ * - use uib-brand css variables with fallbacks
+ * - Consider backgrounds matching the color but with transparency
+ * + Move initial processing to connected callback, add setters for type/icon/title and may changes dynamically, change attrib chg to dynamic upds
+ */
+
+import TiBaseComponent from '../libs/ti-base-component'
+
+/** Only use a template if you want to isolate the code and CSS */
+// const template = document.createElement('template')
+// template.innerHTML = /*html*/`
+//     <style>
+//         :host {
+//             display: block;   /* default is inline */
+//             contain: content; /* performance boost */
+//         }
+//     </style>
+//     <slot></slot>
+// `
+
+/** Namespace
+ * @namespace Alpha
+ */
+
+/**
+ * @class
+ * @extends TiBaseComponent
+ * @description Define a new zero dependency custom web component that outputs a standardised callout box
+ *
+ * @element call-out
+ * @memberOf Alpha
+
+ * METHODS FROM BASE:
+ * @method config Update runtime configuration, return complete config
+ * @method createShadowSelectors Creates the jQuery-like $ and $$ methods
+ * @method deepAssign Object deep merger
+ * @method doInheritStyles If requested, add link to an external style sheet
+ * @method ensureId Adds a unique ID to the tag if no ID defined.
+ * @method _uibMsgHandler Not yet in use
+ * @method _event(name,data) Standardised custom event dispatcher
+ * @method _ready Call from end of connectedCallback. Sets connected prop and outputs events
+
+ * OTHER METHODS:
+ * None
+
+ * @fires call-out:connected - When an instance of the component is attached to the DOM. `evt.details` contains the details of the element.
+ * @fires call-out:ready - Alias for connected. The instance can handle property & attribute changes
+ * @fires call-out:disconnected - When an instance of the component is removed from the DOM. `evt.details` contains the details of the element.
+ * @fires call-out:attribChanged - When a watched attribute changes. `evt.details` contains the details of the change.
+ * NOTE that listeners can be attached either to the `document` or to the specific element instance.
+
+ * Standard watched attributes (common across all my components):
+ * @attr {string|boolean} inherit-style - Optional. Load external styles into component (only useful if using template). If present but empty, will default to './index.css'. Optionally give a URL to load.
+ * @attr {string} name - Optional. HTML name attribute. Included in output _meta prop.
+
+ * Other watched attributes:
+ * @attr {string} type - Optional. If present, a title will be added above other child content
+ * @attr {string} icon - Optional. If present, will override the callout title icon
+
+ * Non-watched but still used attributes:
+ * @attr {string} title - Optional. If present, will override the callout title text
+
+ * Standard props (common across all my components):
+ * @prop {number} _iCount Static. The component version string (date updated)
+ * @prop {boolean} uib True if UIBUILDER for Node-RED is loaded
+ * @prop {function(string): Element} $ jQuery-like shadow dom selector
+ * @prop {function(string): NodeList} $$  jQuery-like shadow dom multi-selector
+ * @prop {boolean} connected False until connectedCallback finishes
+ * @prop {string} name Placeholder for the optional name attribute
+ * @prop {object} opts This components controllable options - get/set using the `config()` method
+ *
+ * @prop {string} version Static. The component version string (date updated). Also has a getter that returns component and base version strings.
+
+ * Other props:
+ * By default, all attributes are also created as properties
+
+ * @slot Container contents
+
+ * See https://github.com/runem/web-component-analyzer?tab=readme-ov-file#-how-to-document-your-components-using-jsdoc
+ */
+class CallOut extends TiBaseComponent {
+    /** Component version */
+    static version = '2024-09-29'
+
+    /** Makes HTML attribute change watched
+     * @returns {Array<string>} List of all of the html attribs (props) listened to
+     */
+    static get observedAttributes() {
+        return [
+            // Standard watched attributes:
+            'inherit-style', 'name',
+            // Other watched attributes:
+            'type', 'icon', 'title',
+        ]
+    }
+
+    type = ''
+    icon = ''
+
+    connected = false
+
+    /** NB: Attributes not available here - use connectedCallback to reference */
+    constructor() {
+        super()
+
+        // Only attach the shadow dom if code and style isolation is needed
+        // this.attachShadow({ mode: 'open', delegatesFocus: true })
+            // .append(template.content.cloneNode(true))
+
+        // jQuery-like selectors but for the shadow. NB: Returns are STATIC not dynamic lists
+        this.createShadowSelectors()  // in base class
+
+        // Apply styles using a <style> tag in the light DOM
+        const style = document.createElement('style')
+        style.textContent = `
+        ${this.localName} {
+            --callout-color: inherit;
+            --callout-bgcolor: hsl(207.1deg 63.27% 40% /0.15);
+            --parent-color: inherit;
+            display: block;
+            border: 1px solid silver;
+            border-left: .25rem solid var(--callout-color, silver);
+            margin-bottom: 1rem;
+            padding: .75rem 1.25rem;
+            border-radius: 0.25rem;
+            background-color: var(--callout-bgcolor, inherit);
+        }
+        ${this.localName} > .co-head {
+            color: var(--callout-color, inherit);
+            font-weight: bolder;
+        }
+        `
+        // this.appendChild(style)
+        document.head.appendChild(style)
+    }
+
+    /** Runs when an instance is added to the DOM */
+    connectedCallback() {
+        // Make sure instance has an ID. Create an id from name or calculation if needed
+        this.ensureId()  // in base class
+        // Apply parent styles from a stylesheet if required - only required if using an applied template
+        this.doInheritStyles()  // in base class
+
+        // OPTIONAL. Listen for a uibuilder msg that is targetted at this instance of the component
+        // if (this.uib) document.addEventListener(`uibuilder:msg:_ui:update:${this.id}`, this._uibMsgHandler.bind(this) )
+
+        this.type = this.getAttribute('type')
+        this.icon = this.getAttribute('icon')
+        console.log(this.id, 'connected', this.type, this.icon)
+
+        this.doType(this.type)
+
+        // Keep at end. Let everyone know that a new instance of the component has been connected & is ready
+        this._ready()
+    }
+
+    /** Runs when an instance is removed from the DOM */
+    disconnectedCallback() {
+        // @ts-ignore Remove optional uibuilder event listener
+        document.removeEventListener(`uibuilder:msg:_ui:update:${this.id}`, this._uibMsgHandler )
+
+        // Keep at end. Let everyone know that an instance of the component has been disconnected
+        this._event('disconnected')
+    }
+
+    /** Runs when an observed attribute changes - Note: values are always strings
+     * @param {string} attrib Name of watched attribute that has changed
+     * @param {string} oldVal The previous attribute value
+     * @param {string} newVal The new attribute value
+     */
+    attributeChangedCallback(attrib, oldVal, newVal) {
+        /** Optionally ignore attrib changes until instance is fully connected
+         * Otherwise this can fire BEFORE everthing is fully connected.
+         */
+        if (!this.connected) return
+
+        // Don't bother if the new value same as old
+        if ( oldVal === newVal ) return
+        // Create a property from the value - WARN: Be careful with name clashes
+        this[attrib] = newVal
+
+        console.log(this.id, 'attrib', attrib, oldVal, newVal)
+
+        // Add other dynamic attribute processing here.
+        // If attribute processing doesn't need to be dynamic, process in connectedCallback as that happens earlier in the lifecycle
+        
+        if (attrib === 'type') this.doType(this.type)
+
+        // Keep at end. Let everyone know that an attribute has changed for this instance of the component
+        this._event('attribChanged', { attribute: attrib, newVal: newVal, oldVal: oldVal })
+    }
+
+    doType(type) {
+        if (!type) type = null
+        else type = type.toLowerCase()
+
+        console.log(this.id, 'doType')
+
+        // new element to add
+        const headEl = document.createElement('div')
+        headEl.className = 'co-head'
+
+        let headText = ''
+        let headIcon = ''
+        let headStyle = 'inherit'
+
+        switch (type) {
+            // These supported by GitHub, Typora, Docsify, Obsidian
+            case 'note': {
+                headIcon = 'ℹ️ '
+                headText = 'Note'
+                headStyle = '--callout-color: hsl(188.2deg 77.78% 40.59%);'
+                break
+            }
+        
+            case 'hint':
+            case 'tip': {
+                headIcon = '💡 '
+                headText = 'Tip'
+                headStyle = '--callout-color: hsl(133.7deg 61.35% 40.59%);'
+                break
+            }
+        
+            case 'warn':
+            case 'warning': {
+                headIcon = '⚠️ '
+                headText = 'Warning'
+                headStyle = '--callout-color: var(--warning-intense, hsl(35.19deg 84.38% 62.35%));'
+                break
+            }
+        
+            // These supported by GitHub, Typora, Obsidian
+            case 'important': {
+                headIcon = '🔖 '
+                headText = 'Important'
+                headStyle = '--callout-color: hsl(262.44deg 89.78% 73.14%);'
+                break
+            }
+        
+            case 'caution': {
+                headIcon = '❗ '
+                headText = 'Caution'
+                headStyle = '--callout-color: hsl(2.74deg 92.59% 62.94%);'
+                break
+            }
+        
+            default: {
+                break
+            }
+        }
+
+        if (this.title) {
+            headText = this.title
+        }
+
+        if (this.icon) {
+            headIcon = `${this.icon} `
+        }
+
+        if (headText) {
+            headEl.textContent = `${headIcon}${headText}`
+            this.style = headStyle
+            this.prepend(headEl)
+        }
+    }
+} // ---- end of Class ---- //
+
+// Make the class the default export so it can be used elsewhere
+export default CallOut
+
+/** Self register the class to global
+ * Enables new data lists to be dynamically added via JS
+ * and lets the static methods be called
+ */
+window['CallOut'] = CallOut
+
+// Self-register the HTML tag
+customElements.define('call-out', CallOut)
+
+
+
+ + + + +
+ + + +
+ +
+ Documentation generated by JSDoc 4.0.3 on Sun Sep 29 2024 17:56:15 GMT+0100 (British Summer Time) +
+ + + + + diff --git a/docs/jsdoc/src_collapsible-headings.js.html b/docs/jsdoc/src_collapsible-headings.js.html index 0fef820..72720e3 100644 --- a/docs/jsdoc/src_collapsible-headings.js.html +++ b/docs/jsdoc/src_collapsible-headings.js.html @@ -28,9 +28,6 @@

Source: src/collapsible-headings.js

/** Define a new zero dependency custom web component ECMA module that can be used as an HTML tag
  *
- * TO USE THIS TEMPLATE: CHANGE ALL INSTANCES OF 'CollapsibleHeadings' and 'collapsible-headings'
- * For better formatting of HTML in template strings, use VSCode's "ES6 String HTML" extension
- *
  * Version: See the class code
  *
  **/
@@ -52,8 +49,10 @@ 

Source: src/collapsible-headings.js

/** TODO * - Add a host attrib or class to allow sections to be pre-hidden (add to the hx tag?) + * - sub-option to store collapsed sections in browser storage (probably needs ID's to be added to all heads and wrappers) * - Maybe add another option to make headings auto-numbered? * - Add option for an icon + * - How to ignore outer div (as delivered by uib-element) - maybe something with observer? */ import TiBaseComponent from '../libs/ti-base-component' @@ -88,30 +87,34 @@

Source: src/collapsible-headings.js

* @method deepAssign Object deep merger * @method doInheritStyles If requested, add link to an external style sheet * @method ensureId Adds a unique ID to the tag if no ID defined. - * @method _uibMsgHandler If UIBUILDER for Node-RED is active, auto-handle incoming messages targetted at instance id + * @method _uibMsgHandler Not yet in use + * @method _event(name,data) Standardised custom event dispatcher * OTHER METHODS: * None * @fires collapsible-headings:connected - When an instance of the component is attached to the DOM. `evt.details` contains the details of the element. + * @fires component-template:ready - Alias for connected. The instance can handle property & attribute changes * @fires collapsible-headings:disconnected - When an instance of the component is removed from the DOM. `evt.details` contains the details of the element. * @fires collapsible-headings:attribChanged - When a watched attribute changes. `evt.details` contains the details of the change. * NOTE that listeners can be attached either to the `document` or to the specific element instance. * Standard watched attributes (common across all my components): * @attr {string|boolean} inherit-style - Optional. Load external styles into component (only useful if using template). If present but empty, will default to './index.css'. Optionally give a URL to load. + * @attr {string} name - Optional. HTML name attribute. Included in output _meta prop. * Other watched attributes: * @attr {string} levels - Optional. Default='h2, h3, h4, h5'. A single string detailing the heading levels to make collapsible. * Standard props (common across all my components): - * @prop {boolean} uib True if UIBUILDER for Node-RED is loaded. In base class - * @prop {function(string): Element} $ jQuery-like shadow dom selector. In base class - * @prop {function(string): NodeList} $$ jQuery-like shadow dom multi-selector. In base class - * @prop {number} _iCount The component version string (date updated). In base class - * @prop {object} opts This components controllable options - get/set using the `config()` method. In base class + * @prop {number} _iCount Static. The component version string (date updated) + * @prop {boolean} uib True if UIBUILDER for Node-RED is loaded + * @prop {function(string): Element} $ jQuery-like shadow dom selector + * @prop {function(string): NodeList} $$ jQuery-like shadow dom multi-selector + * @prop {string} name Placeholder for the optional name attribute + * @prop {object} opts This components controllable options - get/set using the `config()` method * - * @prop {string} version Static. The component version string (date updated). Also has a getter. + * @prop {string} version Static. The component version string (date updated). Also has a getter that returns component and base version strings. * Other props: * @prop {string} level Default='h2, h3, h4, h5'. A single string detailing the heading levels to make collapsible. @@ -123,7 +126,7 @@

Source: src/collapsible-headings.js

*/ class CollapsibleHeadings extends TiBaseComponent { /** Component version */ - static version = '2024-09-24' + static version = '2024-09-29' levels = 'h2, h3, h4, h5' @@ -133,7 +136,7 @@

Source: src/collapsible-headings.js

static get observedAttributes() { return [ // Standard watched attributes: - 'inherit-style', + 'inherit-style', 'name', // Other watched attributes: 'levels', ] @@ -172,14 +175,8 @@

Source: src/collapsible-headings.js

this.processSlotContent() // Keep at end. Let everyone know that a new instance of the component has been connected - this.dispatchEvent(new CustomEvent(`${this.localName}:connected`, { - bubbles: true, - composed: true, - detail: { - id: this.id, - name: this.name - }, - } ) ) + this._event('connected') + this._event('ready') } /** Runs when an instance is removed from the DOM */ @@ -191,14 +188,7 @@

Source: src/collapsible-headings.js

this.observer.disconnect() // Keep at end. Let everyone know that an instance of the component has been disconnected - this.dispatchEvent(new CustomEvent(`${this.localName}:disconnected`, { - bubbles: true, - composed: true, - detail: { - id: this.id, - name: this.name - }, - } ) ) + this._event('disconnected') } /** Runs when an observed attribute changes - Note: values are always strings @@ -216,17 +206,7 @@

Source: src/collapsible-headings.js

// If attribute processing doesn't need to be dynamic, process in connectedCallback as that happens earlier in the lifecycle // Keep at end. Let everyone know that an attribute has changed for this instance of the component - this.dispatchEvent(new CustomEvent(`${this.localName}:attribChanged`, { - bubbles: true, - composed: true, - detail: { - id: this.id, - name: this.name, - attribute: attrib, - newVal: newVal, - oldVal: oldVal, - } - } ) ) + this._event('attribChanged', { attribute: attrib, newVal: newVal, oldVal: oldVal }) } /** Walk through slot content. @@ -325,13 +305,13 @@

Source: src/collapsible-headings.js


- Documentation generated by JSDoc 4.0.3 on Tue Sep 24 2024 19:36:38 GMT+0100 (British Summer Time) + Documentation generated by JSDoc 4.0.3 on Sun Sep 29 2024 17:56:15 GMT+0100 (British Summer Time)
diff --git a/docs/jsdoc/src_html-include.js.html b/docs/jsdoc/src_html-include.js.html new file mode 100644 index 0000000..cae5212 --- /dev/null +++ b/docs/jsdoc/src_html-include.js.html @@ -0,0 +1,327 @@ + + + + + JSDoc: Source: src/html-include.js + + + + + + + + + + +
+ +

Source: src/html-include.js

+ + + + + + +
+
+
/** Zero dependency web component to load HTML/JSON dynamically
+ * Version: See the class code
+ * See https://github.com/justinfagnani/html-include-element for inspiration
+ */
+/** Copyright (c) 2022-2024 Julian Knight (Totally Information)
+ * https://it.knightnet.org.uk, https://github.com/TotallyInformation
+ *
+ * Licensed under the Apache License, Version 2.0 (the 'License');
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an 'AS IS' BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ **/
+
+/** TODO
+ * - Allow scripts to work on imports
+ * - Check if styles work on html import
+ * - JSON load to global var?
+ * - optional load to template?
+ * - Maybe: add syntax highlights for json
+ */
+
+import TiBaseComponent from '../libs/ti-base-component'
+
+/** Only use a template if you want to isolate the code and CSS */
+const template = document.createElement('template')
+template.innerHTML = /*html*/`
+    <style>
+        :host {
+            display: block;   /* default is inline */
+            contain: content; /* performance boost */
+        }
+    </style>
+    <slot></slot>
+    <inner-load></inner-load>
+`
+
+/** Namespace
+ * @namespace Beta
+ */
+
+/**
+ * @class
+ * @extends TiBaseComponent
+ * @description A zero dependency custom web component ECMA module that imports HTML from an external resource.
+ *   The src attribute defines the resource to load. The resource can be dynamically changed either by changing
+ *   the src attribute OR by getting a reference to the instance and changing the src property.
+ *
+ * @element html-include
+ * @memberOf Beta
+
+ * METHODS FROM BASE:
+ * @method config Update runtime configuration, return complete config
+ * @method createShadowSelectors Creates the jQuery-like $ and $$ methods
+ * @method deepAssign Object deep merger
+ * @method doInheritStyles If requested, add link to an external style sheet
+ * @method ensureId Adds a unique ID to the tag if no ID defined.
+ * @method _uibMsgHandler Not yet in use
+ * @method _event(name,data) Standardised custom event dispatcher
+
+ * OTHER METHODS:
+ * @method doInclude(url) Replaces the shadow dom content with the imported HTML.
+
+ * @fires html-include:connected - When an instance of the component is attached to the DOM. `evt.details` contains the details of the element.
+ * @fires component-template:ready - Alias for connected. The instance can handle property & attribute changes
+ * @fires html-include:disconnected - When an instance of the component is removed from the DOM. `evt.details` contains the details of the element.
+ * @fires html-include:attribChanged - When a watched attribute changes. `evt.details` contains the details of the change.
+ * NOTE that listeners can be attached either to the `document` or to the specific element instance.
+
+ * Standard watched attributes (common across all my components):
+ * @attr {string|boolean} inherit-style - Optional. Load external styles into component (only useful if using template). If present but empty, will default to './index.css'. Optionally give a URL to load.
+ * @attr {string} name - Optional. HTML name attribute. Included in output _meta prop.
+
+ * Other watched attributes:
+ * @attr {string} src - URL of the source to include
+
+ * Standard props (common across all my components):
+ * @prop {number} _iCount Static. The component version string (date updated)
+ * @prop {boolean} uib True if UIBUILDER for Node-RED is loaded
+ * @prop {function(string): Element} $ jQuery-like shadow dom selector
+ * @prop {function(string): NodeList} $$  jQuery-like shadow dom multi-selector
+ * @prop {string} name Placeholder for the optional name attribute
+ * @prop {object} opts This components controllable options - get/set using the `config()` method
+ *
+ * @prop {string} version Static. The component version string (date updated). Also has a getter that returns component and base version strings.
+
+ * Other props:
+ * @prop {string} url The URL to load. Reflected to/from the src attribute.
+ * By default, all attributes are also created as properties
+
+ * @slot Container contents
+
+ * See https://github.com/runem/web-component-analyzer?tab=readme-ov-file#-how-to-document-your-components-using-jsdoc
+ */
+class HtmlInclude extends TiBaseComponent {
+    /** Component version */
+    static version = '2024-09-29'
+
+    /** Makes HTML attribute change watched
+     * @returns {Array<string>} List of all of the html attribs (props) listened to
+     */
+    static get observedAttributes() {
+        return [
+            // Standard watched attributes:
+            'inherit-style', 'name',
+            // Other watched attributes:
+            'src',
+        ]
+    }
+
+    /** Content type of the imported resource
+     * @type {"text"|"html"|"json"|"form"}
+     */
+    contentType = 'text'
+    text = ''
+    json = {}
+
+    /** The URL to fetch an HTML document from. Allows change via instance prop as well as attribute change.
+     *  Setting this property causes a fetch the HTML from the URL.
+     *  We are reflecting the src attrib and the src prop.
+     * @returns {URL|string} The content of the src attribute
+     */
+    get src() {
+        return this.getAttribute('src')
+    }
+
+    /** Reflect src property to the src attribute
+     * @param {string} value The URL to set
+     */
+    set src(value) {
+        this.setAttribute('src', value)
+    }
+
+    constructor() {
+        super()
+
+        this.attachShadow({ mode: 'open', delegatesFocus: true })
+            // Only append the template if code and style isolation is needed
+            .append(template.content.cloneNode(true))
+
+        // jQuery-like selectors but for the shadow. NB: Returns are STATIC not dynamic lists
+        this.createShadowSelectors()  // in base class
+    }
+
+    /** Runs when an instance is added to the DOM */
+    connectedCallback() {
+        // Make sure instance has an ID. Create an id from name or calculation if needed
+        this.ensureId()  // in base class
+        // Apply parent styles from a stylesheet if required - only required if using an applied template
+        this.doInheritStyles()  // in base class
+
+        // OPTIONAL. Listen for a uibuilder msg that is targetted at this instance of the component
+        if (this.uib) document.addEventListener(`uibuilder:msg:_ui:update:${this.id}`, this._uibMsgHandler.bind(this) )
+
+        // Keep at end. Let everyone know that a new instance of the component has been connected
+        this._event('connected')
+        this._event('ready')
+    }
+
+    /** Runs when an instance is removed from the DOM */
+    disconnectedCallback() {
+        // @ts-ignore Remove optional uibuilder event listener
+        document.removeEventListener(`uibuilder:msg:_ui:update:${this.id}`, this._uibMsgHandler )
+
+        // Keep at end. Let everyone know that an instance of the component has been disconnected
+        this._event('disconnected')
+    }
+
+    /** Runs when an observed attribute changes - Note: values are always strings
+     * @param {string} attrib Name of watched attribute that has changed
+     * @param {string} oldVal The previous attribute value
+     * @param {string} newVal The new attribute value
+     */
+    attributeChangedCallback(attrib, oldVal, newVal) {
+        // Don't bother if the new value same as old
+        if ( oldVal === newVal ) return
+
+        // We are allowing src to be change dynamically both by attrib change AND by instance property change.
+        if (attrib === 'src') {
+            if (newVal) {
+                this.doInclude(newVal)
+            } else {
+                console.error('[html-include] src attribute cannot be empty.')
+            }
+        }
+
+        // Keep at end. Let everyone know that an attribute has changed for this instance of the component
+        this._event('attribChanged', { attribute: attrib, newVal: newVal, oldVal: oldVal })
+    }
+
+    /** Replaces the shadow dom content with the imported HTML.
+     * @param {URL|string} url URL of the resource to import
+     */
+    async doInclude(url) {
+        if (!url) {
+            console.error('[html-include] Cannot fetch empty string.')
+            return
+        }
+
+        const response = await fetch(url)
+
+        if (!response.ok) {
+            throw new Error(`[html-include] Fetch of url "${url}" failed: ${response.statusText}`)
+        }
+
+        const contentType = response.headers.get('content-type')
+        if (contentType) {
+            if (contentType.includes('text/html')) {
+                this.contentType = 'html'
+            } else if (contentType.includes('application/json')) {
+                this.contentType = 'json'
+            } else if (contentType.includes('multipart/form-data')) {
+                this.contentType = 'form'
+            } else {
+                this.contentType = 'text'
+            }
+        }
+
+        // Could add other binary types here. https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API/Using_Fetch#body
+        switch (this.contentType) {
+            case 'html': {
+                this.json = {}
+                this.text = await response.text()
+                const parser = new DOMParser()
+                const newDoc = parser.parseFromString( this.text, 'text/html' )
+                this.shadowRoot.removeChild(this.shadowRoot.lastElementChild)
+                this.shadowRoot.appendChild(newDoc.body)
+                break
+            }
+
+            case 'json': {
+                this.json = await response.json()
+                this.text = JSON.stringify(this.json, null, 4)
+                this.shadowRoot.removeChild(this.shadowRoot.lastElementChild)
+                const myHtml = document.createElement('pre')
+                myHtml.textContent = this.text
+                this.shadowRoot.appendChild( myHtml )
+                break
+            }
+
+            case 'form': {
+                this.json = await response.formData()
+                this.text = JSON.stringify(this.json)
+                this.shadowRoot.removeChild(this.shadowRoot.lastElementChild)
+                this.shadowRoot.append(this.text)
+                break
+            }
+
+            case 'text':
+            default: {
+                this.json = {}
+                this.text = await response.text()
+                this.shadowRoot.append(this.text)
+                break
+            }
+        }
+    }
+} // ---- end of Class ---- //
+
+// Make the class the default export so it can be used elsewhere
+export default HtmlInclude
+
+/** Self register the class to global
+ * Enables new data lists to be dynamically added via JS
+ * and lets the static methods be called
+ */
+window['HtmlInclude'] = HtmlInclude
+
+// Self-register the HTML tag
+customElements.define('html-include', HtmlInclude)
+
+
+
+ + + + +
+ + + +
+ +
+ Documentation generated by JSDoc 4.0.3 on Sun Sep 29 2024 17:56:15 GMT+0100 (British Summer Time) +
+ + + + + diff --git a/docs/jsdoc/src_syntax-highlight.js.html b/docs/jsdoc/src_syntax-highlight.js.html new file mode 100644 index 0000000..b6f117a --- /dev/null +++ b/docs/jsdoc/src_syntax-highlight.js.html @@ -0,0 +1,302 @@ + + + + + JSDoc: Source: src/syntax-highlight.js + + + + + + + + + + +
+ +

Source: src/syntax-highlight.js

+ + + + + + +
+
+
/** Zero dependency web component to show a JavaScript object as a highlighted box in the UI
+ *
+ * Version: See the class code
+ */
+/** Copyright (c) 2022-2024 Julian Knight (Totally Information)
+ * https://it.knightnet.org.uk, https://github.com/TotallyInformation
+ *
+ * Licensed under the Apache License, Version 2.0 (the 'License');
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an 'AS IS' BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ **/
+
+/** To Do
+ * - Use highlighter from visible-console
+ */
+
+import TiBaseComponent from '../libs/ti-base-component'
+
+/** Only use a template if you want to isolate the code and CSS */
+const template = document.createElement('template')
+template.innerHTML = /*html*/`
+    <style>
+        :host {
+            display: block;   /* default is inline */
+            contain: content; /* performance boost */
+            color:white;
+            background-color:black;
+            margin-top: 0.5rem;
+            margin-bottom: 0.5rem;
+            padding: 0.5rem;
+        }
+        pre {
+            font-family: Consolas, "ui-monospace", "Lucida Console", monospace;
+            white-space: pre;
+            margin: 0;
+        }
+        .key {color:#ffbf35}
+        .string {color:#5dff39;}
+        .number {color:#70aeff;}
+        .boolean {color:#b993ff;}
+        .null {color:#93ffe4;}
+        .undefined {color:#ff93c9;}
+    </style>
+    <slot></slot>
+    <pre><i>Waiting for data</i></pre>
+`
+
+/** Namespace
+ * @namespace Beta
+ */
+
+/**
+ * @class
+ * @extends TiBaseComponent
+ * @description Define a new zero dependency custom web component ECMA module that can be used as an HTML tag
+ *
+ * @element syntax-highlight
+ * @memberOf Beta
+
+ * @example Set the json property on the element
+ *   const showMsg = document.getElementsByTagName('syntax-highlight')[0]
+ *   showMsg.json({....})
+
+ * METHODS FROM BASE:
+ * @method config Update runtime configuration, return complete config
+ * @method createShadowSelectors Creates the jQuery-like $ and $$ methods
+ * @method deepAssign Object deep merger
+ * @method doInheritStyles If requested, add link to an external style sheet
+ * @method ensureId Adds a unique ID to the tag if no ID defined.
+ * @method _uibMsgHandler Not yet in use
+ * @method _event(name,data) Standardised custom event dispatcher
+
+ * OTHER METHODS:
+ * @method highlight Convert object to HTML
+
+ * @fires syntax-highlight:connected - When an instance of the component is attached to the DOM. `evt.details` contains the details of the element.
+ * @fires component-template:ready - Alias for connected. The instance can handle property & attribute changes
+ * @fires syntax-highlight:disconnected - When an instance of the component is removed from the DOM. `evt.details` contains the details of the element.
+ * @fires syntax-highlight:attribChanged - When a watched attribute changes. `evt.details` contains the details of the change.
+ * NOTE that listeners can be attached either to the `document` or to the specific element instance.
+
+ * Standard watched attributes (common across all my components):
+ * @attr {string|boolean} inherit-style - Optional. Load external styles into component (only useful if using template). If present but empty, will default to './index.css'. Optionally give a URL to load.
+ * @attr {string} name - Optional. HTML name attribute. Included in output _meta prop.
+
+ * Other watched attributes:
+ * None
+
+ * Standard props (common across all my components):
+ * @prop {number} _iCount Static. The component version string (date updated)
+ * @prop {boolean} uib True if UIBUILDER for Node-RED is loaded
+ * @prop {function(string): Element} $ jQuery-like shadow dom selector
+ * @prop {function(string): NodeList} $$  jQuery-like shadow dom multi-selector
+ * @prop {string} name Placeholder for the optional name attribute
+ * @prop {object} opts This components controllable options - get/set using the `config()` method
+ *
+ * @prop {string} version Static. The component version string (date updated). Also has a getter that returns component and base version strings.
+
+ * Other props:
+ * @prop {object|JSON|string} json JSON to convert
+ * By default, all attributes are also created as properties
+
+ * @slot Container contents
+
+ * See https://github.com/runem/web-component-analyzer?tab=readme-ov-file#-how-to-document-your-components-using-jsdoc
+ */
+class SyntaxHighlight extends TiBaseComponent {
+    /** Component version */
+    static version = '2024-09-29'
+
+    jsonData = {}
+
+    /** Makes HTML attribute change watched
+     * @returns {Array<string>} List of all of the html attribs (props) listened to
+     */
+    static get observedAttributes() {
+        return [
+            // Standard watched attributes:
+            'inherit-style', 'name',
+            // Other watched attributes:
+            'auto',
+        ]
+    }
+
+    /** Element.json = {...} to show the json object
+     * @param {Object|JSON|string} value JS Object or JSON string to show
+     */
+    set json(value) {
+        if (typeof value === 'string') {
+            try {
+                value = JSON.parse(value)
+            } catch (e) {
+                console.warn(`[syntax-highlight] Could not parse string "${value}"`)
+            }
+        }
+        this.jsonData = value
+
+        // console.log(value, syntaxHighlight(value))
+        this.shadowRoot.removeChild(this.shadowRoot.lastElementChild)
+        // @ts-ignore
+        this.shadowRoot.appendChild(this.constructor.highlight(value))
+    }
+
+    get json() {
+        return this.jsonData
+    }
+
+    /** NB: Attributes not available here - use connectedCallback to reference */
+    constructor() {
+        super()
+        this.attachShadow({ mode: 'open', delegatesFocus: true })
+            // Only append the template if code and style isolation is needed
+            .append(template.content.cloneNode(true))
+
+        // jQuery-like selectors but for the shadow. NB: Returns are STATIC not dynamic lists
+        this.createShadowSelectors()  // in base class
+    }
+
+    /** Runs when an instance is added to the DOM */
+    connectedCallback() {
+        // Make sure instance has an ID. Create an id from name or calculation if needed
+        this.ensureId()  // in base class
+        // Apply parent styles from a stylesheet if required - only required if using an applied template
+        this.doInheritStyles()  // in base class
+
+        // this.addEventListener('new-msg', evt => {
+        //     this.json = evt.detail
+        // })
+
+        // OPTIONAL. Listen for a uibuilder msg that is targetted at this instance of the component
+        if (this.uib) document.addEventListener(`uibuilder:msg:_ui:update:${this.id}`, this._uibMsgHandler.bind(this) )
+
+        // Keep at end. Let everyone know that a new instance of the component has been connected
+        this._event('connected')
+        this._event('ready')
+    }
+
+    /** Runs when an instance is removed from the DOM */
+    disconnectedCallback() {
+        // @ts-ignore Remove optional uibuilder event listener
+        document.removeEventListener(`uibuilder:msg:_ui:update:${this.id}`, this._uibMsgHandler )
+
+        // Keep at end. Let everyone know that an instance of the component has been disconnected
+        this._event('disconnected')
+    }
+
+    /** Runs when an observed attribute changes - Note: values are always strings
+     * @param {string} attrib Name of watched attribute that has changed
+     * @param {string} oldVal The previous attribute value
+     * @param {string} newVal The new attribute value
+     */
+    attributeChangedCallback(attrib, oldVal, newVal) {
+        // Don't bother if the new value same as old
+        if ( oldVal === newVal ) return
+        // Create a property from the value - WARN: Be careful with name clashes
+        this[attrib] = newVal
+
+        // Add other dynamic attribute processing here.
+        // If attribute processing doesn't need to be dynamic, process in connectedCallback as that happens earlier in the lifecycle
+
+        // Keep at end. Let everyone know that an attribute has changed for this instance of the component
+        this._event('attribChanged', { attribute: attrib, newVal: newVal, oldVal: oldVal })
+    } // --- end of attributeChangedCallback --- //
+
+    /** Return a formatted HTML version of JSON object
+     * @param {object|JSON} json JSON object to convert
+     * @returns {HTMLElement} Highlighted JSON wrapped in a `<pre>` tag
+     */
+    static highlight(json) {
+        json = JSON.stringify(json, undefined, 4)
+        json = json.replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;')
+        json = json.replace(/("(\\u[a-zA-Z0-9]{4}|\\[^u]|[^\\"])*"(\s*:)?|\b(true|false|null)\b|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?)/g, function (match) {
+            var cls = 'number'
+            if ((/^"/).test(match)) {
+                if ((/:$/).test(match)) {
+                    cls = 'key'
+                } else {
+                    cls = 'string'
+                }
+            } else if ((/true|false/).test(match)) {
+                cls = 'boolean'
+            } else if ((/null/).test(match)) {
+                cls = 'null'
+            }
+            return '<span class="' + cls + '">' + match + '</span>'
+        })
+        const myHtml = document.createElement('pre')
+        myHtml.innerHTML = json
+        return myHtml
+    }
+} // ---- End of SyntaxHighlight class ---- //
+
+// Make the class the default export so it can be used elsewhere
+export default SyntaxHighlight
+
+/** Self register the class to global
+ * Enables new data lists to be dynamically added via JS
+ * and lets the static methods be called
+ */
+window['SyntaxHighlight'] = SyntaxHighlight
+
+// Self-register the HTML tag
+customElements.define('syntax-highlight', SyntaxHighlight)
+
+
+
+ + + + +
+ + + +
+ +
+ Documentation generated by JSDoc 4.0.3 on Sun Sep 29 2024 17:56:15 GMT+0100 (British Summer Time) +
+ + + + + diff --git a/docs/jsdoc/src_visible-console.js.html b/docs/jsdoc/src_visible-console.js.html index 2a311f2..9966364 100644 --- a/docs/jsdoc/src_visible-console.js.html +++ b/docs/jsdoc/src_visible-console.js.html @@ -31,21 +31,22 @@

Source: src/visible-console.js

* @version See Class version property * */ -/* - Copyright (c) 2024-2024 Julian Knight (Totally Information) - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 +/** Copyright (c) 2024-2024 Julian Knight (Totally Information) + * https://it.knightnet.org.uk, https://github.com/TotallyInformation + * + * Licensed under the Apache License, Version 2.0 (the 'License'); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + **/ - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ /** TODO * - Add part transparent color backgrounds for at least warn and err @@ -54,6 +55,9 @@

Source: src/visible-console.js

* - Max entry limit */ +import TiBaseComponent from '../libs/ti-base-component' + +/** Only use a template if you want to isolate the code and CSS */ const template = document.createElement('template') template.innerHTML = /** @type {HTMLTemplateElement} */ /*html*/` <style> @@ -121,8 +125,6 @@

Source: src/visible-console.js

<div class="wrapper"></div> ` -import TiBaseComponent from '../libs/ti-base-component' - /** * @namespace Beta */ @@ -137,64 +139,57 @@

Source: src/visible-console.js

* * @example * <visible-console></visible-console> - * + + * METHODS FROM BASE: * @method config Update runtime configuration, return complete config - * @method doInheritStyles If requested, add link to an external style sheet + * @method createShadowSelectors Creates the jQuery-like $ and $$ methods * @method deepAssign Object deep merger + * @method doInheritStyles If requested, add link to an external style sheet + * @method ensureId Adds a unique ID to the tag if no ID defined. + * @method _uibMsgHandler Not yet in use + * @method _event(name,data) Standardised custom event dispatcher + + * OTHER METHODS: * @method redirectConsole Capture console.xxxx and write to the div * @method newLog Creates a new HTML log entry * @method checkType Find out the input JavaScript var type * @method createHTMLVisualizer Creates an HTML visualisation of the input - * + * @fires visible-console:connected - When an instance of the component is attached to the DOM. `evt.details` contains the details of the element. + * @fires component-template:ready - Alias for connected. The instance can handle property & attribute changes * @fires visible-console:disconnected - When an instance of the component is removed from the DOM. `evt.details` contains the details of the element. * @fires visible-console:attribChanged - When a watched attribute changes. `evt.details` contains the details of the change. * NOTE that listeners can be attached either to the `document` or to the specific element instance. - * + * Standard watched attributes (common across all my components): * @attr {string|boolean} inherit-style - Optional. Load external styles into component (only useful if using template). If present but empty, will default to './index.css'. Optionally give a URL to load. + * @attr {string} name - Optional. HTML name attribute. Included in output _meta prop. + * * Other watched attributes: * None - * + * Standard props (common across all my components): - * @prop {string} version Static. The component version string (date updated). Also has a getter. + * @prop {number} _iCount Static. The component version string (date updated) * @prop {boolean} uib True if UIBUILDER for Node-RED is loaded * @prop {function(string): Element} $ jQuery-like shadow dom selector * @prop {function(string): NodeList} $$ jQuery-like shadow dom multi-selector - * @prop {number} _iCount The component version string (date updated) + * @prop {string} name Placeholder for the optional name attribute * @prop {object} opts This components controllable options - get/set using the `config()` method + * + * @prop {string} version Static. The component version string (date updated). Also has a getter that returns component and base version strings. + * * Other props: * @prop {object} colors * @prop {object} bgColors * @prop {object} icons + + * @slot No slot + + * See https://github.com/runem/web-component-analyzer?tab=readme-ov-file#-how-to-document-your-components-using-jsdoc */ class VisibleConsole extends TiBaseComponent { /** Component version */ - static version = '2024-09-21' - - //#region --- Class Properties --- - - /** Is UIBUILDER for Node-RED loaded? */ - // uib // in base class - /** Mini jQuery-like shadow dom selector (see constructor) - * @type {function(string): Element} - * @param {string} selector - A CSS selector to match the element within the shadow DOM. - * @returns {Element} The first element that matches the specified selector. - */ - // $ // in base class - /** Mini jQuery-like shadow dom multi-selector (see constructor) - * @type {function(string): NodeList} - * @param {string} selector - A CSS selector to match the element within the shadow DOM. - * @returns {NodeList} A STATIC list of all shadow dom elements that match the selector. - */ - // $$ // in base class - /** Holds a count of how many instances of this component are on the page that don't have their own id - * Used to ensure a unique id if needing to add one dynamically - */ - // static _iCount = 0 // in base class - - /** Runtime configuration settings */ - opts = {} + static version = '2024-09-29' /** Makes HTML attribute change watched * @returns {Array<string>} List of all of the html attribs (props) listened to @@ -202,11 +197,14 @@

Source: src/visible-console.js

static get observedAttributes() { return [ // Standard watched attributes: - 'inherit-style', + 'inherit-style', 'name' // Other watched attributes: ] } + /** Runtime configuration settings */ + opts = {} + colors = { 'log': 'green', 'error': 'red', @@ -259,27 +257,14 @@

Source: src/visible-console.js

this.redirectConsole() // Keep at end. Let everyone know that a new instance of the component has been connected - this.dispatchEvent(new CustomEvent(`${this.localName}:connected`, { - bubbles: true, - composed: true, - detail: { - id: this.id, - name: this.name - }, - } ) ) + this._event('connected') + this._event('ready') } /** Runs when an instance is removed from the DOM */ disconnectedCallback() { // Keep at end. Let everyone know that an instance of the component has been disconnected - this.dispatchEvent(new CustomEvent(`${this.localName}:disconnected`, { - bubbles: true, - composed: true, - detail: { - id: this.id, - name: this.name - }, - } ) ) + this._event('disconnected') } /** Handle watched attributes @@ -299,17 +284,7 @@

Source: src/visible-console.js

// If attribute processing doesn't need to be dynamic, process in connectedCallback as that happens earlier in the lifecycle // Keep at end. Let everyone know that an attribute has changed for this instance of the component - this.dispatchEvent(new CustomEvent(`${this.localName}:attribChanged`, { - bubbles: true, - composed: true, - detail: { - id: this.id, - name: this.name, - attribute: attrib, - newVal: newVal, - oldVal: oldVal, - } - } ) ) + this._event('attribChanged', { attribute: attrib, newVal: newVal, oldVal: oldVal }) } /** Capture console.xxxx and write to the div */ @@ -532,28 +507,6 @@

Source: src/visible-console.js

// Add the class as a new Custom Element to the window object customElements.define('visible-console', VisibleConsole) - -//#region TEST -// console.dir(Object.keys(console)) -// const data = { -// name: 'Alice', -// age: 30, -// isAdmin: true, -// hobbies: ['Reading', 'Gaming', 'Cycling'], -// preferences: { -// theme: 'dark', -// notifications: true -// }, -// score: null, -// actions: function() { console.log('hello') } -// } -// console.log('hello', 42, data) -// console.info('hello', 42, data) -// console.debug('hello', 42, data) -// console.trace('hello', 42, data) -// console.warn('hello', 42, data) -// console.error('hello', 42, data) -//#endregion
@@ -564,13 +517,13 @@

Source: src/visible-console.js


- Documentation generated by JSDoc 4.0.3 on Tue Sep 24 2024 19:36:38 GMT+0100 (British Summer Time) + Documentation generated by JSDoc 4.0.3 on Sun Sep 29 2024 17:56:15 GMT+0100 (British Summer Time)
diff --git a/docs/readme/alpha/component-template.md b/docs/readme/alpha/component-template.md index f80e571..eb0e463 100644 --- a/docs/readme/alpha/component-template.md +++ b/docs/readme/alpha/component-template.md @@ -4,26 +4,28 @@ | Attribute | Type | Description | |-----------------|-------------------|--------------------------------------------------| -| `inherit-style` | `string\|boolean` | Optional. Load external styles into component (only useful if using template). If present but empty, will default to './index.css'. Optionally give a URL to load.

Other watched attributes:
None

Standard props (common across all my components): | +| `inherit-style` | `string\|boolean` | Optional. Load external styles into component (only useful if using template). If present but empty, will default to './index.css'. Optionally give a URL to load. | ## Properties -| Property | Type | Default | Description | -|-----------|------------------------------|--------------|--------------------------------------------------| -| `$` | `function(string): Element` | | Mini jQuery-like shadow dom selector (see constructor) | -| `$$` | `function(string): NodeList` | | Mini jQuery-like shadow dom multi-selector (see constructor) | -| `opts` | `object` | {} | Runtime configuration settings | -| `uib` | `boolean` | false | Is UIBUILDER for Node-RED loaded? | -| `version` | `string` | "2024-09-22" | Component version | +| Property | Attribute | Type | Default | Description | +|-------------|-----------|------------------------------|--------------|--------------------------------------------------| +| `$` | | `function(string): Element` | | Mini jQuery-like shadow dom selector (see constructor) | +| `$$` | | `function(string): NodeList` | | Mini jQuery-like shadow dom multi-selector (see constructor) | +| `connected` | | `boolean` | false | True when instance finishes connecting.
Allows initial calls of attributeChangedCallback to be
ignored if needed. | +| `name` | `name` | `string` | | Placeholder for the optional name attribute | +| `opts` | | `object` | {} | Runtime configuration settings | +| `uib` | | `boolean` | false | Is UIBUILDER for Node-RED loaded? | +| `version` | | `string` | "2024-09-29" | Component version | ## Methods -| Method | Type | Description | -|-------------------------|---------------------------------------|--------------------------------------------------| -| `config` | `(config: object\|undefined): object` | OPTIONAL. Update runtime configuration, return complete config

**config**: If present, partial or full set of options. If undefined, fn returns the current full option settings | -| `createShadowSelectors` | `(): void` | | -| `doInheritStyles` | `(): Promise` | Optionally apply an external linked style sheet (called from connectedCallback)

**url**: The URL for the linked style sheet | -| `ensureId` | `(): void` | Ensure that the component instance has a unique ID & check again if uib loaded | +| Method | Type | Description | +|-------------------------|------------------------------------|--------------------------------------------------| +| `config` | `(config: object\|undefined): any` | OPTIONAL. Update runtime configuration, return complete config

**config**: If present, partial or full set of options. If undefined, fn returns the current full option settings | +| `createShadowSelectors` | `(): void` | Creates the $ and $$ fns that do css selections against the shadow dom | +| `doInheritStyles` | `(): Promise` | Optionally apply an external linked style sheet (called from connectedCallback)

**url**: The URL for the linked style sheet | +| `ensureId` | `(): void` | Ensure that the component instance has a unique ID & check again if uib loaded | ## Events @@ -32,6 +34,7 @@ | `component-template:attribChanged` | When a watched attribute changes. `evt.details` contains the details of the change.
NOTE that listeners can be attached either to the `document` or to the specific element instance.

Standard watched attributes (common across all my components): | | `component-template:connected` | When an instance of the component is attached to the DOM. `evt.details` contains the details of the element. | | `component-template:disconnected` | When an instance of the component is removed from the DOM. `evt.details` contains the details of the element. | +| `component-template:ready` | Alias for connected. The instance can handle property & attribute changes | ## Slots diff --git a/docs/readme/alpha/html-include.md b/docs/readme/alpha/html-include.md deleted file mode 100644 index 6a87d2a..0000000 --- a/docs/readme/alpha/html-include.md +++ /dev/null @@ -1,10 +0,0 @@ -# html-include - -## Properties - -| Property | Attribute | Type | Default | Description | -|----------|-----------|------------------|---------|--------------------------------------------------| -| `json` | | `object` | {} | | -| `src` | `src` | `string \| null` | | The URL to fetch an HTML document from.
Setting this property causes a fetch the HTML from the URL.
We are reflecting the src attrib and the src prop. | -| `text` | | `string` | "" | | -| `type` | | `string` | "text" | | diff --git a/docs/readme/alpha/syntax-highlight.md b/docs/readme/alpha/syntax-highlight.md deleted file mode 100644 index 266686f..0000000 --- a/docs/readme/alpha/syntax-highlight.md +++ /dev/null @@ -1,19 +0,0 @@ -# syntax-highlight - -## Attributes - -| Attribute | -|-----------| -| `auto` | - -## Properties - -| Property | -|----------| -| `json` | - -## Methods - -| Method | Type | -|--------|--------------------------------------| -| `evt` | `(evtName: any, evtData: any): void` | diff --git a/docs/readme/button-send.md b/docs/readme/button-send.md index d7e9253..647fd11 100644 --- a/docs/readme/button-send.md +++ b/docs/readme/button-send.md @@ -8,10 +8,7 @@ includes a _meta object showing whether any modifier keys were used, the element | Attribute | Type | Description | |-----------------|-------------------|--------------------------------------------------| -| `data-*` | `string` | Optional. All data-* attributes are returned in the _meta prop as a _meta.data object.

Standard props (common across all my components): | -| `id` | `string` | Optional. HTML ID, must be unique on page. Included in output _meta prop. | -| `inherit-style` | `string\|boolean` | Optional. Load external styles into component (only useful if using template). If present but empty, will default to './index.css'. Optionally give a URL to load.

Other watched attributes: | -| `name` | `string` | Optional. HTML name attribute. Included in output _meta prop. | +| `inherit-style` | `string\|boolean` | Optional. Load external styles into component (only useful if using template). If present but empty, will default to './index.css'. Optionally give a URL to load. | ## Properties @@ -19,22 +16,24 @@ includes a _meta object showing whether any modifier keys were used, the element |--------------|-----------|------------------------------|--------------|--------------------------------------------------| | `$` | | `function(string): Element` | | Mini jQuery-like shadow dom selector (see constructor) | | `$$` | | `function(string): NodeList` | | Mini jQuery-like shadow dom multi-selector (see constructor) | +| `connected` | | `boolean` | false | True when instance finishes connecting.
Allows initial calls of attributeChangedCallback to be
ignored if needed. | +| `name` | `name` | `string` | | Placeholder for the optional name attribute | | `opts` | | `object` | {} | Runtime configuration settings | | `payload` | `payload` | `any\|string` | | Can be an attribute or property. If used as property, must not use payload attribute in html, aAllows any data to be attached to payload. As an attribute, allows a string only.
By default, all attributes are also created as properties | | `sendEvents` | | `boolean` | true | | | `topic` | `topic` | `string\|undefined` | | The topic to include in the output | | `uib` | | `boolean` | false | Is UIBUILDER for Node-RED loaded? | -| `version` | | `string` | "2024-09-22" | Component version | +| `version` | | `string` | "2024-09-29" | Component version | ## Methods -| Method | Type | Description | -|-------------------------|---------------------------------------|--------------------------------------------------| -| `config` | `(config: object\|undefined): object` | OPTIONAL. Update runtime configuration, return complete config

**config**: If present, partial or full set of options. If undefined, fn returns the current full option settings | -| `createShadowSelectors` | `(): void` | | -| `doInheritStyles` | `(): Promise` | Optionally apply an external linked style sheet (called from connectedCallback)

**url**: The URL for the linked style sheet | -| `ensureId` | `(): void` | Ensure that the component instance has a unique ID & check again if uib loaded | -| `handleClick` | `(evt: PointerEvent): void` | fn to run when the button is clicked

**evt**: The event object | +| Method | Type | Description | +|-------------------------|------------------------------------|--------------------------------------------------| +| `config` | `(config: object\|undefined): any` | OPTIONAL. Update runtime configuration, return complete config

**config**: If present, partial or full set of options. If undefined, fn returns the current full option settings | +| `createShadowSelectors` | `(): void` | Creates the $ and $$ fns that do css selections against the shadow dom | +| `doInheritStyles` | `(): Promise` | Optionally apply an external linked style sheet (called from connectedCallback)

**url**: The URL for the linked style sheet | +| `ensureId` | `(): void` | Ensure that the component instance has a unique ID & check again if uib loaded | +| `handleClick` | `(evt: PointerEvent): void` | fn to run when the button is clicked

**evt**: The event object | ## Events @@ -44,6 +43,7 @@ includes a _meta object showing whether any modifier keys were used, the element | `button-send:click` | | Document object event. evt.details contains the data | | `button-send:connected` | | When an instance of the component is attached to the DOM. `evt.details` contains the details of the element. | | `button-send:disconnected` | | When an instance of the component is removed from the DOM. `evt.details` contains the details of the element. | +| `button-send:ready` | | Alias for connected. The instance can handle property & attribute changes | | `uibuilder.send` | `function` | Sends a msg back to Node-RED if uibuilder available. topic, payload and _meta props may all be set.
NOTE that listeners can be attached either to the `document` or to the specific element instance.

Standard watched attributes (common across all my components): | ## Slots @@ -56,4 +56,4 @@ includes a _meta object showing whether any modifier keys were used, the element | Part | Description | |----------|--------------------------------------------------| -| `button` | Uses the uib-styles.css uibuilder master for variables where available. | +| `button` | Uses the uib-styles.css uibuilder master for variables where available.

See https://github.com/runem/web-component-analyzer?tab=readme-ov-file#-how-to-document-your-components-using-jsdoc | diff --git a/docs/readme/call-out.md b/docs/readme/call-out.md new file mode 100644 index 0000000..6f16d73 --- /dev/null +++ b/docs/readme/call-out.md @@ -0,0 +1,47 @@ +# call-out + +## Attributes + +| Attribute | Type | Description | +|-----------------|-------------------|--------------------------------------------------| +| `inherit-style` | `string\|boolean` | Optional. Load external styles into component (only useful if using template). If present but empty, will default to './index.css'. Optionally give a URL to load. | +| `title` | `string` | Optional. If present, will override the callout title text

Standard props (common across all my components): | + +## Properties + +| Property | Attribute | Type | Default | Description | +|-------------|-----------|------------------------------|--------------|--------------------------------------------------| +| `$` | | `function(string): Element` | | Mini jQuery-like shadow dom selector (see constructor) | +| `$$` | | `function(string): NodeList` | | Mini jQuery-like shadow dom multi-selector (see constructor) | +| `connected` | | `boolean` | false | True when instance finishes connecting.
Allows initial calls of attributeChangedCallback to be
ignored if needed. | +| `icon` | `icon` | `string` | "" | Optional. If present, will override the callout title icon

Non-watched but still used attributes: | +| `name` | `name` | `string` | | Placeholder for the optional name attribute | +| `opts` | | `object` | {} | Runtime configuration settings | +| `type` | `type` | `string` | "" | Optional. If present, a title will be added above other child content | +| `uib` | | `boolean` | false | Is UIBUILDER for Node-RED loaded? | +| `version` | | `string` | "2024-09-29" | Component version | + +## Methods + +| Method | Type | Description | +|-------------------------|------------------------------------|--------------------------------------------------| +| `config` | `(config: object\|undefined): any` | OPTIONAL. Update runtime configuration, return complete config

**config**: If present, partial or full set of options. If undefined, fn returns the current full option settings | +| `createShadowSelectors` | `(): void` | Creates the $ and $$ fns that do css selections against the shadow dom | +| `doInheritStyles` | `(): Promise` | Optionally apply an external linked style sheet (called from connectedCallback)

**url**: The URL for the linked style sheet | +| `doType` | `(type: any): void` | | +| `ensureId` | `(): void` | Ensure that the component instance has a unique ID & check again if uib loaded | + +## Events + +| Event | Description | +|--------------------------|--------------------------------------------------| +| `call-out:attribChanged` | When a watched attribute changes. `evt.details` contains the details of the change.
NOTE that listeners can be attached either to the `document` or to the specific element instance.

Standard watched attributes (common across all my components): | +| `call-out:connected` | When an instance of the component is attached to the DOM. `evt.details` contains the details of the element. | +| `call-out:disconnected` | When an instance of the component is removed from the DOM. `evt.details` contains the details of the element. | +| `call-out:ready` | Alias for connected. The instance can handle property & attribute changes | + +## Slots + +| Name | Description | +|------|--------------------------------------------------| +| | Container contents

See https://github.com/runem/web-component-analyzer?tab=readme-ov-file#-how-to-document-your-components-using-jsdoc | diff --git a/docs/readme/collapsible-headings.md b/docs/readme/collapsible-headings.md index 81140f8..8391d8b 100644 --- a/docs/readme/collapsible-headings.md +++ b/docs/readme/collapsible-headings.md @@ -4,29 +4,31 @@ | Attribute | Type | Description | |-----------------|-------------------|--------------------------------------------------| -| `inherit-style` | `string\|boolean` | Optional. Load external styles into component (only useful if using template). If present but empty, will default to './index.css'. Optionally give a URL to load.

Other watched attributes: | +| `inherit-style` | `string\|boolean` | Optional. Load external styles into component (only useful if using template). If present but empty, will default to './index.css'. Optionally give a URL to load. | ## Properties -| Property | Attribute | Type | Default | Description | -|-----------|-----------|------------------------------|------------------|--------------------------------------------------| -| `$` | | `function(string): Element` | | Mini jQuery-like shadow dom selector (see constructor) | -| `$$` | | `function(string): NodeList` | | Mini jQuery-like shadow dom multi-selector (see constructor) | -| `levels` | `levels` | `string` | "h2, h3, h4, h5" | Optional. Default='h2, h3, h4, h5'. A single string detailing the heading levels to make collapsible.

Standard props (common across all my components): | -| `opts` | | `object` | {} | Runtime configuration settings | -| `uib` | | `boolean` | false | Is UIBUILDER for Node-RED loaded? | -| `version` | | `string` | "2024-09-24" | Component version | +| Property | Attribute | Type | Default | Description | +|-------------|-----------|------------------------------|------------------|--------------------------------------------------| +| `$` | | `function(string): Element` | | Mini jQuery-like shadow dom selector (see constructor) | +| `$$` | | `function(string): NodeList` | | Mini jQuery-like shadow dom multi-selector (see constructor) | +| `connected` | | `boolean` | false | True when instance finishes connecting.
Allows initial calls of attributeChangedCallback to be
ignored if needed. | +| `levels` | `levels` | `string` | "h2, h3, h4, h5" | Optional. Default='h2, h3, h4, h5'. A single string detailing the heading levels to make collapsible.

Standard props (common across all my components): | +| `name` | `name` | `string` | | Placeholder for the optional name attribute | +| `opts` | | `object` | {} | Runtime configuration settings | +| `uib` | | `boolean` | false | Is UIBUILDER for Node-RED loaded? | +| `version` | | `string` | "2024-09-29" | Component version | ## Methods -| Method | Type | Description | -|-------------------------|---------------------------------------|--------------------------------------------------| -| `config` | `(config: object\|undefined): object` | OPTIONAL. Update runtime configuration, return complete config

**config**: If present, partial or full set of options. If undefined, fn returns the current full option settings | -| `createShadowSelectors` | `(): void` | | -| `doInheritStyles` | `(): Promise` | Optionally apply an external linked style sheet (called from connectedCallback)

**url**: The URL for the linked style sheet | -| `ensureId` | `(): void` | Ensure that the component instance has a unique ID & check again if uib loaded | -| `processElement` | `(element: HTMLElement): void` | Process each found element node. Adds pointer cursor to the heading and wraps content in a div that can be collapsed.

**element**: The HTML element to process | -| `processSlotContent` | `(): void` | Walk through slot content.
Called once when connected and then every time slot content changes
param {*} records Mutated records
param {*} observer Reference to the observer object | +| Method | Type | Description | +|-------------------------|------------------------------------|--------------------------------------------------| +| `config` | `(config: object\|undefined): any` | OPTIONAL. Update runtime configuration, return complete config

**config**: If present, partial or full set of options. If undefined, fn returns the current full option settings | +| `createShadowSelectors` | `(): void` | Creates the $ and $$ fns that do css selections against the shadow dom | +| `doInheritStyles` | `(): Promise` | Optionally apply an external linked style sheet (called from connectedCallback)

**url**: The URL for the linked style sheet | +| `ensureId` | `(): void` | Ensure that the component instance has a unique ID & check again if uib loaded | +| `processElement` | `(element: HTMLElement): void` | Process each found element node. Adds pointer cursor to the heading and wraps content in a div that can be collapsed.

**element**: The HTML element to process | +| `processSlotContent` | `(): void` | Walk through slot content.
Called once when connected and then every time slot content changes
param {*} records Mutated records
param {*} observer Reference to the observer object | ## Events @@ -35,6 +37,7 @@ | `collapsible-headings:attribChanged` | When a watched attribute changes. `evt.details` contains the details of the change.
NOTE that listeners can be attached either to the `document` or to the specific element instance.

Standard watched attributes (common across all my components): | | `collapsible-headings:connected` | When an instance of the component is attached to the DOM. `evt.details` contains the details of the element. | | `collapsible-headings:disconnected` | When an instance of the component is removed from the DOM. `evt.details` contains the details of the element. | +| `component-template:ready` | Alias for connected. The instance can handle property & attribute changes | ## Slots diff --git a/docs/readme/component-template.md b/docs/readme/component-template.md index 31a892e..85f4e10 100644 --- a/docs/readme/component-template.md +++ b/docs/readme/component-template.md @@ -4,50 +4,61 @@ ```html + +METHODS FROM BASE: ``` ## Attributes | Attribute | Type | Description | |-----------------|-------------------|--------------------------------------------------| -| `inherit-style` | `string\|boolean` | Optional. Load external styles into component (only useful if using template). If present but empty, will default to './index.css'. Optionally give a URL to load.
Other watched attributes:
None

Standard props (common across all my components): | +| `inherit-style` | `string\|boolean` | Optional. Load external styles into component (only useful if using template). If present but empty, will default to './index.css'. Optionally give a URL to load. | ## Properties -| Property | Type | Default | Description | -|-------------------|------------------------------|--------------------------------------------------|--------------------------------------------------| -| `$` | `function(string): Element` | | Mini jQuery-like shadow dom selector (see constructor) | -| `$$` | `function(string): NodeList` | | Mini jQuery-like shadow dom multi-selector (see constructor) | -| `bgColors` | `object` | {"info":"hsl(92, 100, 50, 0.3)","warn":"hsl(39, 100, 50, 0.3)","error":"hsl(0, 100, 50, 0.3)"} | | -| `colors` | `object` | {"log":"green","error":"red","warn":"orange"} | | -| `icons` | `object` | {"log":"> ","info":"ℹ️ ","debug":"🪲 ","trace":"👓 ","warn":"⚠️ ","error":"⛔ "} | | -| `opts` | `object` | {} | Is UIBUILDER for Node-RED loaded? | -| `originalConsole` | `object` | {} | | -| `uib` | `boolean` | false | Is UIBUILDER for Node-RED loaded? | -| `version` | `string` | "2024-09-21" | Component version | -| `wrapper` | `any \| any` | | | +| Property | Attribute | Type | Default | Description | +|-------------------|-----------|------------------------------|--------------------------------------------------|--------------------------------------------------| +| `$` | | `function(string): Element` | | Mini jQuery-like shadow dom selector (see constructor) | +| `$$` | | `function(string): NodeList` | | Mini jQuery-like shadow dom multi-selector (see constructor) | +| `bgColors` | | `object` | {"info":"hsl(92, 100, 50, 0.3)","warn":"hsl(39, 100, 50, 0.3)","error":"hsl(0, 100, 50, 0.3)"} | | +| `colors` | | `object` | {"log":"green","error":"red","warn":"orange"} | | +| `connected` | | `boolean` | false | True when instance finishes connecting.
Allows initial calls of attributeChangedCallback to be
ignored if needed. | +| `icons` | | `object` | {"log":"> ","info":"ℹ️ ","debug":"🪲 ","trace":"👓 ","warn":"⚠️ ","error":"⛔ "} | | +| `name` | `name` | `string` | | Placeholder for the optional name attribute | +| `opts` | | `object` | {} | Runtime configuration settings | +| `originalConsole` | | `object` | {} | | +| `uib` | | `boolean` | false | Is UIBUILDER for Node-RED loaded? | +| `version` | | `string` | "2024-09-29" | Component version | +| `wrapper` | | `any \| any` | | | ## Methods -| Method | Type | Description | -|-------------------------|---------------------------------------|--------------------------------------------------| -| `checkType` | `(input: *): string` | Find out the input JavaScript var type

**input**: The JavaScript var to type | -| `config` | `(config: object\|undefined): object` | OPTIONAL. Update runtime configuration, return complete config

**config**: If present, partial or full set of options. If undefined, fn returns the current full option settings | -| `createHTMLVisualizer` | `(input: *): HTMLDivElement` | Creates an HTML visualisation of the input

**input**: undefined | -| `createShadowSelectors` | `(): void` | | -| `doInheritStyles` | `(): Promise` | Optionally apply an external linked style sheet (called from connectedCallback)

**url**: The URL for the linked style sheet | -| `ensureId` | `(): void` | Ensure that the component instance has a unique ID & check again if uib loaded | -| `newLog` | `(type: string, args: string): void` | Creates a new HTML log entry

**type**: The log type
**args**: The arguments to log | -| `redirectConsole` | `(): void` | Capture console.xxxx and write to the div | +| Method | Type | Description | +|-------------------------|--------------------------------------|--------------------------------------------------| +| `checkType` | `(input: *): string` | Find out the input JavaScript var type

**input**: The JavaScript var to type | +| `config` | `(config: object\|undefined): any` | OPTIONAL. Update runtime configuration, return complete config

**config**: If present, partial or full set of options. If undefined, fn returns the current full option settings | +| `createHTMLVisualizer` | `(input: *): HTMLDivElement` | Creates an HTML visualisation of the input

**input**: undefined | +| `createShadowSelectors` | `(): void` | Creates the $ and $$ fns that do css selections against the shadow dom | +| `doInheritStyles` | `(): Promise` | Optionally apply an external linked style sheet (called from connectedCallback)

**url**: The URL for the linked style sheet | +| `ensureId` | `(): void` | Ensure that the component instance has a unique ID & check again if uib loaded | +| `newLog` | `(type: string, args: string): void` | Creates a new HTML log entry

**type**: The log type
**args**: The arguments to log | +| `redirectConsole` | `(): void` | Capture console.xxxx and write to the div | ## Events | Event | Description | |---------------------------------|--------------------------------------------------| +| `component-template:ready` | Alias for connected. The instance can handle property & attribute changes | | `visible-console:attribChanged` | When a watched attribute changes. `evt.details` contains the details of the change.
NOTE that listeners can be attached either to the `document` or to the specific element instance.

Standard watched attributes (common across all my components): | | `visible-console:connected` | When an instance of the component is attached to the DOM. `evt.details` contains the details of the element. | | `visible-console:disconnected` | When an instance of the component is removed from the DOM. `evt.details` contains the details of the element. | +## Slots + +| Name | Description | +|------|--------------------------------------------------| +| | No slot

See https://github.com/runem/web-component-analyzer?tab=readme-ov-file#-how-to-document-your-components-using-jsdoc | + # visible-console @@ -55,46 +66,57 @@ ```html + +METHODS FROM BASE: ``` ## Attributes | Attribute | Type | Description | |-----------------|-------------------|--------------------------------------------------| -| `inherit-style` | `string\|boolean` | Optional. Load external styles into component (only useful if using template). If present but empty, will default to './index.css'. Optionally give a URL to load.
Other watched attributes:
None

Standard props (common across all my components): | +| `inherit-style` | `string\|boolean` | Optional. Load external styles into component (only useful if using template). If present but empty, will default to './index.css'. Optionally give a URL to load. | ## Properties -| Property | Type | Default | Description | -|-------------------|------------------------------|--------------------------------------------------|--------------------------------------------------| -| `$` | `function(string): Element` | | Mini jQuery-like shadow dom selector (see constructor) | -| `$$` | `function(string): NodeList` | | Mini jQuery-like shadow dom multi-selector (see constructor) | -| `bgColors` | `object` | {"info":"hsl(92, 100, 50, 0.3)","warn":"hsl(39, 100, 50, 0.3)","error":"hsl(0, 100, 50, 0.3)"} | | -| `colors` | `object` | {"log":"green","error":"red","warn":"orange"} | | -| `icons` | `object` | {"log":"> ","info":"ℹ️ ","debug":"🪲 ","trace":"👓 ","warn":"⚠️ ","error":"⛔ "} | | -| `opts` | `object` | {} | Is UIBUILDER for Node-RED loaded? | -| `originalConsole` | `object` | {} | | -| `uib` | `boolean` | false | Is UIBUILDER for Node-RED loaded? | -| `version` | `string` | "2024-09-21" | Component version | -| `wrapper` | `any \| any` | | | +| Property | Attribute | Type | Default | Description | +|-------------------|-----------|------------------------------|--------------------------------------------------|--------------------------------------------------| +| `$` | | `function(string): Element` | | Mini jQuery-like shadow dom selector (see constructor) | +| `$$` | | `function(string): NodeList` | | Mini jQuery-like shadow dom multi-selector (see constructor) | +| `bgColors` | | `object` | {"info":"hsl(92, 100, 50, 0.3)","warn":"hsl(39, 100, 50, 0.3)","error":"hsl(0, 100, 50, 0.3)"} | | +| `colors` | | `object` | {"log":"green","error":"red","warn":"orange"} | | +| `connected` | | `boolean` | false | True when instance finishes connecting.
Allows initial calls of attributeChangedCallback to be
ignored if needed. | +| `icons` | | `object` | {"log":"> ","info":"ℹ️ ","debug":"🪲 ","trace":"👓 ","warn":"⚠️ ","error":"⛔ "} | | +| `name` | `name` | `string` | | Placeholder for the optional name attribute | +| `opts` | | `object` | {} | Runtime configuration settings | +| `originalConsole` | | `object` | {} | | +| `uib` | | `boolean` | false | Is UIBUILDER for Node-RED loaded? | +| `version` | | `string` | "2024-09-29" | Component version | +| `wrapper` | | `any \| any` | | | ## Methods -| Method | Type | Description | -|-------------------------|---------------------------------------|--------------------------------------------------| -| `checkType` | `(input: *): string` | Find out the input JavaScript var type

**input**: The JavaScript var to type | -| `config` | `(config: object\|undefined): object` | OPTIONAL. Update runtime configuration, return complete config

**config**: If present, partial or full set of options. If undefined, fn returns the current full option settings | -| `createHTMLVisualizer` | `(input: *): HTMLDivElement` | Creates an HTML visualisation of the input

**input**: undefined | -| `createShadowSelectors` | `(): void` | | -| `doInheritStyles` | `(): Promise` | Optionally apply an external linked style sheet (called from connectedCallback)

**url**: The URL for the linked style sheet | -| `ensureId` | `(): void` | Ensure that the component instance has a unique ID & check again if uib loaded | -| `newLog` | `(type: string, args: string): void` | Creates a new HTML log entry

**type**: The log type
**args**: The arguments to log | -| `redirectConsole` | `(): void` | Capture console.xxxx and write to the div | +| Method | Type | Description | +|-------------------------|--------------------------------------|--------------------------------------------------| +| `checkType` | `(input: *): string` | Find out the input JavaScript var type

**input**: The JavaScript var to type | +| `config` | `(config: object\|undefined): any` | OPTIONAL. Update runtime configuration, return complete config

**config**: If present, partial or full set of options. If undefined, fn returns the current full option settings | +| `createHTMLVisualizer` | `(input: *): HTMLDivElement` | Creates an HTML visualisation of the input

**input**: undefined | +| `createShadowSelectors` | `(): void` | Creates the $ and $$ fns that do css selections against the shadow dom | +| `doInheritStyles` | `(): Promise` | Optionally apply an external linked style sheet (called from connectedCallback)

**url**: The URL for the linked style sheet | +| `ensureId` | `(): void` | Ensure that the component instance has a unique ID & check again if uib loaded | +| `newLog` | `(type: string, args: string): void` | Creates a new HTML log entry

**type**: The log type
**args**: The arguments to log | +| `redirectConsole` | `(): void` | Capture console.xxxx and write to the div | ## Events | Event | Description | |---------------------------------|--------------------------------------------------| +| `component-template:ready` | Alias for connected. The instance can handle property & attribute changes | | `visible-console:attribChanged` | When a watched attribute changes. `evt.details` contains the details of the change.
NOTE that listeners can be attached either to the `document` or to the specific element instance.

Standard watched attributes (common across all my components): | | `visible-console:connected` | When an instance of the component is attached to the DOM. `evt.details` contains the details of the element. | | `visible-console:disconnected` | When an instance of the component is removed from the DOM. `evt.details` contains the details of the element. | + +## Slots + +| Name | Description | +|------|--------------------------------------------------| +| | No slot

See https://github.com/runem/web-component-analyzer?tab=readme-ov-file#-how-to-document-your-components-using-jsdoc | diff --git a/docs/readme/html-include.md b/docs/readme/html-include.md new file mode 100644 index 0000000..4aa64dc --- /dev/null +++ b/docs/readme/html-include.md @@ -0,0 +1,48 @@ +# html-include + +## Attributes + +| Attribute | Type | Description | +|-----------------|-------------------|--------------------------------------------------| +| `inherit-style` | `string\|boolean` | Optional. Load external styles into component (only useful if using template). If present but empty, will default to './index.css'. Optionally give a URL to load. | + +## Properties + +| Property | Attribute | Type | Default | Description | +|---------------|-----------|----------------------------------|--------------|--------------------------------------------------| +| `$` | | `function(string): Element` | | Mini jQuery-like shadow dom selector (see constructor) | +| `$$` | | `function(string): NodeList` | | Mini jQuery-like shadow dom multi-selector (see constructor) | +| `connected` | | `boolean` | false | True when instance finishes connecting.
Allows initial calls of attributeChangedCallback to be
ignored if needed. | +| `contentType` | | `"text"\|"html"\|"json"\|"form"` | "text" | Content type of the imported resource | +| `json` | | `object` | {} | | +| `name` | `name` | `string` | | Placeholder for the optional name attribute | +| `opts` | | `object` | {} | Runtime configuration settings | +| `src` | `src` | `string` | | The URL to fetch an HTML document from. Allows change via instance prop as well as attribute change.
Setting this property causes a fetch the HTML from the URL.
We are reflecting the src attrib and the src prop. | +| `text` | | `string` | "" | | +| `uib` | | `boolean` | false | Is UIBUILDER for Node-RED loaded? | +| `version` | | `string` | "2024-09-29" | Component version | + +## Methods + +| Method | Type | Description | +|-------------------------|---------------------------------------|--------------------------------------------------| +| `config` | `(config: object\|undefined): any` | OPTIONAL. Update runtime configuration, return complete config

**config**: If present, partial or full set of options. If undefined, fn returns the current full option settings | +| `createShadowSelectors` | `(): void` | Creates the $ and $$ fns that do css selections against the shadow dom | +| `doInclude` | `(url: string \| URL): Promise` | Replaces the shadow dom content with the imported HTML.

**url**: URL of the resource to import | +| `doInheritStyles` | `(): Promise` | Optionally apply an external linked style sheet (called from connectedCallback)

**url**: The URL for the linked style sheet | +| `ensureId` | `(): void` | Ensure that the component instance has a unique ID & check again if uib loaded | + +## Events + +| Event | Description | +|------------------------------|--------------------------------------------------| +| `component-template:ready` | Alias for connected. The instance can handle property & attribute changes | +| `html-include:attribChanged` | When a watched attribute changes. `evt.details` contains the details of the change.
NOTE that listeners can be attached either to the `document` or to the specific element instance.

Standard watched attributes (common across all my components): | +| `html-include:connected` | When an instance of the component is attached to the DOM. `evt.details` contains the details of the element. | +| `html-include:disconnected` | When an instance of the component is removed from the DOM. `evt.details` contains the details of the element. | + +## Slots + +| Name | Description | +|------|--------------------------------------------------| +| | Container contents

See https://github.com/runem/web-component-analyzer?tab=readme-ov-file#-how-to-document-your-components-using-jsdoc | diff --git a/docs/readme/syntax-highlight.md b/docs/readme/syntax-highlight.md new file mode 100644 index 0000000..e1c8901 --- /dev/null +++ b/docs/readme/syntax-highlight.md @@ -0,0 +1,56 @@ +# syntax-highlight + +## Example + +```javascript +Set the json property on the element +const showMsg = document.getElementsByTagName('syntax-highlight')[0] +showMsg.json({....}) + +METHODS FROM BASE: +``` + +## Attributes + +| Attribute | Type | Description | +|-----------------|-------------------|--------------------------------------------------| +| `auto` | | | +| `inherit-style` | `string\|boolean` | Optional. Load external styles into component (only useful if using template). If present but empty, will default to './index.css'. Optionally give a URL to load. | + +## Properties + +| Property | Attribute | Type | Default | Description | +|-------------|-----------|------------------------------|--------------|--------------------------------------------------| +| `$` | | `function(string): Element` | | Mini jQuery-like shadow dom selector (see constructor) | +| `$$` | | `function(string): NodeList` | | Mini jQuery-like shadow dom multi-selector (see constructor) | +| `connected` | | `boolean` | false | True when instance finishes connecting.
Allows initial calls of attributeChangedCallback to be
ignored if needed. | +| `json` | | | | Element.json = {...} to show the json object | +| `jsonData` | | `object` | {} | | +| `name` | `name` | `string` | | Placeholder for the optional name attribute | +| `opts` | | `object` | {} | Runtime configuration settings | +| `uib` | | `boolean` | false | Is UIBUILDER for Node-RED loaded? | +| `version` | | `string` | "2024-09-29" | Component version | + +## Methods + +| Method | Type | Description | +|-------------------------|------------------------------------|--------------------------------------------------| +| `config` | `(config: object\|undefined): any` | OPTIONAL. Update runtime configuration, return complete config

**config**: If present, partial or full set of options. If undefined, fn returns the current full option settings | +| `createShadowSelectors` | `(): void` | Creates the $ and $$ fns that do css selections against the shadow dom | +| `doInheritStyles` | `(): Promise` | Optionally apply an external linked style sheet (called from connectedCallback)

**url**: The URL for the linked style sheet | +| `ensureId` | `(): void` | Ensure that the component instance has a unique ID & check again if uib loaded | + +## Events + +| Event | Description | +|----------------------------------|--------------------------------------------------| +| `component-template:ready` | Alias for connected. The instance can handle property & attribute changes | +| `syntax-highlight:attribChanged` | When a watched attribute changes. `evt.details` contains the details of the change.
NOTE that listeners can be attached either to the `document` or to the specific element instance.

Standard watched attributes (common across all my components): | +| `syntax-highlight:connected` | When an instance of the component is attached to the DOM. `evt.details` contains the details of the element. | +| `syntax-highlight:disconnected` | When an instance of the component is removed from the DOM. `evt.details` contains the details of the element. | + +## Slots + +| Name | Description | +|------|--------------------------------------------------| +| | Container contents

See https://github.com/runem/web-component-analyzer?tab=readme-ov-file#-how-to-document-your-components-using-jsdoc | diff --git a/vscode-descriptors/ti-web-components.html-data.json b/vscode-descriptors/ti-web-components.html-data.json index 0c95227..427dcfc 100644 --- a/vscode-descriptors/ti-web-components.html-data.json +++ b/vscode-descriptors/ti-web-components.html-data.json @@ -63,17 +63,25 @@ }, { "name": "component-template", - "description": "Events:\n\n * `component-template:connected` {} - When an instance of the component is attached to the DOM. `evt.details` contains the details of the element.\n\n * `component-template:disconnected` {} - When an instance of the component is removed from the DOM. `evt.details` contains the details of the element.\n\n * `component-template:attribChanged` {} - When a watched attribute changes. `evt.details` contains the details of the change.\nNOTE that listeners can be attached either to the `document` or to the specific element instance.\n\nStandard watched attributes (common across all my components):\n\nSlots:\n\n * ` ` {} - Container contents\n\nSee https://github.com/runem/web-component-analyzer?tab=readme-ov-file#-how-to-document-your-components-using-jsdoc\n\nAttributes:\n\n * `inherit-style` {string|boolean} - Optional. Load external styles into component (only useful if using template). If present but empty, will default to './index.css'. Optionally give a URL to load.\n\nOther watched attributes:\nNone\n\nStandard props (common across all my components):\n\nProperties:\n\n * `baseVersion` {`string`} - Component version\n\n * `uib` {`boolean`} - Is UIBUILDER for Node-RED loaded?\n\n * `$` {function(string): Element} - Mini jQuery-like shadow dom selector (see constructor)\n\n * `$$` {function(string): NodeList} - Mini jQuery-like shadow dom multi-selector (see constructor)\n\n * `_iCount` {`number`} - Holds a count of how many instances of this component are on the page that don't have their own id\nUsed to ensure a unique id if needing to add one dynamically\n\n * `opts` - Runtime configuration settings\n\n * `version` {`string`} - Component version", + "description": "Events:\n\n * `component-template:connected` {} - When an instance of the component is attached to the DOM. `evt.details` contains the details of the element.\n\n * `component-template:ready` {} - Alias for connected. The instance can handle property & attribute changes\n\n * `component-template:disconnected` {} - When an instance of the component is removed from the DOM. `evt.details` contains the details of the element.\n\n * `component-template:attribChanged` {} - When a watched attribute changes. `evt.details` contains the details of the change.\nNOTE that listeners can be attached either to the `document` or to the specific element instance.\n\nStandard watched attributes (common across all my components):\n\nSlots:\n\n * ` ` {} - Container contents\n\nSee https://github.com/runem/web-component-analyzer?tab=readme-ov-file#-how-to-document-your-components-using-jsdoc\n\nAttributes:\n\n * `name` {string} - Placeholder for the optional name attribute\n\n * `inherit-style` {string|boolean} - Optional. Load external styles into component (only useful if using template). If present but empty, will default to './index.css'. Optionally give a URL to load.\n\nProperties:\n\n * `baseVersion` {`string`} - Component version\n\n * `_iCount` {`number`} - Holds a count of how many instances of this component are on the page that don't have their own id\nUsed to ensure a unique id if needing to add one dynamically\n\n * `uib` {`boolean`} - Is UIBUILDER for Node-RED loaded?\n\n * `$` {function(string): Element} - Mini jQuery-like shadow dom selector (see constructor)\n\n * `$$` {function(string): NodeList} - Mini jQuery-like shadow dom multi-selector (see constructor)\n\n * `connected` {`boolean`} - True when instance finishes connecting.\nAllows initial calls of attributeChangedCallback to be\nignored if needed.\n\n * `name` {string} - Placeholder for the optional name attribute\n\n * `opts` {object} - Runtime configuration settings\n\n * `version` {`string`} - Component version", "attributes": [ + { + "name": "name", + "description": "`name` {string} - Placeholder for the optional name attribute\n\nProperty: name" + }, { "name": "inherit-style", - "description": "`inherit-style` {string|boolean} - Optional. Load external styles into component (only useful if using template). If present but empty, will default to './index.css'. Optionally give a URL to load.\n\nOther watched attributes:\nNone\n\nStandard props (common across all my components):\n\n", + "description": "`inherit-style` {string|boolean} - Optional. Load external styles into component (only useful if using template). If present but empty, will default to './index.css'. Optionally give a URL to load.\n\n", "values": [] }, { "name": "oncomponent-template:connected", "description": "`component-template:connected` {} - When an instance of the component is attached to the DOM. `evt.details` contains the details of the element." }, + { + "name": "oncomponent-template:ready", + "description": "`component-template:ready` {} - Alias for connected. The instance can handle property & attribute changes" + }, { "name": "oncomponent-template:disconnected", "description": "`component-template:disconnected` {} - When an instance of the component is removed from the DOM. `evt.details` contains the details of the element." @@ -84,46 +92,6 @@ } ] }, - { - "name": "container-br", - "description": "Events:\n\n * `container-br:construction` {} - Document object event. evt.details contains the data\n\n * `container-br:connected` {} - When an instance of the component is attached to the DOM. `evt.details` contains the details of the element.\n\n * `container-br:disconnected` {} - When an instance of the component is removed from the DOM. `evt.details` contains the details of the element.\n\n * `container-br:attribChanged` {} - When a watched attribute changes. `evt.details` contains the details of the change.\nNOTE that listeners can be attached either to the `document` or to the specific element instance.\n\nSlots:\n\n * ` ` {} - Container contents\n\nAttributes:\n\n * `data-*` {string} name - Optional. Will be used to synthesize an ID if no ID is provided.\nattr {string} - Optional. All data-* attributes are returned in the _meta prop as a _meta.data object.\n\nProperties:\n\n * `name` {string} - Sync'd from name attribute", - "attributes": [ - { - "name": "data-*", - "description": "`data-*` {string} name - Optional. Will be used to synthesize an ID if no ID is provided.\nattr {string} - Optional. All data-* attributes are returned in the _meta prop as a _meta.data object.\n\n" - }, - { - "name": "oncontainer-br:construction", - "description": "`container-br:construction` {} - Document object event. evt.details contains the data" - }, - { - "name": "oncontainer-br:connected", - "description": "`container-br:connected` {} - When an instance of the component is attached to the DOM. `evt.details` contains the details of the element." - }, - { - "name": "oncontainer-br:disconnected", - "description": "`container-br:disconnected` {} - When an instance of the component is removed from the DOM. `evt.details` contains the details of the element." - }, - { - "name": "oncontainer-br:attribChanged", - "description": "`container-br:attribChanged` {} - When a watched attribute changes. `evt.details` contains the details of the change.\nNOTE that listeners can be attached either to the `document` or to the specific element instance." - } - ] - }, - { - "name": "data-list", - "description": "Attributes:\n\n * `listvar` {} - \n\n * `type` {} - \n\nProperties:\n\n * `data` - \n\n * `_list` - \n\n * `_entries` - ", - "attributes": [ - { - "name": "listvar", - "description": "`listvar` {} - \n\n" - }, - { - "name": "type", - "description": "`type` {} - \n\n" - } - ] - }, { "name": "button-send", "description": "A Zero dependency button web component that sends a msg or a document event when clicked.\nContains relevant data from data-*, topic and payload attributes (or properties),\nincludes a _meta object showing whether any modifier keys were used, the element id/name\n\nEvents:\n\n * `button-send:click` {`CustomEvent<{ topic: any; payload: any; _meta: { id: string; name: string | null; data: { [x: string]: string | undefined; }; }; }>`} - Document object event. evt.details contains the data\n\n * `uibuilder.send` - Sends a msg back to Node-RED if uibuilder available. topic, payload and _meta props may all be set.\n\nSlots:\n\n * `default` {} - Button label. Allows text, inline and most block tags to be included (unlike the standard button tag which only allows inline tags).\n\nAttributes:\n\n * `payload` {any|string} - Can be an attribute or property. If used as property, must not use payload attribute in html, aAllows any data to be attached to payload. As an attribute, allows a string only.\n\n * `id` {string} - Optional. HTML ID, must be unique on page. Included in output _meta prop.\n\n * `name` {string} - Optional. HTML name attribute. Included in output _meta prop.\n\n * `data-*` {string} - Optional. All data-* attributes are returned in the _meta prop as a _meta.data object.\n\n * `topic` {string} - Optional. Topic string to use. Mostly for node-red messages\n\nProperties:\n\n * `payload` {any|string} - Can be an attribute or property. If used as property, must not use payload attribute in html, aAllows any data to be attached to payload. As an attribute, allows a string only.\n\n * `_data` - \n\n * `_name` - \n\n * `_msg` - \n\n * `_clickEvt` {`CustomEvent<{ topic: any; payload: any; _meta: { id: string; name: string | null; data: {}; }; }>`} - ", @@ -202,6 +170,20 @@ } ] }, + { + "name": "data-list", + "description": "Attributes:\n\n * `listvar` {} - \n\n * `type` {} - \n\nProperties:\n\n * `data` - \n\n * `_list` - \n\n * `_entries` - ", + "attributes": [ + { + "name": "listvar", + "description": "`listvar` {} - \n\n" + }, + { + "name": "type", + "description": "`type` {} - \n\n" + } + ] + }, { "name": "gauge-steel", "description": "Events:\n\n * `gauge-steel:construction` {} - Document object event. evt.details contains the data\n\n * `gauge-steel:connected` {} - When an instance of the component is attached to the DOM. `evt.details` contains the details of the element.\n\n * `gauge-steel:disconnected` {} - When an instance of the component is removed from the DOM. `evt.details` contains the details of the element.\n\n * `gauge-steel:attribChanged` {} - When a watched attribute changes. `evt.details` contains the details of the change.\nNOTE that listeners can be attached either to the `document` or to the specific element instance.\n\nSlots:\n\n * ` ` {} - Container contents\n\nAttributes:\n\n * `name` {string} - Sync'd from name attribute\n\n * `data-*` {string} name - Optional. Will be used to synthesize an ID if no ID is provided.\nattr {string} - Optional. All data-* attributes are returned in the _meta prop as a _meta.data object.\n\nProperties:\n\n * `_ui` {`{ type: string; event: undefined; id: undefined; name: undefined; data: undefined; }`} - Standard _ui object to include in msgs\n\n * `_iCount` {`number`} - Holds a count of how many instances of this component are on the page\n\n * `name` {string} - Sync'd from name attribute\n\n * `$` - Mini jQuery-like shadow dom selector (see constructor)", @@ -310,17 +292,6 @@ } ] }, - { - "name": "html-include", - "description": "Attributes:\n\n * `src` {`string | null`} - The URL to fetch an HTML document from.\nSetting this property causes a fetch the HTML from the URL.\nWe are reflecting the src attrib and the src prop.\n\nProperties:\n\n * `src` {`string | null`} - The URL to fetch an HTML document from.\nSetting this property causes a fetch the HTML from the URL.\nWe are reflecting the src attrib and the src prop.\n\n * `type` {`string`} - \n\n * `text` {`string`} - \n\n * `json` - ", - "attributes": [ - { - "name": "src", - "description": "`src` {`string | null`} - The URL to fetch an HTML document from.\nSetting this property causes a fetch the HTML from the URL.\nWe are reflecting the src attrib and the src prop.\n\nProperty: src", - "values": [] - } - ] - }, { "name": "labelled-value", "description": "Events:\n\n * `labelled-value:construction` {} - Document object event. evt.details contains the data\n\n * `labelled-value:connected` {} - When an instance of the component is attached to the DOM. `evt.details` contains the details of the element.\n\n * `labelled-value:disconnected` {} - When an instance of the component is removed from the DOM. `evt.details` contains the details of the element.\n\n * `labelled-value:attribChanged` {} - When a watched attribute changes. `evt.details` contains the details of the change.\nNOTE that listeners can be attached either to the `document` or to the specific element instance.\n\nSlots:\n\n * ` ` {} - Container contents\n\nAttributes:\n\n * `name` {string} - Sync'd from name attribute\n\n * `label` {`undefined`} - \n\n * `value` {`undefined`} - \n\n * `data-*` {string} name - Optional. Will be used to synthesize an ID if no ID is provided.\nattr {string} - Optional. All data-* attributes are returned in the _meta prop as a _meta.data object.\n\nProperties:\n\n * `_ui` {`{ type: string; event: undefined; id: undefined; name: undefined; data: undefined; }`} - Standard _ui object to include in msgs\n\n * `name` {string} - Sync'd from name attribute\n\n * `label` {`undefined`} - \n\n * `value` {`undefined`} - \n\n * `$` - Mini jQuery-like shadow dom selector (see constructor)", @@ -495,16 +466,6 @@ } ] }, - { - "name": "syntax-highlight", - "description": "Attributes:\n\n * `auto` {} - \n\nProperties:\n\n * `json` - ", - "attributes": [ - { - "name": "auto", - "description": "`auto` {} - \n\n" - } - ] - }, { "name": "component-template", "description": "A uibuilder for Node-RED Theme Changer component\n\nEvents:\n\n * `uib-theme-changer:construction` {} - Document object event. evt.details contains the data\n\n * `uib-theme-changer:connected` {`CustomEvent<{ id: string; name: string | null | undefined; }>`} - When an instance of the component is attached to the DOM. `evt.details` contains the details of the element.\n\n * `uib-theme-changer:disconnected` {`CustomEvent<{ id: string; name: string | null | undefined; }>`} - When an instance of the component is removed from the DOM. `evt.details` contains the details of the element.\n\n * `uib-theme-changer:attribChanged` {`CustomEvent<{ id: string; name: string | null | undefined; attribute: string; newVal: string; oldVal: string; }>`} - When a watched attribute changes. `evt.details` contains the details of the change.\nNOTE that listeners can be attached either to the `document` or to the specific element instance.\n\nAttributes:\n\n * `data-*` {string} name - Optional. Will be used to synthesize an ID if no ID is provided.\nattr {string} - Optional. All data-* attributes are returned in the _meta prop as a _meta.data object.\n\n * `inherit-style` {} - \n\nProperties:\n\n * `name` {string} - Sync'd from name attribute\n\nslot Container contents\n\n * `uib` {`boolean`} - Is UIBUILDER for Node-RED loaded?\n\n * `_iCount` {`number`} - Holds a count of how many instances of this component are on the page that don't have their own id\nUsed to ensure a unique id if needing to add one dynamically\n\n * `opts` - Runtime configuration settings\n\n * `version` {`string`} - Component version\n\n * `uibThemeSettings` - Holds the uib theme settings for all pages in this domain (from/to localStorage)\n\n * `_ui` {`{ type: string; event: undefined; id: undefined; name: undefined; data: undefined; }`} - Standard _ui object to include in msgs\n\n * `scheme` {`undefined`} - What is the current scheme? 'light', 'dark' or 'auto'\n\n * `$` {function(string): Element} - Mini jQuery-like shadow dom selector (see constructor)\n\n * `$$` {function(string): NodeList} - Mini jQuery-like shadow dom multi-selector (see constructor)", @@ -567,7 +528,7 @@ }, { "name": "ti-base-component", - "description": "Attributes:\n\n * `inherit-style` {string|boolean} - Optional. Load external styles into component (only useful if using template). If present but empty, will default to './index.css'. Optionally give a URL to load.\nOther watched attributes:\nNone\n\nStandard props (common across all my components):\n\nProperties:\n\n * `baseVersion` {`string`} - Component version\n\n * `uib` {`boolean`} - Is UIBUILDER for Node-RED loaded?\n\n * `$` {function(string): Element} - Mini jQuery-like shadow dom selector (see constructor)\n\n * `$$` {function(string): NodeList} - Mini jQuery-like shadow dom multi-selector (see constructor)\n\n * `_iCount` {`number`} - Holds a count of how many instances of this component are on the page that don't have their own id\nUsed to ensure a unique id if needing to add one dynamically\n\n * `opts` - Runtime configuration settings\n\n * `version` {`string`} - Report the current component version string", + "description": "Attributes:\n\n * `inherit-style` {string|boolean} - Optional. Load external styles into component (only useful if using template). If present but empty, will default to './index.css'. Optionally give a URL to load.\nOther watched attributes:\nNone\n\nStandard props (common across all my components):\n\nProperties:\n\n * `baseVersion` {`string`} - Component version\n\n * `_iCount` {`number`} - Holds a count of how many instances of this component are on the page that don't have their own id\nUsed to ensure a unique id if needing to add one dynamically\n\n * `uib` {`boolean`} - Is UIBUILDER for Node-RED loaded?\n\n * `$` {function(string): Element} - Mini jQuery-like shadow dom selector (see constructor)\n\n * `$$` {function(string): NodeList} - Mini jQuery-like shadow dom multi-selector (see constructor)\n\n * `connected` {`boolean`} - True when instance finishes connecting.\nAllows initial calls of attributeChangedCallback to be\nignored if needed.\n\n * `name` {string} - Placeholder for the optional name attribute\n\n * `opts` {object} - Runtime configuration settings\n\n * `version` {`string`} - Report the current component version string", "attributes": [ { "name": "inherit-style", @@ -578,7 +539,7 @@ }, { "name": "button-send", - "description": "A Zero dependency button web component that sends a msg or a document event when clicked.\nContains relevant data from data-*, topic and payload attributes (or properties),\nincludes a _meta object showing whether any modifier keys were used, the element id/name\n\nEvents:\n\n * `button-send:connected` {} - When an instance of the component is attached to the DOM. `evt.details` contains the details of the element.\n\n * `button-send:disconnected` {} - When an instance of the component is removed from the DOM. `evt.details` contains the details of the element.\n\n * `button-send:attribChanged` {} - When a watched attribute changes. `evt.details` contains the details of the change.\n\n * `button-send:click` {} - Document object event. evt.details contains the data\n\n * `uibuilder.send` - Sends a msg back to Node-RED if uibuilder available. topic, payload and _meta props may all be set.\nNOTE that listeners can be attached either to the `document` or to the specific element instance.\n\nStandard watched attributes (common across all my components):\n\nSlots:\n\n * `default` {} - Button label. Allows text, inline and most block tags to be included (unlike the standard button tag which only allows inline tags).\n\nAttributes:\n\n * `topic` {string|undefined} - The topic to include in the output\n\n * `payload` {any|string} - Can be an attribute or property. If used as property, must not use payload attribute in html, aAllows any data to be attached to payload. As an attribute, allows a string only.\nBy default, all attributes are also created as properties\n\n * `id` {string} - Optional. HTML ID, must be unique on page. Included in output _meta prop.\n\n * `name` {string} - Optional. HTML name attribute. Included in output _meta prop.\n\n * `data-*` {string} - Optional. All data-* attributes are returned in the _meta prop as a _meta.data object.\n\nStandard props (common across all my components):\n\n * `inherit-style` {string|boolean} - Optional. Load external styles into component (only useful if using template). If present but empty, will default to './index.css'. Optionally give a URL to load.\n\nOther watched attributes:\n\nProperties:\n\n * `sendEvents` {`boolean`} - \n\n * `_ui` {`{ type: string; event: undefined; id: undefined; name: undefined; }`} - Standard _ui object to include in msgs\n\n * `_msg` {object} - The output msg\n\n * `topic` {string|undefined} - The topic to include in the output\n\n * `payload` {any|string} - Can be an attribute or property. If used as property, must not use payload attribute in html, aAllows any data to be attached to payload. As an attribute, allows a string only.\nBy default, all attributes are also created as properties\n\n * `baseVersion` {`string`} - Component version\n\n * `uib` {`boolean`} - Is UIBUILDER for Node-RED loaded?\n\n * `$` {function(string): Element} - Mini jQuery-like shadow dom selector (see constructor)\n\n * `$$` {function(string): NodeList} - Mini jQuery-like shadow dom multi-selector (see constructor)\n\n * `_iCount` {`number`} - Holds a count of how many instances of this component are on the page that don't have their own id\nUsed to ensure a unique id if needing to add one dynamically\n\n * `opts` - Runtime configuration settings\n\n * `version` {`string`} - Component version", + "description": "A Zero dependency button web component that sends a msg or a document event when clicked.\nContains relevant data from data-*, topic and payload attributes (or properties),\nincludes a _meta object showing whether any modifier keys were used, the element id/name\n\nEvents:\n\n * `button-send:connected` {} - When an instance of the component is attached to the DOM. `evt.details` contains the details of the element.\n\n * `button-send:ready` {} - Alias for connected. The instance can handle property & attribute changes\n\n * `button-send:disconnected` {} - When an instance of the component is removed from the DOM. `evt.details` contains the details of the element.\n\n * `button-send:attribChanged` {} - When a watched attribute changes. `evt.details` contains the details of the change.\n\n * `button-send:click` {} - Document object event. evt.details contains the data\n\n * `uibuilder.send` - Sends a msg back to Node-RED if uibuilder available. topic, payload and _meta props may all be set.\nNOTE that listeners can be attached either to the `document` or to the specific element instance.\n\nStandard watched attributes (common across all my components):\n\nSlots:\n\n * `default` {} - Button label. Allows text, inline and most block tags to be included (unlike the standard button tag which only allows inline tags).\n\nAttributes:\n\n * `topic` {string|undefined} - The topic to include in the output\n\n * `payload` {any|string} - Can be an attribute or property. If used as property, must not use payload attribute in html, aAllows any data to be attached to payload. As an attribute, allows a string only.\nBy default, all attributes are also created as properties\n\n * `name` {string} - Placeholder for the optional name attribute\n\n * `inherit-style` {string|boolean} - Optional. Load external styles into component (only useful if using template). If present but empty, will default to './index.css'. Optionally give a URL to load.\n\nProperties:\n\n * `sendEvents` {`boolean`} - \n\n * `_ui` {`{ type: string; event: undefined; id: undefined; name: undefined; }`} - Standard _ui object to include in msgs\n\n * `_msg` {object} - The output msg\n\n * `topic` {string|undefined} - The topic to include in the output\n\n * `payload` {any|string} - Can be an attribute or property. If used as property, must not use payload attribute in html, aAllows any data to be attached to payload. As an attribute, allows a string only.\nBy default, all attributes are also created as properties\n\n * `baseVersion` {`string`} - Component version\n\n * `_iCount` {`number`} - Holds a count of how many instances of this component are on the page that don't have their own id\nUsed to ensure a unique id if needing to add one dynamically\n\n * `uib` {`boolean`} - Is UIBUILDER for Node-RED loaded?\n\n * `$` {function(string): Element} - Mini jQuery-like shadow dom selector (see constructor)\n\n * `$$` {function(string): NodeList} - Mini jQuery-like shadow dom multi-selector (see constructor)\n\n * `connected` {`boolean`} - True when instance finishes connecting.\nAllows initial calls of attributeChangedCallback to be\nignored if needed.\n\n * `name` {string} - Placeholder for the optional name attribute\n\n * `opts` {object} - Runtime configuration settings\n\n * `version` {`string`} - Component version", "attributes": [ { "name": "topic", @@ -594,27 +555,23 @@ } ] }, - { - "name": "id", - "description": "`id` {string} - Optional. HTML ID, must be unique on page. Included in output _meta prop.\n\n" - }, { "name": "name", - "description": "`name` {string} - Optional. HTML name attribute. Included in output _meta prop.\n\n" - }, - { - "name": "data-*", - "description": "`data-*` {string} - Optional. All data-* attributes are returned in the _meta prop as a _meta.data object.\n\nStandard props (common across all my components):\n\n" + "description": "`name` {string} - Placeholder for the optional name attribute\n\nProperty: name" }, { "name": "inherit-style", - "description": "`inherit-style` {string|boolean} - Optional. Load external styles into component (only useful if using template). If present but empty, will default to './index.css'. Optionally give a URL to load.\n\nOther watched attributes:\n\n", + "description": "`inherit-style` {string|boolean} - Optional. Load external styles into component (only useful if using template). If present but empty, will default to './index.css'. Optionally give a URL to load.\n\n", "values": [] }, { "name": "onbutton-send:connected", "description": "`button-send:connected` {} - When an instance of the component is attached to the DOM. `evt.details` contains the details of the element." }, + { + "name": "onbutton-send:ready", + "description": "`button-send:ready` {} - Alias for connected. The instance can handle property & attribute changes" + }, { "name": "onbutton-send:disconnected", "description": "`button-send:disconnected` {} - When an instance of the component is removed from the DOM. `evt.details` contains the details of the element." @@ -633,23 +590,74 @@ } ] }, + { + "name": "call-out", + "description": "Events:\n\n * `call-out:connected` {} - When an instance of the component is attached to the DOM. `evt.details` contains the details of the element.\n\n * `call-out:ready` {} - Alias for connected. The instance can handle property & attribute changes\n\n * `call-out:disconnected` {} - When an instance of the component is removed from the DOM. `evt.details` contains the details of the element.\n\n * `call-out:attribChanged` {} - When a watched attribute changes. `evt.details` contains the details of the change.\nNOTE that listeners can be attached either to the `document` or to the specific element instance.\n\nStandard watched attributes (common across all my components):\n\nSlots:\n\n * ` ` {} - Container contents\n\nSee https://github.com/runem/web-component-analyzer?tab=readme-ov-file#-how-to-document-your-components-using-jsdoc\n\nAttributes:\n\n * `type` {string} - Optional. If present, a title will be added above other child content\n\n * `icon` {string} - Optional. If present, will override the callout title icon\n\nNon-watched but still used attributes:\n\n * `name` {string} - Placeholder for the optional name attribute\n\n * `title` {string} - Optional. If present, will override the callout title text\n\nStandard props (common across all my components):\n\n * `inherit-style` {string|boolean} - Optional. Load external styles into component (only useful if using template). If present but empty, will default to './index.css'. Optionally give a URL to load.\n\nProperties:\n\n * `type` {string} - Optional. If present, a title will be added above other child content\n\n * `icon` {string} - Optional. If present, will override the callout title icon\n\nNon-watched but still used attributes:\n\n * `baseVersion` {`string`} - Component version\n\n * `_iCount` {`number`} - Holds a count of how many instances of this component are on the page that don't have their own id\nUsed to ensure a unique id if needing to add one dynamically\n\n * `uib` {`boolean`} - Is UIBUILDER for Node-RED loaded?\n\n * `$` {function(string): Element} - Mini jQuery-like shadow dom selector (see constructor)\n\n * `$$` {function(string): NodeList} - Mini jQuery-like shadow dom multi-selector (see constructor)\n\n * `connected` {`boolean`} - True when instance finishes connecting.\nAllows initial calls of attributeChangedCallback to be\nignored if needed.\n\n * `name` {string} - Placeholder for the optional name attribute\n\n * `opts` {object} - Runtime configuration settings\n\n * `version` {`string`} - Component version", + "attributes": [ + { + "name": "type", + "description": "`type` {string} - Optional. If present, a title will be added above other child content\n\nProperty: type\n\nDefault: " + }, + { + "name": "icon", + "description": "`icon` {string} - Optional. If present, will override the callout title icon\n\nNon-watched but still used attributes:\n\nProperty: icon\n\nDefault: " + }, + { + "name": "name", + "description": "`name` {string} - Placeholder for the optional name attribute\n\nProperty: name" + }, + { + "name": "title", + "description": "`title` {string} - Optional. If present, will override the callout title text\n\nStandard props (common across all my components):\n\n" + }, + { + "name": "inherit-style", + "description": "`inherit-style` {string|boolean} - Optional. Load external styles into component (only useful if using template). If present but empty, will default to './index.css'. Optionally give a URL to load.\n\n", + "values": [] + }, + { + "name": "oncall-out:connected", + "description": "`call-out:connected` {} - When an instance of the component is attached to the DOM. `evt.details` contains the details of the element." + }, + { + "name": "oncall-out:ready", + "description": "`call-out:ready` {} - Alias for connected. The instance can handle property & attribute changes" + }, + { + "name": "oncall-out:disconnected", + "description": "`call-out:disconnected` {} - When an instance of the component is removed from the DOM. `evt.details` contains the details of the element." + }, + { + "name": "oncall-out:attribChanged", + "description": "`call-out:attribChanged` {} - When a watched attribute changes. `evt.details` contains the details of the change.\nNOTE that listeners can be attached either to the `document` or to the specific element instance.\n\nStandard watched attributes (common across all my components):" + } + ] + }, { "name": "collapsible-headings", - "description": "Events:\n\n * `collapsible-headings:connected` {} - When an instance of the component is attached to the DOM. `evt.details` contains the details of the element.\n\n * `collapsible-headings:disconnected` {} - When an instance of the component is removed from the DOM. `evt.details` contains the details of the element.\n\n * `collapsible-headings:attribChanged` {} - When a watched attribute changes. `evt.details` contains the details of the change.\nNOTE that listeners can be attached either to the `document` or to the specific element instance.\n\nStandard watched attributes (common across all my components):\n\nSlots:\n\n * ` ` {} - Container contents\n\nSee https://github.com/runem/web-component-analyzer?tab=readme-ov-file#-how-to-document-your-components-using-jsdoc\n\nAttributes:\n\n * `levels` {string} - Optional. Default='h2, h3, h4, h5'. A single string detailing the heading levels to make collapsible.\n\nStandard props (common across all my components):\n\n * `inherit-style` {string|boolean} - Optional. Load external styles into component (only useful if using template). If present but empty, will default to './index.css'. Optionally give a URL to load.\n\nOther watched attributes:\n\nProperties:\n\n * `levels` {string} - Optional. Default='h2, h3, h4, h5'. A single string detailing the heading levels to make collapsible.\n\nStandard props (common across all my components):\n\n * `baseVersion` {`string`} - Component version\n\n * `uib` {`boolean`} - Is UIBUILDER for Node-RED loaded?\n\n * `$` {function(string): Element} - Mini jQuery-like shadow dom selector (see constructor)\n\n * `$$` {function(string): NodeList} - Mini jQuery-like shadow dom multi-selector (see constructor)\n\n * `_iCount` {`number`} - Holds a count of how many instances of this component are on the page that don't have their own id\nUsed to ensure a unique id if needing to add one dynamically\n\n * `opts` - Runtime configuration settings\n\n * `version` {`string`} - Component version", + "description": "Events:\n\n * `collapsible-headings:connected` {} - When an instance of the component is attached to the DOM. `evt.details` contains the details of the element.\n\n * `component-template:ready` {} - Alias for connected. The instance can handle property & attribute changes\n\n * `collapsible-headings:disconnected` {} - When an instance of the component is removed from the DOM. `evt.details` contains the details of the element.\n\n * `collapsible-headings:attribChanged` {} - When a watched attribute changes. `evt.details` contains the details of the change.\nNOTE that listeners can be attached either to the `document` or to the specific element instance.\n\nStandard watched attributes (common across all my components):\n\nSlots:\n\n * ` ` {} - Container contents\n\nSee https://github.com/runem/web-component-analyzer?tab=readme-ov-file#-how-to-document-your-components-using-jsdoc\n\nAttributes:\n\n * `levels` {string} - Optional. Default='h2, h3, h4, h5'. A single string detailing the heading levels to make collapsible.\n\nStandard props (common across all my components):\n\n * `name` {string} - Placeholder for the optional name attribute\n\n * `inherit-style` {string|boolean} - Optional. Load external styles into component (only useful if using template). If present but empty, will default to './index.css'. Optionally give a URL to load.\n\nProperties:\n\n * `levels` {string} - Optional. Default='h2, h3, h4, h5'. A single string detailing the heading levels to make collapsible.\n\nStandard props (common across all my components):\n\n * `baseVersion` {`string`} - Component version\n\n * `_iCount` {`number`} - Holds a count of how many instances of this component are on the page that don't have their own id\nUsed to ensure a unique id if needing to add one dynamically\n\n * `uib` {`boolean`} - Is UIBUILDER for Node-RED loaded?\n\n * `$` {function(string): Element} - Mini jQuery-like shadow dom selector (see constructor)\n\n * `$$` {function(string): NodeList} - Mini jQuery-like shadow dom multi-selector (see constructor)\n\n * `connected` {`boolean`} - True when instance finishes connecting.\nAllows initial calls of attributeChangedCallback to be\nignored if needed.\n\n * `name` {string} - Placeholder for the optional name attribute\n\n * `opts` {object} - Runtime configuration settings\n\n * `version` {`string`} - Component version", "attributes": [ { "name": "levels", "description": "`levels` {string} - Optional. Default='h2, h3, h4, h5'. A single string detailing the heading levels to make collapsible.\n\nStandard props (common across all my components):\n\nProperty: levels\n\nDefault: h2, h3, h4, h5" }, + { + "name": "name", + "description": "`name` {string} - Placeholder for the optional name attribute\n\nProperty: name" + }, { "name": "inherit-style", - "description": "`inherit-style` {string|boolean} - Optional. Load external styles into component (only useful if using template). If present but empty, will default to './index.css'. Optionally give a URL to load.\n\nOther watched attributes:\n\n", + "description": "`inherit-style` {string|boolean} - Optional. Load external styles into component (only useful if using template). If present but empty, will default to './index.css'. Optionally give a URL to load.\n\n", "values": [] }, { "name": "oncollapsible-headings:connected", "description": "`collapsible-headings:connected` {} - When an instance of the component is attached to the DOM. `evt.details` contains the details of the element." }, + { + "name": "oncomponent-template:ready", + "description": "`component-template:ready` {} - Alias for connected. The instance can handle property & attribute changes" + }, { "name": "oncollapsible-headings:disconnected", "description": "`collapsible-headings:disconnected` {} - When an instance of the component is removed from the DOM. `evt.details` contains the details of the element." @@ -660,19 +668,98 @@ } ] }, + { + "name": "html-include", + "description": "Events:\n\n * `html-include:connected` {} - When an instance of the component is attached to the DOM. `evt.details` contains the details of the element.\n\n * `component-template:ready` {} - Alias for connected. The instance can handle property & attribute changes\n\n * `html-include:disconnected` {} - When an instance of the component is removed from the DOM. `evt.details` contains the details of the element.\n\n * `html-include:attribChanged` {} - When a watched attribute changes. `evt.details` contains the details of the change.\nNOTE that listeners can be attached either to the `document` or to the specific element instance.\n\nStandard watched attributes (common across all my components):\n\nSlots:\n\n * ` ` {} - Container contents\n\nSee https://github.com/runem/web-component-analyzer?tab=readme-ov-file#-how-to-document-your-components-using-jsdoc\n\nAttributes:\n\n * `src` {string} - The URL to fetch an HTML document from. Allows change via instance prop as well as attribute change.\nSetting this property causes a fetch the HTML from the URL.\nWe are reflecting the src attrib and the src prop.\n\n * `name` {string} - Placeholder for the optional name attribute\n\n * `inherit-style` {string|boolean} - Optional. Load external styles into component (only useful if using template). If present but empty, will default to './index.css'. Optionally give a URL to load.\n\nProperties:\n\n * `contentType` {\"text\"|\"html\"|\"json\"|\"form\"} - Content type of the imported resource\n\n * `text` {`string`} - \n\n * `json` - \n\n * `src` {string} - The URL to fetch an HTML document from. Allows change via instance prop as well as attribute change.\nSetting this property causes a fetch the HTML from the URL.\nWe are reflecting the src attrib and the src prop.\n\n * `baseVersion` {`string`} - Component version\n\n * `_iCount` {`number`} - Holds a count of how many instances of this component are on the page that don't have their own id\nUsed to ensure a unique id if needing to add one dynamically\n\n * `uib` {`boolean`} - Is UIBUILDER for Node-RED loaded?\n\n * `$` {function(string): Element} - Mini jQuery-like shadow dom selector (see constructor)\n\n * `$$` {function(string): NodeList} - Mini jQuery-like shadow dom multi-selector (see constructor)\n\n * `connected` {`boolean`} - True when instance finishes connecting.\nAllows initial calls of attributeChangedCallback to be\nignored if needed.\n\n * `name` {string} - Placeholder for the optional name attribute\n\n * `opts` {object} - Runtime configuration settings\n\n * `version` {`string`} - Component version", + "attributes": [ + { + "name": "src", + "description": "`src` {string} - The URL to fetch an HTML document from. Allows change via instance prop as well as attribute change.\nSetting this property causes a fetch the HTML from the URL.\nWe are reflecting the src attrib and the src prop.\n\nProperty: src", + "values": [] + }, + { + "name": "name", + "description": "`name` {string} - Placeholder for the optional name attribute\n\nProperty: name" + }, + { + "name": "inherit-style", + "description": "`inherit-style` {string|boolean} - Optional. Load external styles into component (only useful if using template). If present but empty, will default to './index.css'. Optionally give a URL to load.\n\n", + "values": [] + }, + { + "name": "onhtml-include:connected", + "description": "`html-include:connected` {} - When an instance of the component is attached to the DOM. `evt.details` contains the details of the element." + }, + { + "name": "oncomponent-template:ready", + "description": "`component-template:ready` {} - Alias for connected. The instance can handle property & attribute changes" + }, + { + "name": "onhtml-include:disconnected", + "description": "`html-include:disconnected` {} - When an instance of the component is removed from the DOM. `evt.details` contains the details of the element." + }, + { + "name": "onhtml-include:attribChanged", + "description": "`html-include:attribChanged` {} - When a watched attribute changes. `evt.details` contains the details of the change.\nNOTE that listeners can be attached either to the `document` or to the specific element instance.\n\nStandard watched attributes (common across all my components):" + } + ] + }, + { + "name": "syntax-highlight", + "description": "Events:\n\n * `syntax-highlight:connected` {} - When an instance of the component is attached to the DOM. `evt.details` contains the details of the element.\n\n * `component-template:ready` {} - Alias for connected. The instance can handle property & attribute changes\n\n * `syntax-highlight:disconnected` {} - When an instance of the component is removed from the DOM. `evt.details` contains the details of the element.\n\n * `syntax-highlight:attribChanged` {} - When a watched attribute changes. `evt.details` contains the details of the change.\nNOTE that listeners can be attached either to the `document` or to the specific element instance.\n\nStandard watched attributes (common across all my components):\n\nSlots:\n\n * ` ` {} - Container contents\n\nSee https://github.com/runem/web-component-analyzer?tab=readme-ov-file#-how-to-document-your-components-using-jsdoc\n\nAttributes:\n\n * `name` {string} - Placeholder for the optional name attribute\n\n * `auto` {} - \n\n * `inherit-style` {string|boolean} - Optional. Load external styles into component (only useful if using template). If present but empty, will default to './index.css'. Optionally give a URL to load.\n\nProperties:\n\n * `jsonData` - \n\n * `json` - Element.json = {...} to show the json object\n\n * `baseVersion` {`string`} - Component version\n\n * `_iCount` {`number`} - Holds a count of how many instances of this component are on the page that don't have their own id\nUsed to ensure a unique id if needing to add one dynamically\n\n * `uib` {`boolean`} - Is UIBUILDER for Node-RED loaded?\n\n * `$` {function(string): Element} - Mini jQuery-like shadow dom selector (see constructor)\n\n * `$$` {function(string): NodeList} - Mini jQuery-like shadow dom multi-selector (see constructor)\n\n * `connected` {`boolean`} - True when instance finishes connecting.\nAllows initial calls of attributeChangedCallback to be\nignored if needed.\n\n * `name` {string} - Placeholder for the optional name attribute\n\n * `opts` {object} - Runtime configuration settings\n\n * `version` {`string`} - Component version", + "attributes": [ + { + "name": "name", + "description": "`name` {string} - Placeholder for the optional name attribute\n\nProperty: name" + }, + { + "name": "auto", + "description": "`auto` {} - \n\n" + }, + { + "name": "inherit-style", + "description": "`inherit-style` {string|boolean} - Optional. Load external styles into component (only useful if using template). If present but empty, will default to './index.css'. Optionally give a URL to load.\n\n", + "values": [] + }, + { + "name": "onsyntax-highlight:connected", + "description": "`syntax-highlight:connected` {} - When an instance of the component is attached to the DOM. `evt.details` contains the details of the element." + }, + { + "name": "oncomponent-template:ready", + "description": "`component-template:ready` {} - Alias for connected. The instance can handle property & attribute changes" + }, + { + "name": "onsyntax-highlight:disconnected", + "description": "`syntax-highlight:disconnected` {} - When an instance of the component is removed from the DOM. `evt.details` contains the details of the element." + }, + { + "name": "onsyntax-highlight:attribChanged", + "description": "`syntax-highlight:attribChanged` {} - When a watched attribute changes. `evt.details` contains the details of the change.\nNOTE that listeners can be attached either to the `document` or to the specific element instance.\n\nStandard watched attributes (common across all my components):" + } + ] + }, { "name": "component-template", - "description": "Events:\n\n * `visible-console:connected` {} - When an instance of the component is attached to the DOM. `evt.details` contains the details of the element.\n\n * `visible-console:disconnected` {} - When an instance of the component is removed from the DOM. `evt.details` contains the details of the element.\n\n * `visible-console:attribChanged` {} - When a watched attribute changes. `evt.details` contains the details of the change.\nNOTE that listeners can be attached either to the `document` or to the specific element instance.\n\nStandard watched attributes (common across all my components):\n\nAttributes:\n\n * `inherit-style` {string|boolean} - Optional. Load external styles into component (only useful if using template). If present but empty, will default to './index.css'. Optionally give a URL to load.\nOther watched attributes:\nNone\n\nStandard props (common across all my components):\n\nProperties:\n\n * `colors` {object} - \n\n * `bgColors` {object} - \n\n * `icons` {object} - \n\n * `wrapper` - \n\n * `originalConsole` - \n\n * `baseVersion` {`string`} - Component version\n\n * `uib` {`boolean`} - Is UIBUILDER for Node-RED loaded?\n\n * `$` {function(string): Element} - Mini jQuery-like shadow dom selector (see constructor)\n\n * `$$` {function(string): NodeList} - Mini jQuery-like shadow dom multi-selector (see constructor)\n\n * `_iCount` {`number`} - Holds a count of how many instances of this component are on the page that don't have their own id\nUsed to ensure a unique id if needing to add one dynamically\n\n * `opts` - Is UIBUILDER for Node-RED loaded?\n\n * `version` {`string`} - Component version", + "description": "Events:\n\n * `visible-console:connected` {} - When an instance of the component is attached to the DOM. `evt.details` contains the details of the element.\n\n * `component-template:ready` {} - Alias for connected. The instance can handle property & attribute changes\n\n * `visible-console:disconnected` {} - When an instance of the component is removed from the DOM. `evt.details` contains the details of the element.\n\n * `visible-console:attribChanged` {} - When a watched attribute changes. `evt.details` contains the details of the change.\nNOTE that listeners can be attached either to the `document` or to the specific element instance.\n\nStandard watched attributes (common across all my components):\n\nSlots:\n\n * ` ` {} - No slot\n\nSee https://github.com/runem/web-component-analyzer?tab=readme-ov-file#-how-to-document-your-components-using-jsdoc\n\nAttributes:\n\n * `name` {string} - Placeholder for the optional name attribute\n\n * `inherit-style` {string|boolean} - Optional. Load external styles into component (only useful if using template). If present but empty, will default to './index.css'. Optionally give a URL to load.\n\nProperties:\n\n * `colors` {object} - \n\n * `bgColors` {object} - \n\n * `icons` {object} - \n\n * `wrapper` - \n\n * `originalConsole` - \n\n * `baseVersion` {`string`} - Component version\n\n * `_iCount` {`number`} - Holds a count of how many instances of this component are on the page that don't have their own id\nUsed to ensure a unique id if needing to add one dynamically\n\n * `uib` {`boolean`} - Is UIBUILDER for Node-RED loaded?\n\n * `$` {function(string): Element} - Mini jQuery-like shadow dom selector (see constructor)\n\n * `$$` {function(string): NodeList} - Mini jQuery-like shadow dom multi-selector (see constructor)\n\n * `connected` {`boolean`} - True when instance finishes connecting.\nAllows initial calls of attributeChangedCallback to be\nignored if needed.\n\n * `name` {string} - Placeholder for the optional name attribute\n\n * `opts` {object} - Runtime configuration settings\n\n * `version` {`string`} - Component version", "attributes": [ + { + "name": "name", + "description": "`name` {string} - Placeholder for the optional name attribute\n\nProperty: name" + }, { "name": "inherit-style", - "description": "`inherit-style` {string|boolean} - Optional. Load external styles into component (only useful if using template). If present but empty, will default to './index.css'. Optionally give a URL to load.\nOther watched attributes:\nNone\n\nStandard props (common across all my components):\n\n", + "description": "`inherit-style` {string|boolean} - Optional. Load external styles into component (only useful if using template). If present but empty, will default to './index.css'. Optionally give a URL to load.\n\n", "values": [] }, { "name": "onvisible-console:connected", "description": "`visible-console:connected` {} - When an instance of the component is attached to the DOM. `evt.details` contains the details of the element." }, + { + "name": "oncomponent-template:ready", + "description": "`component-template:ready` {} - Alias for connected. The instance can handle property & attribute changes" + }, { "name": "onvisible-console:disconnected", "description": "`visible-console:disconnected` {} - When an instance of the component is removed from the DOM. `evt.details` contains the details of the element." @@ -685,17 +772,25 @@ }, { "name": "visible-console", - "description": "Events:\n\n * `visible-console:connected` {} - When an instance of the component is attached to the DOM. `evt.details` contains the details of the element.\n\n * `visible-console:disconnected` {} - When an instance of the component is removed from the DOM. `evt.details` contains the details of the element.\n\n * `visible-console:attribChanged` {} - When a watched attribute changes. `evt.details` contains the details of the change.\nNOTE that listeners can be attached either to the `document` or to the specific element instance.\n\nStandard watched attributes (common across all my components):\n\nAttributes:\n\n * `inherit-style` {string|boolean} - Optional. Load external styles into component (only useful if using template). If present but empty, will default to './index.css'. Optionally give a URL to load.\nOther watched attributes:\nNone\n\nStandard props (common across all my components):\n\nProperties:\n\n * `colors` {object} - \n\n * `bgColors` {object} - \n\n * `icons` {object} - \n\n * `wrapper` - \n\n * `originalConsole` - \n\n * `baseVersion` {`string`} - Component version\n\n * `uib` {`boolean`} - Is UIBUILDER for Node-RED loaded?\n\n * `$` {function(string): Element} - Mini jQuery-like shadow dom selector (see constructor)\n\n * `$$` {function(string): NodeList} - Mini jQuery-like shadow dom multi-selector (see constructor)\n\n * `_iCount` {`number`} - Holds a count of how many instances of this component are on the page that don't have their own id\nUsed to ensure a unique id if needing to add one dynamically\n\n * `opts` - Is UIBUILDER for Node-RED loaded?\n\n * `version` {`string`} - Component version", + "description": "Events:\n\n * `visible-console:connected` {} - When an instance of the component is attached to the DOM. `evt.details` contains the details of the element.\n\n * `component-template:ready` {} - Alias for connected. The instance can handle property & attribute changes\n\n * `visible-console:disconnected` {} - When an instance of the component is removed from the DOM. `evt.details` contains the details of the element.\n\n * `visible-console:attribChanged` {} - When a watched attribute changes. `evt.details` contains the details of the change.\nNOTE that listeners can be attached either to the `document` or to the specific element instance.\n\nStandard watched attributes (common across all my components):\n\nSlots:\n\n * ` ` {} - No slot\n\nSee https://github.com/runem/web-component-analyzer?tab=readme-ov-file#-how-to-document-your-components-using-jsdoc\n\nAttributes:\n\n * `name` {string} - Placeholder for the optional name attribute\n\n * `inherit-style` {string|boolean} - Optional. Load external styles into component (only useful if using template). If present but empty, will default to './index.css'. Optionally give a URL to load.\n\nProperties:\n\n * `colors` {object} - \n\n * `bgColors` {object} - \n\n * `icons` {object} - \n\n * `wrapper` - \n\n * `originalConsole` - \n\n * `baseVersion` {`string`} - Component version\n\n * `_iCount` {`number`} - Holds a count of how many instances of this component are on the page that don't have their own id\nUsed to ensure a unique id if needing to add one dynamically\n\n * `uib` {`boolean`} - Is UIBUILDER for Node-RED loaded?\n\n * `$` {function(string): Element} - Mini jQuery-like shadow dom selector (see constructor)\n\n * `$$` {function(string): NodeList} - Mini jQuery-like shadow dom multi-selector (see constructor)\n\n * `connected` {`boolean`} - True when instance finishes connecting.\nAllows initial calls of attributeChangedCallback to be\nignored if needed.\n\n * `name` {string} - Placeholder for the optional name attribute\n\n * `opts` {object} - Runtime configuration settings\n\n * `version` {`string`} - Component version", "attributes": [ + { + "name": "name", + "description": "`name` {string} - Placeholder for the optional name attribute\n\nProperty: name" + }, { "name": "inherit-style", - "description": "`inherit-style` {string|boolean} - Optional. Load external styles into component (only useful if using template). If present but empty, will default to './index.css'. Optionally give a URL to load.\nOther watched attributes:\nNone\n\nStandard props (common across all my components):\n\n", + "description": "`inherit-style` {string|boolean} - Optional. Load external styles into component (only useful if using template). If present but empty, will default to './index.css'. Optionally give a URL to load.\n\n", "values": [] }, { "name": "onvisible-console:connected", "description": "`visible-console:connected` {} - When an instance of the component is attached to the DOM. `evt.details` contains the details of the element." }, + { + "name": "oncomponent-template:ready", + "description": "`component-template:ready` {} - Alias for connected. The instance can handle property & attribute changes" + }, { "name": "onvisible-console:disconnected", "description": "`visible-console:disconnected` {} - When an instance of the component is removed from the DOM. `evt.details` contains the details of the element."

button-send (ButtonSend)A simple button that outputs key info either via a custom document event or as a message back to Node-RED (when used with UIBUILDER for Node-RED). Allows block contents on the button.
collapsible-headings (CollapsibleHeadings)Turns a section of Hn headings and block contents into collapsible content around the heading levels.
visible-console (VisibleConsole) Copies console log outputs to an on-screen visible block. Useful if needing to debug web apps on mobile devices with no access to the dev tools console.
button-send (ButtonSend)A pre-defined button that fires an event and sends a uibuilder msg when clicked. Includes attribs in the sent data.
chart-frappe (ChartFrappe) A chart component using the Frappe chart library
namepayload +any +| + string @@ -14448,7 +14457,7 @@
Properties:
-
Sync'd from name attributeCan be an attribute or property. If used as property, must not use payload attribute in html, aAllows any data to be attached to payload. As an attribute, allows a string only.
payloadname -any -| - string @@ -21630,7 +21625,7 @@
Properties:
-
Can be an attribute or property. If used as property, must not use payload attribute in html, aAllows any data to be attached to payload. As an attribute, allows a string only.Sync'd from name attribute
namepayload +any +| + string @@ -28798,7 +28807,53 @@
Properties:
-
Sync'd from name attributeCan be an attribute or property. If used as property, must not use payload attribute in html, allows any data to be attached to payload. As an attribute, allows a string only.
topic + + +string + + + + Optional. Topic string to use. Mostly for node-red messages
props + + +Array.<string> + + + + List of watched HtML Attributes
payload - - -any -| - -string - - - - Can be an attribute or property. If used as property, must not use payload attribute in html, allows any data to be attached to payload. As an attribute, allows a string only.
topicname @@ -36003,30 +36021,7 @@
Properties:
-
Optional. Topic string to use. Mostly for node-red messages
props - - -Array.<string> - - - - List of watched HtML AttributesSync'd from name attribute
namepayload +any +| + string @@ -122119,7 +122128,7 @@
Properties:
-
Sync'd from name attributeCan be an attribute or property. If used as property, must not use payload attribute in html, aAllows any data to be attached to payload. As an attribute, allows a string only.
payloadname -any -| - string @@ -129301,7 +129296,7 @@
Properties:
-
Can be an attribute or property. If used as property, must not use payload attribute in html, aAllows any data to be attached to payload. As an attribute, allows a string only.Sync'd from name attribute
namepayload +any +| + string @@ -136469,7 +136478,53 @@
Properties:
-
Sync'd from name attributeCan be an attribute or property. If used as property, must not use payload attribute in html, allows any data to be attached to payload. As an attribute, allows a string only.
topic + + +string + + + + Optional. Topic string to use. Mostly for node-red messages
props + + +Array.<string> + + + + List of watched HtML Attributes
payload - - -any -| - -string - - - - Can be an attribute or property. If used as property, must not use payload attribute in html, allows any data to be attached to payload. As an attribute, allows a string only.
topicname @@ -143674,30 +143692,7 @@
Properties:
-
Optional. Topic string to use. Mostly for node-red messages
props - - -Array.<string> - - - - List of watched HtML AttributesSync'd from name attribute