@brightspace-ui/labs 2.34.0 → 2.34.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
@@ -114,5 +114,5 @@
114
114
  "resize-observer-polyfill": "^1",
115
115
  "webvtt-parser": "^2.1.2"
116
116
  },
117
- "version": "2.34.0"
117
+ "version": "2.34.2"
118
118
  }
@@ -57,7 +57,7 @@ Components used for rendering grades in Brightspace.
57
57
  | `includeReportsButton` | All | `boolean` | `false` | Determines whether the reports icon button is rendered. |
58
58
  | `gradeButtonTooltip` | All | `string` | `''` | The text that is inside of the tooltip when hovering over the grades button. |
59
59
  | `reportsButtonTooltip` | All | `string` | `''` | The text that is inside of the tooltip when hovering over the reports button. |
60
- | `readOnly` | All | `boolean` | `false` | Set to `true` if the user does not have permissions to edit the grade. |
60
+ | `readonly` | All | `boolean` | `false` | Set to `true` if the user does not have permissions to edit the grade. |
61
61
  | `isManualOverrideActive` | All | `boolean` | `false` | Set to `true` if the user is currently manually overriding the grade. This will display the button to 'Clear Manual Override'. |
62
62
  | `hideTitle` | All | `boolean` | `false` | This property will hide the "Overall Grade" title above the component. |
63
63
  | `customManualOverrideClearText` | All | `string` | `undefined` | This property will substitute the stock text on the "Clear Manual Override" button. |
@@ -12,8 +12,8 @@ export class D2LGradeResultLetterScore extends LocalizeLabsElement(LitElement) {
12
12
  return {
13
13
  availableOptions: { type: Object },
14
14
  label: { type: String },
15
- selectedOption: { type: String },
16
- readOnly: { type: Boolean }
15
+ selectedOption: { attribute: 'selected-option', type: String },
16
+ readonly: { type: Boolean }
17
17
  };
18
18
  }
19
19
 
@@ -39,7 +39,7 @@ export class D2LGradeResultLetterScore extends LocalizeLabsElement(LitElement) {
39
39
  }
40
40
 
41
41
  render() {
42
- if (!this.readOnly) {
42
+ if (!this.readonly) {
43
43
  return html`
44
44
  <div class="d2l-grade-result-letter-score-container">
45
45
  <select
@@ -21,12 +21,12 @@ export class D2LGradeResultNumericScore extends LocalizeLabsElement(LitElement)
21
21
  static get properties() {
22
22
  return {
23
23
  label: { type: String },
24
- scoreNumerator: { type: Number, converter: numberConverter },
25
- scoreDenominator: { type: Number },
26
- readOnly: { type: Boolean },
24
+ scoreNumerator: { attribute: 'score-numerator', type: Number, converter: numberConverter },
25
+ scoreDenominator: { attribute: 'score-denominator', type: Number },
26
+ readonly: { type: Boolean },
27
27
  required: { type: Boolean },
28
- allowNegativeScore: { type: Boolean },
29
- showFlooredScoreWarning: { type: Boolean },
28
+ allowNegativeScore: { attribute: 'allow-negative-score', type: Boolean },
29
+ showFlooredScoreWarning: { attribute: 'show-floored-score-warning', type: Boolean },
30
30
  };
31
31
  }
32
32
 
@@ -57,7 +57,7 @@ export class D2LGradeResultNumericScore extends LocalizeLabsElement(LitElement)
57
57
 
58
58
  return html`
59
59
  <div class="d2l-grade-result-numeric-score-container">
60
- ${!this.readOnly ? html`
60
+ ${!this.readonly ? html`
61
61
  <div class="d2l-grade-result-numeric-score-score">
62
62
  <d2l-form>
63
63
  <d2l-input-number
@@ -89,7 +89,7 @@ export class D2LGradeResultPresentational extends LocalizeLabsElement(LitElement
89
89
  * Set to true if the user does not have permissions to edit the grade
90
90
  * @type {boolean}
91
91
  */
92
- readOnly: { type: Boolean },
92
+ readonly: { type: Boolean },
93
93
  /**
94
94
  * The text that is inside of the tooltip when hovering over the reports button
95
95
  * @type {string}
@@ -167,7 +167,7 @@ export class D2LGradeResultPresentational extends LocalizeLabsElement(LitElement
167
167
  this.includeReportsButton = false;
168
168
  this.isManualOverrideActive = false;
169
169
  this.labelHeadingLevel = undefined;
170
- this.readOnly = false;
170
+ this.readonly = false;
171
171
  this.selectedLetterGrade = '';
172
172
  this.showFlooredScoreWarning = false;
173
173
  this.subtitleText = undefined;
@@ -191,10 +191,6 @@ export class D2LGradeResultPresentational extends LocalizeLabsElement(LitElement
191
191
  `;
192
192
  }
193
193
 
194
- _isReadOnly() {
195
- return Boolean(this.readOnly);
196
- }
197
-
198
194
  _onGradeButtonClick() {
199
195
  this.dispatchEvent(new CustomEvent('d2l-grade-result-grade-button-click', {
200
196
  bubbles: true,
@@ -248,9 +244,9 @@ export class D2LGradeResultPresentational extends LocalizeLabsElement(LitElement
248
244
  return html`
249
245
  <d2l-labs-grade-result-letter-score
250
246
  .availableOptions=${this.letterGradeOptions}
251
- .label=${this.inputLabelText}
252
- .readOnly=${this._isReadOnly()}
253
- .selectedOption=${this.selectedLetterGrade}
247
+ label=${this.inputLabelText}
248
+ ?readonly=${this.readonly}
249
+ selected-option=${ifDefined(this.selectedLetterGrade)}
254
250
  ></d2l-labs-grade-result-letter-score>
255
251
  `;
256
252
  }
@@ -275,13 +271,13 @@ export class D2LGradeResultPresentational extends LocalizeLabsElement(LitElement
275
271
  _renderNumericScoreComponent() {
276
272
  return html`
277
273
  <d2l-labs-grade-result-numeric-score
278
- ?allowNegativeScore=${this.allowNegativeScore}
279
- .label=${this.inputLabelText}
280
- .readOnly=${this._isReadOnly()}
274
+ ?allow-negative-score=${this.allowNegativeScore}
275
+ label=${this.inputLabelText}
276
+ ?readonly=${this.readonly}
281
277
  ?required=${this.required}
282
278
  .scoreDenominator=${this.scoreDenominator}
283
279
  .scoreNumerator=${this.scoreNumerator}
284
- ?showFlooredScoreWarning=${this.showFlooredScoreWarning}
280
+ ?show-floored-score-warning=${this.showFlooredScoreWarning}
285
281
  ></d2l-labs-grade-result-numeric-score>
286
282
  `;
287
283
  }