@tripod311/splash 0.0.8 → 0.0.9

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.
@@ -1 +1 @@
1
- {"version":3,"file":"reactiveProp.d.ts","sourceRoot":"","sources":["../../src/reactives/reactiveProp.ts"],"names":[],"mappings":"AAAA,OAAO,eAAe,MAAM,uBAAuB,CAAA;AAEnD,MAAM,CAAC,OAAO,OAAO,YAAa,SAAQ,eAAe;IACxD,SAAS,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC3B,SAAS,CAAC,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;gBAEzB,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM;IAYnD,MAAM,CAAE,QAAQ,EAAE,GAAG,EAAE,QAAQ,EAAE,GAAG;IAYpC,OAAO,IAAK,MAAM,GAAG,IAAI;CAGzB"}
1
+ {"version":3,"file":"reactiveProp.d.ts","sourceRoot":"","sources":["../../src/reactives/reactiveProp.ts"],"names":[],"mappings":"AAAA,OAAO,eAAe,MAAM,uBAAuB,CAAA;AAEnD,MAAM,CAAC,OAAO,OAAO,YAAa,SAAQ,eAAe;IACxD,SAAS,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC3B,SAAS,CAAC,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;gBAEzB,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM;IAgBnD,MAAM,CAAE,QAAQ,EAAE,GAAG,EAAE,QAAQ,EAAE,GAAG;IAiBpC,OAAO,IAAK,MAAM,GAAG,IAAI;CAGzB"}
@@ -5,21 +5,32 @@ export default class ReactiveProp extends ReactiveElement {
5
5
  constructor(element, propName) {
6
6
  super(element);
7
7
  this.propName = propName;
8
- if (element.hasAttribute(propName)) {
9
- this.currentValue = element.getAttribute(this.propName);
8
+ if (this.propName === "value") {
9
+ this.currentValue = element.value;
10
10
  }
11
11
  else {
12
- this.currentValue = null;
12
+ if (element.hasAttribute(propName)) {
13
+ this.currentValue = element.getAttribute(this.propName);
14
+ }
15
+ else {
16
+ this.currentValue = null;
17
+ }
13
18
  }
14
19
  }
15
20
  update(newValue, oldValue) {
16
- if (newValue === null || newValue === undefined) {
17
- this.currentValue = null;
18
- this.element.removeAttribute(this.propName);
21
+ if (this.propName === "value") {
22
+ this.element.value = newValue;
23
+ this.currentValue = this.element.value;
19
24
  }
20
25
  else {
21
- this.currentValue = newValue.toString();
22
- this.element.setAttribute(this.propName, this.currentValue);
26
+ if (newValue === null || newValue === undefined) {
27
+ this.currentValue = null;
28
+ this.element.removeAttribute(this.propName);
29
+ }
30
+ else {
31
+ this.currentValue = newValue.toString();
32
+ this.element.setAttribute(this.propName, this.currentValue);
33
+ }
23
34
  }
24
35
  }
25
36
  current() {
@@ -1 +1 @@
1
- {"version":3,"file":"reactiveProp.js","sourceRoot":"","sources":["../../src/reactives/reactiveProp.ts"],"names":[],"mappings":"AAAA,OAAO,eAAe,MAAM,uBAAuB,CAAA;AAEnD,MAAM,CAAC,OAAO,OAAO,YAAa,SAAQ,eAAe;IAC9C,QAAQ,CAAS;IACjB,YAAY,CAAgB;IAEtC,YAAa,OAAoB,EAAE,QAAgB;QAClD,KAAK,CAAC,OAAO,CAAC,CAAC;QAEf,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QAEzB,IAAI,OAAO,CAAC,YAAY,CAAC,QAAQ,CAAC,EAAE,CAAC;YACpC,IAAI,CAAC,YAAY,GAAG,OAAO,CAAC,YAAY,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QACzD,CAAC;aAAM,CAAC;YACP,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC;QAC1B,CAAC;IACF,CAAC;IAED,MAAM,CAAE,QAAa,EAAE,QAAa;QACnC,IAAI,QAAQ,KAAK,IAAI,IAAI,QAAQ,KAAK,SAAS,EAAE,CAAC;YACjD,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC;YAEzB,IAAI,CAAC,OAAO,CAAC,e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CAAC;QACjD,CAAC;aAAM,CAAC;YACP,IAAI,QAAQ,KAAK,IAAI,IAAI,QAAQ,KAAK,SAAS,EAAE,CAAC;gBACjD,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC;gBAEzB,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;YAC7C,CAAC;iBAAM,CAAC;gBACP,IAAI,CAAC,YAAY,GAAG,QAAQ,CAAC,QAAQ,EAAE,CAAC;gBAExC,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,YAAsB,CAAC,CAAC;YACvE,CAAC;QACF,CAAC;IACF,CAAC;IAED,OAAO;QACN,OAAO,IAAI,CAAC,YAAY,CAAC;IAC1B,CAAC;CACD"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tripod311/splash",
3
- "version": "0.0.8",
3
+ "version": "0.0.9",
4
4
  "description": "simple and flexible ui framework",
5
5
  "keywords": [
6
6
  "js",