lightview 1.4.0-b → 1.4.1-b
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/lightview.js +6 -2
- package/package.json +1 -1
package/README.md
CHANGED
package/lightview.js
CHANGED
|
@@ -302,7 +302,7 @@ const {observe} = (() => {
|
|
|
302
302
|
}
|
|
303
303
|
const inputTypeToType = (inputType) => {
|
|
304
304
|
if (!inputType) return "any"
|
|
305
|
-
if (["text", "tel", "email", "url", "search", "radio"].includes(inputType)) return "string";
|
|
305
|
+
if (["text", "tel", "email", "url", "search", "radio","color","password"].includes(inputType)) return "string";
|
|
306
306
|
if (["number", "range"].includes(inputType)) return "number";
|
|
307
307
|
if (["datetime"].includes(inputType)) return Date;
|
|
308
308
|
if (["checkbox"].includes(inputType)) return "boolean";
|
|
@@ -325,7 +325,11 @@ const {observe} = (() => {
|
|
|
325
325
|
else throw new TypeError(`Attempt to bind <input name="${name}" type="${type}"> to variable ${name}:${variable.type}`)
|
|
326
326
|
}
|
|
327
327
|
component.variables({[name]: type});
|
|
328
|
-
|
|
328
|
+
let eventname = "change";
|
|
329
|
+
if(input.tagName!=="SELECT" && (!inputtype || ["text","number","tel","email","url","search","password"].includes(inputtype))) {
|
|
330
|
+
eventname = "input";
|
|
331
|
+
}
|
|
332
|
+
addListener(input,eventname, (event) => {
|
|
329
333
|
event.stopImmediatePropagation();
|
|
330
334
|
const target = event.target;
|
|
331
335
|
let value = target.value;
|
package/package.json
CHANGED