@decidables/discountable-elements 0.3.0 → 0.3.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@decidables/discountable-elements",
3
- "version": "0.3.0",
3
+ "version": "0.3.2",
4
4
  "description": "discountable-elements: Web Components for visualizing Hyperbolic Temporal Discounting",
5
5
  "keywords": [
6
6
  "web component",
@@ -55,15 +55,14 @@
55
55
  "gulp": "^4.0.2"
56
56
  },
57
57
  "dependencies": {
58
- "@decidables/decidables-elements": "^0.4.1",
59
- "@decidables/discountable-math": "^0.1.2",
58
+ "@decidables/decidables-elements": "^0.4.2",
59
+ "@decidables/discountable-math": "^0.1.3",
60
60
  "@lit-labs/motion": "^1.0.6",
61
61
  "@observablehq/plot": "^0.6.11",
62
62
  "bayes.js": "https://github.com/akrawitz/bayes.js.git#commit=c7b091b75f85a86b6a3965a983b31e23d9ef456f",
63
63
  "d3": "^7.8.5",
64
- "jstat": "^1.9.6",
65
64
  "lit": "^3.1.0",
66
65
  "regenerator-runtime": "^0.14.0"
67
66
  },
68
- "gitHead": "84c6fb7df16db2086e9f20496f873e67e05c56b4"
67
+ "gitHead": "3e0d0d6dd5720f50263f1f8bbc7f8d18d210d2ef"
69
68
  }
@@ -135,8 +135,11 @@ export default class HTDCalculation extends HTDEquation {
135
135
  ];
136
136
  }
137
137
 
138
- render() {
138
+ willUpdate() {
139
139
  this.alignState();
140
+ }
141
+
142
+ render() {
140
143
  let as;
141
144
  let ds;
142
145
  let al;
@@ -359,15 +359,15 @@ export default class HTDCurves extends DecidablesMixinResizeable(DiscountableEle
359
359
 
360
360
  render() { /* eslint-disable-line class-methods-use-this */
361
361
  return html``;
362
- // ${DiscountableElement.svgFilters}
363
- // `;
362
+ }
363
+
364
+ willUpdate() {
365
+ this.alignState();
364
366
  }
365
367
 
366
368
  update(changedProperties) {
367
369
  super.update(changedProperties);
368
370
 
369
- this.alignState();
370
-
371
371
  // Bail out if we can't get the width/height
372
372
  if (Number.isNaN(this.width) || Number.isNaN(this.height) || Number.isNaN(this.rem)) {
373
373
  return;
@@ -82,8 +82,11 @@ export default class HTDEquationADK2V extends HTDEquation {
82
82
  this.sendEvent();
83
83
  }
84
84
 
85
- render() {
85
+ willUpdate() {
86
86
  this.alignState();
87
+ }
88
+
89
+ render() {
87
90
  let a;
88
91
  let d;
89
92
  let k;
@@ -8,7 +8,9 @@ import HTDExample from './htd-example';
8
8
  <htd-example-human>
9
9
  */
10
10
  export default class HTDExampleHuman extends HTDExample {
11
- firstUpdated(/* changedProperties */) {
11
+ connectedCallback() {
12
+ super.connectedCallback();
13
+
12
14
  this.discountableControl = this.querySelector('discountable-control');
13
15
  this.itcTask = this.querySelector('itc-task');
14
16
  this.discountableResponse = this.querySelector('discountable-response');
@@ -51,7 +51,9 @@ export default class HTDExampleInteractive extends HTDExample {
51
51
  this.itcChoice = null;
52
52
  }
53
53
 
54
- firstUpdated(/* changedProperties */) {
54
+ connectedCallback() {
55
+ super.connectedCallback();
56
+
55
57
  this.htdCalculation = this.querySelector('htd-calculation');
56
58
  this.htdCurves = this.querySelector('htd-curves');
57
59
  this.itcChoice = this.querySelector('itc-choice');
@@ -30,7 +30,9 @@ export default class HTDExampleModel extends HTDExample {
30
30
  this.itcTask = null;
31
31
  }
32
32
 
33
- firstUpdated(/* changedProperties */) {
33
+ connectedCallback() {
34
+ super.connectedCallback();
35
+
34
36
  this.discountableControl = this.querySelector('discountable-control');
35
37
  this.discountableResponse = this.querySelector('discountable-response');
36
38
  this.htdCalculation = this.querySelector('htd-calculation');