@decidables/detectable-elements 0.2.7 → 0.2.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.
- package/CHANGELOG.md +18 -0
- package/README.md +1 -0
- package/lib/detectableElements.esm.js +54 -29
- package/lib/detectableElements.esm.js.map +1 -1
- package/lib/detectableElements.esm.min.js +16 -16
- package/lib/detectableElements.esm.min.js.map +1 -1
- package/lib/detectableElements.umd.js +54 -29
- package/lib/detectableElements.umd.js.map +1 -1
- package/lib/detectableElements.umd.min.js +16 -16
- package/lib/detectableElements.umd.min.js.map +1 -1
- package/package.json +4 -4
- package/src/components/detectable-table.js +10 -7
- package/src/components/roc-space.js +4 -2
- package/src/components/sdt-model.js +4 -2
- package/src/equations/dc2far.js +4 -1
- package/src/equations/dc2hr.js +4 -1
- package/src/equations/facr2far.js +4 -1
- package/src/equations/hfa2ppv.js +4 -1
- package/src/equations/hm2hr.js +4 -1
- package/src/equations/hmfacr2acc.js +4 -1
- package/src/equations/hrfar2c.js +4 -1
- package/src/equations/hrfar2d.js +4 -1
- package/src/equations/mcr2fomr.js +4 -1
- package/src/examples/double-interactive.js +3 -1
- package/src/examples/human.js +3 -1
- package/src/examples/interactive.js +3 -1
- package/src/examples/model.js +3 -1
- package/src/examples/multiple.js +3 -1
- package/src/examples/unequal.js +3 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,24 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [0.2.9](https://github.com/decidables/decidables/compare/@decidables/detectable-elements@0.2.8...@decidables/detectable-elements@0.2.9) (2023-12-28)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @decidables/detectable-elements
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## [0.2.8](https://github.com/decidables/decidables/compare/@decidables/detectable-elements@0.2.7...@decidables/detectable-elements@0.2.8) (2023-12-05)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Bug Fixes
|
|
18
|
+
|
|
19
|
+
* **libraries:** add event listeners in connectedCallback ([affc3de](https://github.com/decidables/decidables/commit/affc3de94ad40a3811ae8d710dbc2461ce492251))
|
|
20
|
+
* **libraries:** move alignState to willUpdate ([d6decd0](https://github.com/decidables/decidables/commit/d6decd07b9430ddf858d9996869f23b987c44b42))
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
6
24
|
## [0.2.7](https://github.com/decidables/decidables/compare/@decidables/detectable-elements@0.2.6...@decidables/detectable-elements@0.2.7) (2023-11-30)
|
|
7
25
|
|
|
8
26
|
**Note:** Version bump only for package @decidables/detectable-elements
|
package/README.md
CHANGED
|
@@ -1344,6 +1344,7 @@ export default class DetectableElementSomething extends DetectableElement {
|
|
|
1344
1344
|
- `gulpfile.js` (Tasks for *gulp*)
|
|
1345
1345
|
- `package.json` (Package config for *yarn* and *npm*)
|
|
1346
1346
|
- `README.md` (This file)
|
|
1347
|
+
- `rollup-stats.html` (Report on js bundle composition and size) **\[autogenerated\]**
|
|
1347
1348
|
|
|
1348
1349
|
## [License](https://github.com/decidables/decidables/blob/main/LICENSE.md)
|
|
1349
1350
|
|
|
@@ -12644,9 +12644,11 @@ class ROCSpace extends DecidablesMixinResizeable(DetectableElement) {
|
|
|
12644
12644
|
${DetectableElement.svgFilters}
|
|
12645
12645
|
`;
|
|
12646
12646
|
}
|
|
12647
|
+
willUpdate() {
|
|
12648
|
+
this.alignState();
|
|
12649
|
+
}
|
|
12647
12650
|
update(changedProperties) {
|
|
12648
12651
|
super.update(changedProperties);
|
|
12649
|
-
this.alignState();
|
|
12650
12652
|
|
|
12651
12653
|
// Bail out if we can't get the width/height/rem
|
|
12652
12654
|
if (Number.isNaN(this.width) || Number.isNaN(this.height) || Number.isNaN(this.rem)) {
|
|
@@ -13836,9 +13838,11 @@ class SDTModel extends DecidablesMixinResizeable(DetectableElement) {
|
|
|
13836
13838
|
bubbles: true
|
|
13837
13839
|
}));
|
|
13838
13840
|
}
|
|
13841
|
+
willUpdate() {
|
|
13842
|
+
this.alignState();
|
|
13843
|
+
}
|
|
13839
13844
|
update(changedProperties) {
|
|
13840
13845
|
super.update(changedProperties);
|
|
13841
|
-
this.alignState();
|
|
13842
13846
|
|
|
13843
13847
|
// Bail out if we can't get the width/height
|
|
13844
13848
|
if (Number.isNaN(this.width) || Number.isNaN(this.height) || Number.isNaN(this.rem)) {
|
|
@@ -15184,16 +15188,17 @@ class DetectableTable extends DetectableElement {
|
|
|
15184
15188
|
this.summary = new Set();
|
|
15185
15189
|
this.colors = ['none', 'accuracy', 'stimulus', 'response', 'outcome', 'all'];
|
|
15186
15190
|
this.color = 'all';
|
|
15187
|
-
this.h = 40;
|
|
15188
|
-
this.m = 60;
|
|
15189
|
-
this.fa = 75;
|
|
15190
|
-
this.cr = 25;
|
|
15191
|
-
this.alignState();
|
|
15192
15191
|
this.payoff = false;
|
|
15193
15192
|
this.hPayoff = undefined; // Hit payoff
|
|
15194
15193
|
this.mPayoff = undefined; // Miss payoff
|
|
15195
15194
|
this.crPayoff = undefined; // Correct Rejection payoff
|
|
15196
15195
|
this.faPayoff = undefined; // False Alarm payoff
|
|
15196
|
+
|
|
15197
|
+
this.h = 40;
|
|
15198
|
+
this.m = 60;
|
|
15199
|
+
this.fa = 75;
|
|
15200
|
+
this.cr = 25;
|
|
15201
|
+
this.alignState();
|
|
15197
15202
|
}
|
|
15198
15203
|
alignState() {
|
|
15199
15204
|
this.hr = SDTMath.hM2Hr(this.h, this.m);
|
|
@@ -15486,6 +15491,9 @@ class DetectableTable extends DetectableElement {
|
|
|
15486
15491
|
}
|
|
15487
15492
|
`];
|
|
15488
15493
|
}
|
|
15494
|
+
willUpdate() {
|
|
15495
|
+
this.alignState();
|
|
15496
|
+
}
|
|
15489
15497
|
render() {
|
|
15490
15498
|
const payoffFormatter = new Intl.NumberFormat('en-US', {
|
|
15491
15499
|
style: 'currency',
|
|
@@ -15506,7 +15514,6 @@ class DetectableTable extends DetectableElement {
|
|
|
15506
15514
|
return string + part;
|
|
15507
15515
|
});
|
|
15508
15516
|
};
|
|
15509
|
-
this.alignState();
|
|
15510
15517
|
let h;
|
|
15511
15518
|
let m;
|
|
15512
15519
|
let fa;
|
|
@@ -15876,8 +15883,10 @@ class SDTEquationDC2Far extends SDTEquation {
|
|
|
15876
15883
|
this.alignState();
|
|
15877
15884
|
this.sendEvent();
|
|
15878
15885
|
}
|
|
15879
|
-
|
|
15886
|
+
willUpdate() {
|
|
15880
15887
|
this.alignState();
|
|
15888
|
+
}
|
|
15889
|
+
render() {
|
|
15881
15890
|
let d;
|
|
15882
15891
|
let c;
|
|
15883
15892
|
let s;
|
|
@@ -16042,8 +16051,10 @@ class SDTEquationDC2Hr extends SDTEquation {
|
|
|
16042
16051
|
this.alignState();
|
|
16043
16052
|
this.sendEvent();
|
|
16044
16053
|
}
|
|
16045
|
-
|
|
16054
|
+
willUpdate() {
|
|
16046
16055
|
this.alignState();
|
|
16056
|
+
}
|
|
16057
|
+
render() {
|
|
16047
16058
|
let d;
|
|
16048
16059
|
let c;
|
|
16049
16060
|
let s;
|
|
@@ -16199,8 +16210,10 @@ class SDTEquationFaCr2Far extends SDTEquation {
|
|
|
16199
16210
|
this.alignState();
|
|
16200
16211
|
this.sendEvent();
|
|
16201
16212
|
}
|
|
16202
|
-
|
|
16213
|
+
willUpdate() {
|
|
16203
16214
|
this.alignState();
|
|
16215
|
+
}
|
|
16216
|
+
render() {
|
|
16204
16217
|
let fa;
|
|
16205
16218
|
let cr;
|
|
16206
16219
|
let far;
|
|
@@ -16305,8 +16318,10 @@ class SDTEquationHFa2Ppv extends SDTEquation {
|
|
|
16305
16318
|
this.alignState();
|
|
16306
16319
|
this.sendEvent();
|
|
16307
16320
|
}
|
|
16308
|
-
|
|
16321
|
+
willUpdate() {
|
|
16309
16322
|
this.alignState();
|
|
16323
|
+
}
|
|
16324
|
+
render() {
|
|
16310
16325
|
let h;
|
|
16311
16326
|
let fa;
|
|
16312
16327
|
let ppv;
|
|
@@ -16412,8 +16427,10 @@ class SDTEquationHM2Hr extends SDTEquation {
|
|
|
16412
16427
|
this.alignState();
|
|
16413
16428
|
this.sendEvent();
|
|
16414
16429
|
}
|
|
16415
|
-
|
|
16430
|
+
willUpdate() {
|
|
16416
16431
|
this.alignState();
|
|
16432
|
+
}
|
|
16433
|
+
render() {
|
|
16417
16434
|
let h;
|
|
16418
16435
|
let m;
|
|
16419
16436
|
let hr;
|
|
@@ -16543,8 +16560,10 @@ class SDTEquationHMFaCr2Acc extends SDTEquation {
|
|
|
16543
16560
|
this.alignState();
|
|
16544
16561
|
this.sendEvent();
|
|
16545
16562
|
}
|
|
16546
|
-
|
|
16563
|
+
willUpdate() {
|
|
16547
16564
|
this.alignState();
|
|
16565
|
+
}
|
|
16566
|
+
render() {
|
|
16548
16567
|
let h;
|
|
16549
16568
|
let m;
|
|
16550
16569
|
let fa;
|
|
@@ -16681,8 +16700,10 @@ class SDTEquationHrFar2C extends SDTEquation {
|
|
|
16681
16700
|
this.alignState();
|
|
16682
16701
|
this.sendEvent();
|
|
16683
16702
|
}
|
|
16684
|
-
|
|
16703
|
+
willUpdate() {
|
|
16685
16704
|
this.alignState();
|
|
16705
|
+
}
|
|
16706
|
+
render() {
|
|
16686
16707
|
let hr;
|
|
16687
16708
|
let far;
|
|
16688
16709
|
let s;
|
|
@@ -16844,8 +16865,10 @@ class SDTEquationHrFar2D extends SDTEquation {
|
|
|
16844
16865
|
this.alignState();
|
|
16845
16866
|
this.sendEvent();
|
|
16846
16867
|
}
|
|
16847
|
-
|
|
16868
|
+
willUpdate() {
|
|
16848
16869
|
this.alignState();
|
|
16870
|
+
}
|
|
16871
|
+
render() {
|
|
16849
16872
|
let hr;
|
|
16850
16873
|
let far;
|
|
16851
16874
|
let s;
|
|
@@ -16972,8 +16995,10 @@ class SDTEquationMCr2Fomr extends SDTEquation {
|
|
|
16972
16995
|
this.alignState();
|
|
16973
16996
|
this.sendEvent();
|
|
16974
16997
|
}
|
|
16975
|
-
|
|
16998
|
+
willUpdate() {
|
|
16976
16999
|
this.alignState();
|
|
17000
|
+
}
|
|
17001
|
+
render() {
|
|
16977
17002
|
let m;
|
|
16978
17003
|
let cr;
|
|
16979
17004
|
let fomr;
|
|
@@ -17092,8 +17117,8 @@ customElements.define('sdt-example', SDTExample);
|
|
|
17092
17117
|
<sdt-example-interactive>
|
|
17093
17118
|
*/
|
|
17094
17119
|
class SDTExampleDoubleInteractive extends SDTExample {
|
|
17095
|
-
|
|
17096
|
-
|
|
17120
|
+
connectedCallback() {
|
|
17121
|
+
super.connectedCallback();
|
|
17097
17122
|
this.one = {};
|
|
17098
17123
|
this.one.h = 95;
|
|
17099
17124
|
this.one.m = 5;
|
|
@@ -17226,8 +17251,8 @@ customElements.define('sdt-example-double-interactive', SDTExampleDoubleInteract
|
|
|
17226
17251
|
<sdt-example-human>
|
|
17227
17252
|
*/
|
|
17228
17253
|
class SDTExampleHuman extends SDTExample {
|
|
17229
|
-
|
|
17230
|
-
|
|
17254
|
+
connectedCallback() {
|
|
17255
|
+
super.connectedCallback();
|
|
17231
17256
|
this.count = 1;
|
|
17232
17257
|
this.detectableControl = this.querySelector('detectable-control');
|
|
17233
17258
|
this.rdkTask = this.querySelector('rdk-task');
|
|
@@ -17389,8 +17414,8 @@ customElements.define('sdt-example-human', SDTExampleHuman);
|
|
|
17389
17414
|
<sdt-example-interactive>
|
|
17390
17415
|
*/
|
|
17391
17416
|
class SDTExampleInteractive extends SDTExample {
|
|
17392
|
-
|
|
17393
|
-
|
|
17417
|
+
connectedCallback() {
|
|
17418
|
+
super.connectedCallback();
|
|
17394
17419
|
this.detectableControl = this.querySelector('detectable-control');
|
|
17395
17420
|
this.detectableTable = this.querySelector('detectable-table');
|
|
17396
17421
|
this.rocSpace = this.querySelector('roc-space');
|
|
@@ -17487,8 +17512,8 @@ customElements.define('sdt-example-interactive', SDTExampleInteractive);
|
|
|
17487
17512
|
<sdt-example-model>
|
|
17488
17513
|
*/
|
|
17489
17514
|
class SDTExampleModel extends SDTExample {
|
|
17490
|
-
|
|
17491
|
-
|
|
17515
|
+
connectedCallback() {
|
|
17516
|
+
super.connectedCallback();
|
|
17492
17517
|
this.count = 1;
|
|
17493
17518
|
this.detectableControl = this.querySelector('detectable-control');
|
|
17494
17519
|
this.rdkTask = this.querySelector('rdk-task');
|
|
@@ -17682,8 +17707,8 @@ class SDTExampleMultiple extends SDTExample {
|
|
|
17682
17707
|
this.variable = 'd';
|
|
17683
17708
|
this.values = [0, 1];
|
|
17684
17709
|
}
|
|
17685
|
-
|
|
17686
|
-
|
|
17710
|
+
connectedCallback() {
|
|
17711
|
+
super.connectedCallback();
|
|
17687
17712
|
this.detectableControl = this.querySelector('detectable-control');
|
|
17688
17713
|
this.rocSpace = this.querySelector('roc-space');
|
|
17689
17714
|
this.sdtModel = this.querySelector('sdt-model');
|
|
@@ -17729,8 +17754,8 @@ customElements.define('sdt-example-multiple', SDTExampleMultiple);
|
|
|
17729
17754
|
<sdt-example-unequal>
|
|
17730
17755
|
*/
|
|
17731
17756
|
class SDTExampleUnequal extends SDTExample {
|
|
17732
|
-
|
|
17733
|
-
|
|
17757
|
+
connectedCallback() {
|
|
17758
|
+
super.connectedCallback();
|
|
17734
17759
|
this.detectableControl = this.querySelector('detectable-control');
|
|
17735
17760
|
this.rocSpace = this.querySelector('roc-space');
|
|
17736
17761
|
this.sdtModel = this.querySelector('sdt-model');
|