@decidables/discountable-elements 0.1.0 → 0.2.0

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.
@@ -851,7 +851,7 @@ const Au=t=>null!=t?t:k;customElements.define("decidables-slider",class extends
851
851
  ${this.reset?H`<decidables-button name="reset" ?disabled=${"resetted"===this.state} @click=${this.doReset.bind(this)}>Reset</decidables-button>`:H``}
852
852
  </div>
853
853
  `:H``}
854
- </div>`}}customElements.define("discountable-control",Lu);class Su extends xu{static get properties(){return{trial:{attribute:"trial",type:Boolean,reflect:!0},feedback:{attribute:"feedback",type:Boolean,reflect:!0},state:{attribute:!1,type:String,reflect:!1},trialCount:{attribute:!1,type:Number,reflect:!1},trialTotal:{attribute:!1,type:Number,reflect:!1}}}constructor(){super(),this.trial=!1,this.feedback=!1,this.states=["off","waiting","feedback"],this.state="off",this.trialCount=0,this.trialTotal=0,this.as=0,this.ds=0,this.al=0,this.dl=0,this.responses=["first","second","nr"],this.response=void 0}start(t,e,n,i,s){this.state="waiting",this.as=t,this.ds=e,this.al=n,this.dl=i,this.trialCount=s,this.response=void 0}stop(){this.state="feedback",void 0===this.response&&(this.response="nr")}first(){this.responded("first")}second(){this.responded("second")}responded(t){this.state="feedback",this.response=t,this.dispatchEvent(new CustomEvent("discountable-response",{detail:{trial:this.trialCount,as:this.as,ds:this.ds,al:this.al,dl:this.dl,response:this.response},bubbles:!0}))}reset(){this.state="off",this.trialCount=0,this.response=void 0}static get styles(){return[super.styles,a`
854
+ </div>`}}customElements.define("discountable-control",Lu);class Su extends xu{static get properties(){return{feedback:{attribute:"feedback",type:Boolean,reflect:!0},trial:{attribute:"trial",type:Boolean,reflect:!0},state:{attribute:!1,type:String,reflect:!1},trialCount:{attribute:!1,type:Number,reflect:!1},trialTotal:{attribute:!1,type:Number,reflect:!1}}}constructor(){super(),this.trial=!1,this.feedback=!1,this.states=["off","waiting","feedback"],this.state="off",this.trialCount=0,this.trialTotal=0,this.as=0,this.ds=0,this.al=0,this.dl=0,this.responses=["first","second","nr"],this.response=void 0}start(t,e,n,i,s){this.state="waiting",this.as=t,this.ds=e,this.al=n,this.dl=i,this.trialCount=s,this.response=void 0}stop(){this.state="feedback",void 0===this.response&&(this.response="nr")}first(){this.responded("first")}second(){this.responded("second")}responded(t){this.state="feedback",this.response=t,this.dispatchEvent(new CustomEvent("discountable-response",{detail:{trial:this.trialCount,as:this.as,ds:this.ds,al:this.al,dl:this.dl,response:this.response},bubbles:!0}))}reset(){this.state="off",this.trialCount=0,this.response=void 0}static get styles(){return[super.styles,a`
855
855
  :host {
856
856
  display: inline-block;
857
857
  }
@@ -1515,7 +1515,8 @@ const Ru=2;let Xu=class{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,
1515
1515
  }
1516
1516
  `]}sendEvent(){this.dispatchEvent(new CustomEvent("itc-choice-change",{detail:{as:this.as,ds:this.ds,al:this.al,dl:this.dl},bubbles:!0}))}ssChange(t){this.as=parseFloat(t.detail.a),this.ds=parseFloat(t.detail.d),this.sendEvent()}llChange(t){this.al=parseFloat(t.detail.a),this.dl=parseFloat(t.detail.d),this.sendEvent()}render(){return H`
1517
1517
  <div class="holder">
1518
- <itc-option
1518
+ <itc-option
1519
+ class="ss"
1519
1520
  state=${this.state}
1520
1521
  ?interactive=${this.interactive}
1521
1522
  amount="${this.as}"
@@ -1523,7 +1524,8 @@ const Ru=2;let Xu=class{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,
1523
1524
  @itc-option-change=${this.ssChange.bind(this)}>
1524
1525
  </itc-option><span class="query"
1525
1526
  >${"choice"===this.state?"?":"fixation"===this.state?"+":H`∙`}</span
1526
- ><itc-option
1527
+ ><itc-option
1528
+ class="ll"
1527
1529
  state=${this.state}
1528
1530
  ?interactive=${this.interactive}
1529
1531
  amount="${this.al}"