Various fixes

This commit is contained in:
barsdeveloper
2022-03-28 23:04:24 +02:00
parent ca5948792a
commit a0eeca11d1
73 changed files with 446 additions and 125 deletions

View File

@@ -1,3 +1,5 @@
// @ts-check
import Configuration from "../Configuration"
import html from "./html"
import ITemplate from "./ITemplate"

View File

@@ -1,3 +1,5 @@
// @ts-check
import html from "./html"
import PinTemplate from "./PinTemplate"

View File

@@ -1,4 +1,5 @@
// @ts-check
/**
* @typedef {import("../element/IElement").default} IElement
*/

View File

@@ -1,3 +1,5 @@
// @ts-check
import html from "./html"
import ITemplate from "./ITemplate"
import LinkElement from "../element/LinkElement"
@@ -36,4 +38,4 @@ export default class LinkMessageTemplate extends ITemplate {
}
}
}
}

View File

@@ -1,5 +1,6 @@
// @ts-check
import Configuration from "../Configuration"
import Utility from "../Utility"
import html from "./html"
import ITemplate from "./ITemplate"
import sanitizeText from "./sanitizeText"

View File

@@ -1,3 +1,5 @@
// @ts-check
import html from "./html"
import PinElement from "../element/PinElement"
import sanitizeText from "./sanitizeText"

View File

@@ -1,3 +1,5 @@
// @ts-check
import html from "./html"
import ITemplate from "./ITemplate"
import LinkElement from "../element/LinkElement"

View File

@@ -1,3 +1,5 @@
// @ts-check
import ITemplate from "./ITemplate"
import sanitizeText from "./sanitizeText"

View File

@@ -1,3 +1,5 @@
// @ts-check
import ITemplate from "./ITemplate"
import sanitizeText from "./sanitizeText"

View File

@@ -10,8 +10,13 @@ export default class StringPinTemplate extends PinTemplate {
* @param {PinElement} pin
*/
renderInput(pin) {
const stopEventPropagation = "e => stopPropagation()"
return html`
<span class="ueb-pin-input" role="textbox" contenteditable="true"></span>
<span class="ueb-pin-input">
<span class="ueb-pin-input-content" role="textbox" contenteditable="true"
onkeydown="${stopEventPropagation}" onkeyup="${stopEventPropagation}"
oncopy="${stopEventPropagation}" onpaste="${stopEventPropagation}"></span>
</span>
`
}
}

View File

@@ -1,3 +1,5 @@
// @ts-check
/**
* This solves the sole purpose of providing compression capability for html inside template literals strings. Check rollup.config.js function minifyHTML()
*/

View File

@@ -1,3 +1,5 @@
// @ts-check
const div = document.createElement("div")
const tagReplacement = {
@@ -15,4 +17,4 @@ function sanitizeText(value) {
return value
}
export default sanitizeText
export default sanitizeText