@brightspace-ui/labs 2.55.1 → 2.56.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/demo/components/ou-filter/ouFilterDemoPage.js +14 -16
- package/package.json +4 -3
- package/src/components/accessibility-disability-simulator/accessibility-disability-simulator.js +70 -74
- package/src/components/accordion/accordion-collapse.js +161 -164
- package/src/components/accordion/accordion.js +14 -17
- package/src/components/attribute-picker/attribute-picker-item.js +63 -66
- package/src/components/attribute-picker/attribute-picker.js +118 -121
- package/src/components/card-overlay/card-overlay.js +53 -55
- package/src/components/checkbox-drawer/checkbox-drawer.js +32 -36
- package/src/components/community/community-base.js +3 -5
- package/src/components/community/community-button.js +3 -5
- package/src/components/community/community-link.js +4 -6
- package/src/components/file-uploader/file-uploader.js +148 -151
- package/src/components/grade-result/grade-result-icon-button.js +5 -6
- package/src/components/grade-result/grade-result-letter-score.js +18 -22
- package/src/components/grade-result/grade-result-numeric-score.js +25 -28
- package/src/components/grade-result/grade-result-presentational.js +133 -136
- package/src/components/grade-result/grade-result-student-grade-preview.js +38 -42
- package/src/components/media-player/media-player-audio-bars.js +28 -31
- package/src/components/media-player/media-player.js +471 -475
- package/src/components/media-player/slider-bar.js +119 -122
- package/src/components/navigation/navigation-band.js +69 -71
- package/src/components/navigation/navigation-button-icon.js +51 -55
- package/src/components/navigation/navigation-dropdown-button-custom.js +13 -17
- package/src/components/navigation/navigation-dropdown-button-icon.js +21 -25
- package/src/components/navigation/navigation-immersive.js +128 -132
- package/src/components/navigation/navigation-iterator.js +24 -24
- package/src/components/navigation/navigation-link-back.js +13 -17
- package/src/components/navigation/navigation-link-icon.js +36 -40
- package/src/components/navigation/navigation-link-image.js +31 -35
- package/src/components/navigation/navigation-link.js +34 -38
- package/src/components/navigation/navigation-main-footer.js +7 -9
- package/src/components/navigation/navigation-main-header.js +34 -36
- package/src/components/navigation/navigation-notification-icon.js +30 -34
- package/src/components/navigation/navigation.js +19 -23
- package/src/components/opt-in-flyout/flyout-impl.js +138 -146
- package/src/components/opt-in-flyout/opt-in-flyout.js +14 -18
- package/src/components/opt-in-flyout/opt-out-dialog.js +63 -67
- package/src/components/opt-in-flyout/opt-out-flyout.js +15 -19
- package/src/components/opt-in-flyout/opt-out-reason-selector.js +38 -45
- package/src/components/opt-in-flyout/opt-out-reason.js +9 -13
- package/src/components/ou-filter/ou-filter.js +14 -18
- package/src/components/ou-filter/tree-filter.js +22 -26
- package/src/components/ou-filter/tree-selector-node.js +62 -66
- package/src/components/ou-filter/tree-selector.js +55 -62
- package/src/components/pagination/pager-numeric.js +35 -39
- package/src/components/view-toggle/view-toggle.js +79 -81
- package/src/components/wizard/single-step-header.js +106 -110
- package/src/components/wizard/wizard-step.js +65 -68
- package/src/components/wizard/wizard.js +30 -33
- package/src/utilities/reactive-store/README.md +10 -15
|
@@ -20,143 +20,140 @@ const numberConverter = {
|
|
|
20
20
|
* @fires d2l-grade-result-reports-button-click - Dispatched when the reports button is clicked.
|
|
21
21
|
*/
|
|
22
22
|
export class D2LGradeResultPresentational extends LocalizeLabsElement(LitElement) {
|
|
23
|
-
static get properties() {
|
|
24
|
-
return {
|
|
25
|
-
/**
|
|
26
|
-
* Set to true if negative scores can be entered
|
|
27
|
-
* @type {boolean}
|
|
28
|
-
*/
|
|
29
|
-
allowNegativeScore: { attribute: 'allow-negative-score', type: Boolean },
|
|
30
|
-
/**
|
|
31
|
-
* This property will substitute the stock text on the "Clear Manual Override" button
|
|
32
|
-
* @type {string}
|
|
33
|
-
*/
|
|
34
|
-
customManualOverrideClearText: { attribute: 'custom-manual-override-clear-text', type: String },
|
|
35
|
-
/**
|
|
36
|
-
* @type {boolean}
|
|
37
|
-
*/
|
|
38
|
-
displayStudentGradePreview: { type: Boolean, attribute: 'display-student-grade-preview' },
|
|
39
|
-
/**
|
|
40
|
-
* The text that is inside of the tooltip when hovering over the grades button
|
|
41
|
-
* @type {string}
|
|
42
|
-
*/
|
|
43
|
-
gradeButtonTooltip: { attribute: 'grade-button-tooltip', type: String },
|
|
44
|
-
/**
|
|
45
|
-
* Specifies the type of grade that the component is meant to render
|
|
46
|
-
* @type {'Numeric'|'LetterGrade'}
|
|
47
|
-
*/
|
|
48
|
-
gradeType: { attribute: 'grade-type', type: String },
|
|
49
|
-
/**
|
|
50
|
-
* This property will hide the "Overall Grade" title above the component
|
|
51
|
-
* @type {boolean}
|
|
52
|
-
*/
|
|
53
|
-
hideTitle: { attribute: 'hide-title', type: Boolean },
|
|
54
|
-
/**
|
|
55
|
-
* Determines whether the grades icon button is rendered
|
|
56
|
-
* @type {boolean}
|
|
57
|
-
*/
|
|
58
|
-
includeGradeButton: { attribute: 'include-grade-button', type: Boolean },
|
|
59
|
-
/**
|
|
60
|
-
* Determines whether the reports icon button is rendered
|
|
61
|
-
* @type {boolean}
|
|
62
|
-
*/
|
|
63
|
-
includeReportsButton: { attribute: 'include-reports-button', type: Boolean },
|
|
64
|
-
/**
|
|
65
|
-
* This property sets the label that will be used inside the aria-label and validation error tooltips
|
|
66
|
-
* @type {string}
|
|
67
|
-
*/
|
|
68
|
-
inputLabelText: { attribute: 'input-label-text', type: String },
|
|
69
|
-
/**
|
|
70
|
-
* Set to true if the user is currently manually overriding the grade. This will display the button to 'Clear Manual Override'.
|
|
71
|
-
* @type {boolean}
|
|
72
|
-
*/
|
|
73
|
-
isManualOverrideActive: { attribute: 'is-manual-override-active', type: Boolean },
|
|
74
|
-
/**
|
|
75
|
-
* @type {number}
|
|
76
|
-
*/
|
|
77
|
-
labelHeadingLevel: { attribute: 'label-heading-level', type: Number },
|
|
78
|
-
/**
|
|
79
|
-
* The text that appears above the component
|
|
80
|
-
* @type {string}
|
|
81
|
-
*/
|
|
82
|
-
labelText: { attribute: 'label-text', type: String },
|
|
83
|
-
/**
|
|
84
|
-
* A dictionary where the key is a unique id and the value is an object containing the LetterGrade text and the PercentStart
|
|
85
|
-
* @type {object}
|
|
86
|
-
*/
|
|
87
|
-
letterGradeOptions: { attribute: 'letter-grade-options', type: Object },
|
|
88
|
-
/**
|
|
89
|
-
* Set to true if the user does not have permissions to edit the grade
|
|
90
|
-
* @type {boolean}
|
|
91
|
-
*/
|
|
92
|
-
readonly: { type: Boolean },
|
|
93
|
-
/**
|
|
94
|
-
* The text that is inside of the tooltip when hovering over the reports button
|
|
95
|
-
* @type {string}
|
|
96
|
-
*/
|
|
97
|
-
reportsButtonTooltip: { attribute: 'reports-button-tooltip', type: String },
|
|
98
|
-
/**
|
|
99
|
-
* Set to true if an undefined/blank grade is not considered valid
|
|
100
|
-
* @type {boolean}
|
|
101
|
-
*/
|
|
102
|
-
required: { type: Boolean },
|
|
103
|
-
/**
|
|
104
|
-
* The denominator of the numeric score that is given
|
|
105
|
-
* @type {number}
|
|
106
|
-
*/
|
|
107
|
-
scoreDenominator: { attribute: 'score-denominator', type: Number },
|
|
108
|
-
/**
|
|
109
|
-
* The numerator of the numeric score that is given
|
|
110
|
-
* @type {number}
|
|
111
|
-
*/
|
|
112
|
-
scoreNumerator: { attribute: 'score-numerator', type: Number, converter: numberConverter },
|
|
113
|
-
/**
|
|
114
|
-
* The current selected letter grade of the options given
|
|
115
|
-
* @type {string}
|
|
116
|
-
*/
|
|
117
|
-
selectedLetterGrade: { attribute: 'selected-letter-grade', type: String },
|
|
118
|
-
/**
|
|
119
|
-
* Set to true if displaying a negative grade that has been floored at 0
|
|
120
|
-
* @type {boolean}
|
|
121
|
-
*/
|
|
122
|
-
showFlooredScoreWarning: { attribute: 'show-floored-score-warning', type: Boolean },
|
|
123
|
-
/**
|
|
124
|
-
* This property will show the given text under the title
|
|
125
|
-
* @type {string}
|
|
126
|
-
*/
|
|
127
|
-
subtitleText: { attribute: 'subtitle-text', type: String },
|
|
128
|
-
/**
|
|
129
|
-
* @type {object}
|
|
130
|
-
*/
|
|
131
|
-
studentGradePreview: { type: Object, attribute: 'student-grade-preview' },
|
|
132
|
-
};
|
|
133
|
-
}
|
|
134
23
|
|
|
135
|
-
static
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
24
|
+
static properties = {
|
|
25
|
+
/**
|
|
26
|
+
* Set to true if negative scores can be entered
|
|
27
|
+
* @type {boolean}
|
|
28
|
+
*/
|
|
29
|
+
allowNegativeScore: { attribute: 'allow-negative-score', type: Boolean },
|
|
30
|
+
/**
|
|
31
|
+
* This property will substitute the stock text on the "Clear Manual Override" button
|
|
32
|
+
* @type {string}
|
|
33
|
+
*/
|
|
34
|
+
customManualOverrideClearText: { attribute: 'custom-manual-override-clear-text', type: String },
|
|
35
|
+
/**
|
|
36
|
+
* @type {boolean}
|
|
37
|
+
*/
|
|
38
|
+
displayStudentGradePreview: { type: Boolean, attribute: 'display-student-grade-preview' },
|
|
39
|
+
/**
|
|
40
|
+
* The text that is inside of the tooltip when hovering over the grades button
|
|
41
|
+
* @type {string}
|
|
42
|
+
*/
|
|
43
|
+
gradeButtonTooltip: { attribute: 'grade-button-tooltip', type: String },
|
|
44
|
+
/**
|
|
45
|
+
* Specifies the type of grade that the component is meant to render
|
|
46
|
+
* @type {'Numeric'|'LetterGrade'}
|
|
47
|
+
*/
|
|
48
|
+
gradeType: { attribute: 'grade-type', type: String },
|
|
49
|
+
/**
|
|
50
|
+
* This property will hide the "Overall Grade" title above the component
|
|
51
|
+
* @type {boolean}
|
|
52
|
+
*/
|
|
53
|
+
hideTitle: { attribute: 'hide-title', type: Boolean },
|
|
54
|
+
/**
|
|
55
|
+
* Determines whether the grades icon button is rendered
|
|
56
|
+
* @type {boolean}
|
|
57
|
+
*/
|
|
58
|
+
includeGradeButton: { attribute: 'include-grade-button', type: Boolean },
|
|
59
|
+
/**
|
|
60
|
+
* Determines whether the reports icon button is rendered
|
|
61
|
+
* @type {boolean}
|
|
62
|
+
*/
|
|
63
|
+
includeReportsButton: { attribute: 'include-reports-button', type: Boolean },
|
|
64
|
+
/**
|
|
65
|
+
* This property sets the label that will be used inside the aria-label and validation error tooltips
|
|
66
|
+
* @type {string}
|
|
67
|
+
*/
|
|
68
|
+
inputLabelText: { attribute: 'input-label-text', type: String },
|
|
69
|
+
/**
|
|
70
|
+
* Set to true if the user is currently manually overriding the grade. This will display the button to 'Clear Manual Override'.
|
|
71
|
+
* @type {boolean}
|
|
72
|
+
*/
|
|
73
|
+
isManualOverrideActive: { attribute: 'is-manual-override-active', type: Boolean },
|
|
74
|
+
/**
|
|
75
|
+
* @type {number}
|
|
76
|
+
*/
|
|
77
|
+
labelHeadingLevel: { attribute: 'label-heading-level', type: Number },
|
|
78
|
+
/**
|
|
79
|
+
* The text that appears above the component
|
|
80
|
+
* @type {string}
|
|
81
|
+
*/
|
|
82
|
+
labelText: { attribute: 'label-text', type: String },
|
|
83
|
+
/**
|
|
84
|
+
* A dictionary where the key is a unique id and the value is an object containing the LetterGrade text and the PercentStart
|
|
85
|
+
* @type {object}
|
|
86
|
+
*/
|
|
87
|
+
letterGradeOptions: { attribute: 'letter-grade-options', type: Object },
|
|
88
|
+
/**
|
|
89
|
+
* Set to true if the user does not have permissions to edit the grade
|
|
90
|
+
* @type {boolean}
|
|
91
|
+
*/
|
|
92
|
+
readonly: { type: Boolean },
|
|
93
|
+
/**
|
|
94
|
+
* The text that is inside of the tooltip when hovering over the reports button
|
|
95
|
+
* @type {string}
|
|
96
|
+
*/
|
|
97
|
+
reportsButtonTooltip: { attribute: 'reports-button-tooltip', type: String },
|
|
98
|
+
/**
|
|
99
|
+
* Set to true if an undefined/blank grade is not considered valid
|
|
100
|
+
* @type {boolean}
|
|
101
|
+
*/
|
|
102
|
+
required: { type: Boolean },
|
|
103
|
+
/**
|
|
104
|
+
* The denominator of the numeric score that is given
|
|
105
|
+
* @type {number}
|
|
106
|
+
*/
|
|
107
|
+
scoreDenominator: { attribute: 'score-denominator', type: Number },
|
|
108
|
+
/**
|
|
109
|
+
* The numerator of the numeric score that is given
|
|
110
|
+
* @type {number}
|
|
111
|
+
*/
|
|
112
|
+
scoreNumerator: { attribute: 'score-numerator', type: Number, converter: numberConverter },
|
|
113
|
+
/**
|
|
114
|
+
* The current selected letter grade of the options given
|
|
115
|
+
* @type {string}
|
|
116
|
+
*/
|
|
117
|
+
selectedLetterGrade: { attribute: 'selected-letter-grade', type: String },
|
|
118
|
+
/**
|
|
119
|
+
* Set to true if displaying a negative grade that has been floored at 0
|
|
120
|
+
* @type {boolean}
|
|
121
|
+
*/
|
|
122
|
+
showFlooredScoreWarning: { attribute: 'show-floored-score-warning', type: Boolean },
|
|
123
|
+
/**
|
|
124
|
+
* This property will show the given text under the title
|
|
125
|
+
* @type {string}
|
|
126
|
+
*/
|
|
127
|
+
subtitleText: { attribute: 'subtitle-text', type: String },
|
|
128
|
+
/**
|
|
129
|
+
* @type {object}
|
|
130
|
+
*/
|
|
131
|
+
studentGradePreview: { type: Object, attribute: 'student-grade-preview' },
|
|
132
|
+
};
|
|
133
|
+
|
|
134
|
+
static styles = [bodySmallStyles, labelStyles, css`
|
|
135
|
+
.d2l-grade-result-presentational-container {
|
|
136
|
+
display: flex;
|
|
137
|
+
flex-wrap: wrap;
|
|
138
|
+
gap: 0 0.9rem;
|
|
139
|
+
}
|
|
140
|
+
.d2l-grade-result-presentational-score-container {
|
|
141
|
+
display: flex;
|
|
142
|
+
flex-wrap: wrap;
|
|
143
|
+
gap: 0.3rem;
|
|
144
|
+
}
|
|
145
|
+
.d2l-grade-result-manual-override-clear {
|
|
146
|
+
margin-top: 0.3rem;
|
|
147
|
+
}
|
|
148
|
+
.d2l-label-text {
|
|
149
|
+
line-height: 1.6rem;
|
|
150
|
+
margin-bottom: 0.4rem;
|
|
151
|
+
}
|
|
152
|
+
.d2l-grade-result-presentational-subtitle {
|
|
153
|
+
font-weight: bold;
|
|
154
|
+
margin-top: -4px;
|
|
155
|
+
}
|
|
156
|
+
`];
|
|
160
157
|
|
|
161
158
|
constructor() {
|
|
162
159
|
super();
|
|
@@ -12,49 +12,45 @@ const previewOptions = {
|
|
|
12
12
|
|
|
13
13
|
export class D2LGradeResultStudentGradePreview extends LocalizeLabsElement(LitElement) {
|
|
14
14
|
|
|
15
|
-
static
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
};
|
|
30
|
-
}
|
|
15
|
+
static properties = {
|
|
16
|
+
hideLabel: {
|
|
17
|
+
type: Boolean,
|
|
18
|
+
attribute: 'hide-label'
|
|
19
|
+
},
|
|
20
|
+
outOf: {
|
|
21
|
+
type: Number,
|
|
22
|
+
attribute: 'out-of'
|
|
23
|
+
},
|
|
24
|
+
studentGradePreview: {
|
|
25
|
+
type: Object,
|
|
26
|
+
attribute: 'student-grade-preview'
|
|
27
|
+
}
|
|
28
|
+
};
|
|
31
29
|
|
|
32
|
-
static
|
|
33
|
-
|
|
34
|
-
:
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
:
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
`];
|
|
57
|
-
}
|
|
30
|
+
static styles = [bodySmallStyles, bodyCompactStyles, labelStyles, css`
|
|
31
|
+
:host {
|
|
32
|
+
display: inline-block;
|
|
33
|
+
}
|
|
34
|
+
:host([hidden]) {
|
|
35
|
+
display: none;
|
|
36
|
+
}
|
|
37
|
+
.d2l-grade-result-student-grade-preview-container {
|
|
38
|
+
align-items: center;
|
|
39
|
+
display: flex;
|
|
40
|
+
flex-direction: row;
|
|
41
|
+
gap: 0.5rem;
|
|
42
|
+
min-height: calc(2rem + 2px);
|
|
43
|
+
}
|
|
44
|
+
.d2l-grade-result-student-grade-preview-colour {
|
|
45
|
+
border-radius: 6px;
|
|
46
|
+
height: 0.9rem;
|
|
47
|
+
width: 0.9rem;
|
|
48
|
+
}
|
|
49
|
+
.d2l-label-text {
|
|
50
|
+
line-height: 1.6rem;
|
|
51
|
+
margin-bottom: 0.4rem;
|
|
52
|
+
}
|
|
53
|
+
`];
|
|
58
54
|
|
|
59
55
|
constructor() {
|
|
60
56
|
super();
|
|
@@ -61,41 +61,38 @@ const AUDIO_BAR_WIDTH_PX = AUDIO_BAR_WIDTH_REM * PX_PER_REM;
|
|
|
61
61
|
const AUDIO_BAR_HORIZONTAL_MARGIN_PX = AUDIO_BAR_HORIZONTAL_MARGIN_REM * PX_PER_REM;
|
|
62
62
|
|
|
63
63
|
class MediaPlayerAudioBars extends LitElement {
|
|
64
|
-
static get properties() {
|
|
65
|
-
return {
|
|
66
|
-
playing: { type: Boolean },
|
|
67
|
-
_visibleAudioBars: { type: Array, attribute: false },
|
|
68
|
-
};
|
|
69
|
-
}
|
|
70
64
|
|
|
71
|
-
static
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
}
|
|
65
|
+
static properties = {
|
|
66
|
+
playing: { type: Boolean },
|
|
67
|
+
_visibleAudioBars: { type: Array, attribute: false },
|
|
68
|
+
};
|
|
76
69
|
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
height: 100%;
|
|
82
|
-
justify-content: center;
|
|
83
|
-
}
|
|
70
|
+
static styles = css`
|
|
71
|
+
:host {
|
|
72
|
+
width: 100%;
|
|
73
|
+
}
|
|
84
74
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
75
|
+
#d2l-labs-media-player-audio-bars-row {
|
|
76
|
+
align-items: center;
|
|
77
|
+
display: flex;
|
|
78
|
+
flex-direction: row;
|
|
79
|
+
height: 100%;
|
|
80
|
+
justify-content: center;
|
|
81
|
+
}
|
|
90
82
|
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
83
|
+
#d2l-labs-media-player-audio-bar-container {
|
|
84
|
+
display: flex;
|
|
85
|
+
flex-direction: column;
|
|
86
|
+
height: 100%;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.d2l-labs-media-player-audio-bar {
|
|
90
|
+
border-top-left-radius: 0.075rem;
|
|
91
|
+
border-top-right-radius: 0.075rem;
|
|
92
|
+
margin: 0 ${AUDIO_BAR_HORIZONTAL_MARGIN_REM}rem;
|
|
93
|
+
width: ${AUDIO_BAR_WIDTH_REM}rem;
|
|
94
|
+
}
|
|
95
|
+
`;
|
|
99
96
|
|
|
100
97
|
constructor() {
|
|
101
98
|
super();
|