@brightspace-ui-labs/facet-filter-sort 4.2.0 → 4.2.1
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/README.md
CHANGED
|
@@ -233,9 +233,9 @@ npm test
|
|
|
233
233
|
|
|
234
234
|
## Versioning & Releasing
|
|
235
235
|
|
|
236
|
-
> TL;DR: Commits prefixed with `fix:` and `feat:` will trigger patch and minor releases when merged to `
|
|
236
|
+
> TL;DR: Commits prefixed with `fix:` and `feat:` will trigger patch and minor releases when merged to `main`. Read on for more details...
|
|
237
237
|
|
|
238
|
-
The [
|
|
238
|
+
The [semantic-release GitHub Action](https://github.com/BrightspaceUI/actions/tree/main/semantic-release) is called from the `release.yml` GitHub Action workflow to handle version changes and releasing.
|
|
239
239
|
|
|
240
240
|
### Version Changes
|
|
241
241
|
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
|
|
1
|
+
import '@brightspace-ui/core/components/button/button-subtle.js';
|
|
2
2
|
import '@brightspace-ui-labs/multi-select/multi-select-list.js';
|
|
3
3
|
import '@brightspace-ui-labs/multi-select/multi-select-list-item.js';
|
|
4
|
-
import {
|
|
4
|
+
import { css, html, LitElement } from 'lit-element/lit-element.js';
|
|
5
|
+
import { announce } from '@brightspace-ui/core/helpers/announce.js';
|
|
6
|
+
import { bodyCompactStyles } from '@brightspace-ui/core/components/typography/styles.js';
|
|
5
7
|
import { IdSubscriberController } from '@brightspace-ui/core/controllers/subscriber/subscriberControllers.js';
|
|
6
8
|
import { LocalizeStaticMixin } from '@brightspace-ui/core/mixins/localize-static-mixin.js';
|
|
7
9
|
import { RtlMixin } from '@brightspace-ui/core/mixins/rtl-mixin.js';
|
|
8
|
-
import { announce } from '@brightspace-ui/core/helpers/announce.js';
|
|
9
|
-
import { bodyCompactStyles } from '@brightspace-ui/core/components/typography/styles.js';
|
|
10
10
|
|
|
11
|
+
// eslint-disable-next-line sort-imports
|
|
11
12
|
import ar from './lang/ar-sa.js';
|
|
12
13
|
import de from './lang/de.js';
|
|
13
14
|
import en from './lang/en.js';
|
|
@@ -61,22 +62,22 @@ class D2lLabsAppliedCoreFilters extends RtlMixin(LocalizeStaticMixin(LitElement)
|
|
|
61
62
|
}
|
|
62
63
|
|
|
63
64
|
.d2l-labs-applied-filters-label {
|
|
64
|
-
margin-right: 0.25rem;
|
|
65
65
|
display: inline-block;
|
|
66
|
-
padding-top: 0.3rem;
|
|
67
66
|
font-weight: bold;
|
|
67
|
+
margin-right: 0.25rem;
|
|
68
|
+
padding-top: 0.3rem;
|
|
68
69
|
}
|
|
69
70
|
|
|
70
71
|
:host([dir="rtl"]) .d2l-labs-applied-filters-label {
|
|
71
|
-
margin-right: 0;
|
|
72
72
|
margin-left: 0.25rem;
|
|
73
|
+
margin-right: 0;
|
|
73
74
|
}
|
|
74
75
|
|
|
75
76
|
.d2l-labs-applied-filters-none-label {
|
|
77
|
+
color: var(--d2l-color-corundum);
|
|
76
78
|
display: inline-block;
|
|
77
|
-
padding-top: 0.3rem;
|
|
78
79
|
font-style: italic;
|
|
79
|
-
|
|
80
|
+
padding-top: 0.3rem;
|
|
80
81
|
}
|
|
81
82
|
|
|
82
83
|
#d2l-clear-filters-button {
|
|
@@ -98,6 +99,17 @@ class D2lLabsAppliedCoreFilters extends RtlMixin(LocalizeStaticMixin(LitElement)
|
|
|
98
99
|
`];
|
|
99
100
|
}
|
|
100
101
|
|
|
102
|
+
constructor() {
|
|
103
|
+
super();
|
|
104
|
+
this.labelText = '';
|
|
105
|
+
|
|
106
|
+
this._allActiveFilters = new Map();
|
|
107
|
+
this._filters = new IdSubscriberController(this,
|
|
108
|
+
{ onUnsubscribe: this._removeLostFilter.bind(this) },
|
|
109
|
+
{ idPropertyName: 'filterIds' }
|
|
110
|
+
);
|
|
111
|
+
}
|
|
112
|
+
|
|
101
113
|
static get resources() {
|
|
102
114
|
return {
|
|
103
115
|
'ar': ar,
|
|
@@ -120,17 +132,6 @@ class D2lLabsAppliedCoreFilters extends RtlMixin(LocalizeStaticMixin(LitElement)
|
|
|
120
132
|
};
|
|
121
133
|
}
|
|
122
134
|
|
|
123
|
-
constructor() {
|
|
124
|
-
super();
|
|
125
|
-
this.labelText = '';
|
|
126
|
-
|
|
127
|
-
this._allActiveFilters = new Map();
|
|
128
|
-
this._filters = new IdSubscriberController(this,
|
|
129
|
-
{ onUnsubscribe: this._removeLostFilter.bind(this) },
|
|
130
|
-
{ idPropertyName: 'filterIds' }
|
|
131
|
-
);
|
|
132
|
-
}
|
|
133
|
-
|
|
134
135
|
disconnectedCallback() {
|
|
135
136
|
super.disconnectedCallback();
|
|
136
137
|
this._filters.hostDisconnected();
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
import '@brightspace-ui-labs/multi-select/multi-select-list';
|
|
3
|
-
import '@brightspace-ui-labs/multi-select/multi-select-list-item';
|
|
4
|
-
import {
|
|
5
|
-
import { LocalizeStaticMixin } from '@brightspace-ui/core/mixins/localize-static-mixin.js';
|
|
6
|
-
import { RtlMixin } from '@brightspace-ui/core/mixins/rtl-mixin.js';
|
|
1
|
+
import '@brightspace-ui/core/components/button/button-subtle.js';
|
|
2
|
+
import '@brightspace-ui-labs/multi-select/multi-select-list.js';
|
|
3
|
+
import '@brightspace-ui-labs/multi-select/multi-select-list-item.js';
|
|
4
|
+
import { css, html, LitElement } from 'lit-element/lit-element.js';
|
|
7
5
|
import { announce } from '@brightspace-ui/core/helpers/announce.js';
|
|
8
6
|
import { bodyCompactStyles } from '@brightspace-ui/core/components/typography/styles.js';
|
|
9
7
|
import { getComposedChildren } from '@brightspace-ui/core/helpers/dom';
|
|
8
|
+
import { LocalizeStaticMixin } from '@brightspace-ui/core/mixins/localize-static-mixin.js';
|
|
9
|
+
import { RtlMixin } from '@brightspace-ui/core/mixins/rtl-mixin.js';
|
|
10
10
|
|
|
11
|
+
// eslint-disable-next-line sort-imports
|
|
11
12
|
import ar from './lang/ar-sa.js';
|
|
12
13
|
import de from './lang/de.js';
|
|
13
14
|
import en from './lang/en.js';
|
|
@@ -66,22 +67,22 @@ class D2lLabsAppliedFilters extends RtlMixin(LocalizeStaticMixin(LitElement)) {
|
|
|
66
67
|
}
|
|
67
68
|
|
|
68
69
|
.d2l-labs-applied-filters-label {
|
|
69
|
-
margin-right: 0.25rem;
|
|
70
70
|
display: inline-block;
|
|
71
|
-
padding-top: 0.3rem;
|
|
72
71
|
font-weight: bold;
|
|
72
|
+
margin-right: 0.25rem;
|
|
73
|
+
padding-top: 0.3rem;
|
|
73
74
|
}
|
|
74
75
|
|
|
75
76
|
:host([dir="rtl"]) .d2l-labs-applied-filters-label {
|
|
76
|
-
margin-right: 0;
|
|
77
77
|
margin-left: 0.25rem;
|
|
78
|
+
margin-right: 0;
|
|
78
79
|
}
|
|
79
80
|
|
|
80
81
|
.d2l-labs-applied-filters-none-label {
|
|
82
|
+
color: var(--d2l-color-corundum);
|
|
81
83
|
display: inline-block;
|
|
82
|
-
padding-top: 0.3rem;
|
|
83
84
|
font-style: italic;
|
|
84
|
-
|
|
85
|
+
padding-top: 0.3rem;
|
|
85
86
|
}
|
|
86
87
|
|
|
87
88
|
#d2l-clear-filters-button {
|
|
@@ -103,6 +104,18 @@ class D2lLabsAppliedFilters extends RtlMixin(LocalizeStaticMixin(LitElement)) {
|
|
|
103
104
|
`];
|
|
104
105
|
}
|
|
105
106
|
|
|
107
|
+
constructor() {
|
|
108
|
+
super();
|
|
109
|
+
this.labelText = '';
|
|
110
|
+
|
|
111
|
+
this._clearFiltersClicked = this._clearFiltersClicked.bind(this);
|
|
112
|
+
this._clearSelected = this._clearSelected.bind(this);
|
|
113
|
+
this._setSelectedOptions = this._setSelectedOptions.bind(this);
|
|
114
|
+
this._update = this._update.bind(this);
|
|
115
|
+
|
|
116
|
+
this._setSelectedOptions();
|
|
117
|
+
}
|
|
118
|
+
|
|
106
119
|
static get resources() {
|
|
107
120
|
return {
|
|
108
121
|
'ar': ar,
|
|
@@ -125,18 +138,6 @@ class D2lLabsAppliedFilters extends RtlMixin(LocalizeStaticMixin(LitElement)) {
|
|
|
125
138
|
};
|
|
126
139
|
}
|
|
127
140
|
|
|
128
|
-
constructor() {
|
|
129
|
-
super();
|
|
130
|
-
this.labelText = '';
|
|
131
|
-
|
|
132
|
-
this._clearFiltersClicked = this._clearFiltersClicked.bind(this);
|
|
133
|
-
this._clearSelected = this._clearSelected.bind(this);
|
|
134
|
-
this._setSelectedOptions = this._setSelectedOptions.bind(this);
|
|
135
|
-
this._update = this._update.bind(this);
|
|
136
|
-
|
|
137
|
-
this._setSelectedOptions();
|
|
138
|
-
}
|
|
139
|
-
|
|
140
141
|
firstUpdated() {
|
|
141
142
|
this._update();
|
|
142
143
|
}
|
|
@@ -44,8 +44,8 @@ class LabsFilterDropdownCategory extends LocalizeStaticMixin(TabPanelMixin(LitEl
|
|
|
44
44
|
static get styles() {
|
|
45
45
|
return [super.styles, css`
|
|
46
46
|
:host {
|
|
47
|
-
margin: -1px -1rem 0 -1rem;
|
|
48
47
|
border-top: 1px solid var(--d2l-color-gypsum);
|
|
48
|
+
margin: -1px -1rem 0 -1rem;
|
|
49
49
|
padding: 1.2rem 1rem 0 1rem;
|
|
50
50
|
}
|
|
51
51
|
.d2l-labs-filter-dropdown-page-search {
|
|
@@ -58,6 +58,44 @@ class LabsFilterDropdownCategory extends LocalizeStaticMixin(TabPanelMixin(LitEl
|
|
|
58
58
|
`];
|
|
59
59
|
}
|
|
60
60
|
|
|
61
|
+
constructor() {
|
|
62
|
+
super();
|
|
63
|
+
this.categoryText = '';
|
|
64
|
+
this.disableSearch = false;
|
|
65
|
+
this.key = '';
|
|
66
|
+
this.selectedOptionCount = 0;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
get categoryText() {
|
|
70
|
+
return this._categoryText;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
set categoryText(val) {
|
|
74
|
+
const oldVal = this._categoryText;
|
|
75
|
+
if (oldVal !== val) {
|
|
76
|
+
this._categoryText = val;
|
|
77
|
+
this.requestUpdate();
|
|
78
|
+
this.updateComplete.then(() => {
|
|
79
|
+
this._updateTabText(this._categoryText, this.selectedOptionCount);
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
get selectedOptionCount() {
|
|
85
|
+
return this._selectedOptionCount;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
set selectedOptionCount(val) {
|
|
89
|
+
const oldVal = this._selectedOptionCount;
|
|
90
|
+
if (oldVal !== val) {
|
|
91
|
+
this._selectedOptionCount = val;
|
|
92
|
+
this.requestUpdate();
|
|
93
|
+
this.updateComplete.then(() => {
|
|
94
|
+
this._updateTabText(this.categoryText, this._selectedOptionCount);
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
|
|
61
99
|
static get resources() {
|
|
62
100
|
return {
|
|
63
101
|
'ar': {
|
|
@@ -139,44 +177,6 @@ class LabsFilterDropdownCategory extends LocalizeStaticMixin(TabPanelMixin(LitEl
|
|
|
139
177
|
};
|
|
140
178
|
}
|
|
141
179
|
|
|
142
|
-
constructor() {
|
|
143
|
-
super();
|
|
144
|
-
this.categoryText = '';
|
|
145
|
-
this.disableSearch = false;
|
|
146
|
-
this.key = '';
|
|
147
|
-
this.selectedOptionCount = 0;
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
get categoryText() {
|
|
151
|
-
return this._categoryText;
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
set categoryText(val) {
|
|
155
|
-
const oldVal = this._categoryText;
|
|
156
|
-
if (oldVal !== val) {
|
|
157
|
-
this._categoryText = val;
|
|
158
|
-
this.requestUpdate();
|
|
159
|
-
this.updateComplete.then(() => {
|
|
160
|
-
this._updateTabText(this._categoryText, this.selectedOptionCount);
|
|
161
|
-
});
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
get selectedOptionCount() {
|
|
166
|
-
return this._selectedOptionCount;
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
set selectedOptionCount(val) {
|
|
170
|
-
const oldVal = this._selectedOptionCount;
|
|
171
|
-
if (oldVal !== val) {
|
|
172
|
-
this._selectedOptionCount = val;
|
|
173
|
-
this.requestUpdate();
|
|
174
|
-
this.updateComplete.then(() => {
|
|
175
|
-
this._updateTabText(this.categoryText, this._selectedOptionCount);
|
|
176
|
-
});
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
|
|
180
180
|
firstUpdated(changedProperties) {
|
|
181
181
|
super.firstUpdated(changedProperties);
|
|
182
182
|
this.addEventListener('d2l-menu-item-select', (e) => {
|
package/package.json
CHANGED
|
@@ -13,9 +13,11 @@
|
|
|
13
13
|
"/components"
|
|
14
14
|
],
|
|
15
15
|
"scripts": {
|
|
16
|
-
"lint": "npm run lint:
|
|
17
|
-
"lint:
|
|
18
|
-
"lint:
|
|
16
|
+
"lint": "npm run lint:eslint && npm run lint:lit && npm run lint:polymer && npm run lint:style",
|
|
17
|
+
"lint:eslint": "eslint . --ext .js,.html",
|
|
18
|
+
"lint:lit": "lit-analyzer \"{components, test, demo}/**/*.js\" --strict --rules.no-unknown-tag-name off",
|
|
19
|
+
"lint:polymer": "polymer lint -i \"./*\" \"test\" \"demo\" \"components\"",
|
|
20
|
+
"lint:style": "stylelint \"**/*.{js,html}\"",
|
|
19
21
|
"test:polymer:local": "polymer test --skip-plugin sauce",
|
|
20
22
|
"test:polymer:sauce": "polymer test --skip-plugin local",
|
|
21
23
|
"test": "npm run lint && npm run test:polymer:local"
|
|
@@ -23,18 +25,22 @@
|
|
|
23
25
|
"author": "D2L Corporation",
|
|
24
26
|
"license": "Apache-2.0",
|
|
25
27
|
"devDependencies": {
|
|
28
|
+
"@babel/core": "^7",
|
|
29
|
+
"@babel/eslint-parser": "^7",
|
|
30
|
+
"@brightspace-ui/stylelint-config": "^0.3",
|
|
26
31
|
"@polymer/iron-test-helpers": "^3",
|
|
27
|
-
"
|
|
28
|
-
"
|
|
29
|
-
"eslint": "^7",
|
|
30
|
-
"eslint-config-brightspace": "^0.10",
|
|
32
|
+
"eslint": "^8",
|
|
33
|
+
"eslint-config-brightspace": "^0.16",
|
|
31
34
|
"eslint-plugin-html": "^6",
|
|
32
|
-
"eslint-plugin-
|
|
35
|
+
"eslint-plugin-import": "^2",
|
|
36
|
+
"eslint-plugin-lit": "^1",
|
|
33
37
|
"eslint-plugin-sort-class-members": "^1",
|
|
38
|
+
"lit-analyzer": "^1",
|
|
34
39
|
"polymer-cli": "^1",
|
|
40
|
+
"stylelint": "^14",
|
|
35
41
|
"wct-browser-legacy": "^1"
|
|
36
42
|
},
|
|
37
|
-
"version": "4.2.
|
|
43
|
+
"version": "4.2.1",
|
|
38
44
|
"dependencies": {
|
|
39
45
|
"@brightspace-ui/core": "^1",
|
|
40
46
|
"d2l-localize-behavior": "BrightspaceUI/localize-behavior#semver:^2",
|