@brightspace-ui-labs/facet-filter-sort 5.5.2 → 5.6.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
|
@@ -191,41 +191,8 @@ npm run test:headless
|
|
|
191
191
|
npm run test:headless:watch
|
|
192
192
|
```
|
|
193
193
|
|
|
194
|
-
|
|
194
|
+
### Versioning and Releasing
|
|
195
195
|
|
|
196
|
-
|
|
196
|
+
This repo is configured to use `semantic-release`. Commits prefixed with `fix:` and `feat:` will trigger patch and minor releases when merged to `main`.
|
|
197
197
|
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
### Version Changes
|
|
201
|
-
|
|
202
|
-
All version changes should obey [semantic versioning](https://semver.org/) rules:
|
|
203
|
-
1. **MAJOR** version when you make incompatible API changes,
|
|
204
|
-
2. **MINOR** version when you add functionality in a backwards compatible manner, and
|
|
205
|
-
3. **PATCH** version when you make backwards compatible bug fixes.
|
|
206
|
-
|
|
207
|
-
The next version number will be determined from the commit messages since the previous release. Our semantic-release configuration uses the [Angular convention](https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-changelog-angular) when analyzing commits:
|
|
208
|
-
* Commits which are prefixed with `fix:` or `perf:` will trigger a `patch` release. Example: `fix: validate input before using`
|
|
209
|
-
* Commits which are prefixed with `feat:` will trigger a `minor` release. Example: `feat: add toggle() method`
|
|
210
|
-
* To trigger a MAJOR release, include `BREAKING CHANGE:` with a space or two newlines in the footer of the commit message
|
|
211
|
-
* Other suggested prefixes which will **NOT** trigger a release: `build:`, `ci:`, `docs:`, `style:`, `refactor:` and `test:`. Example: `docs: adding README for new component`
|
|
212
|
-
|
|
213
|
-
To revert a change, add the `revert:` prefix to the original commit message. This will cause the reverted change to be omitted from the release notes. Example: `revert: fix: validate input before using`.
|
|
214
|
-
|
|
215
|
-
### Releases
|
|
216
|
-
|
|
217
|
-
When a release is triggered, it will:
|
|
218
|
-
* Update the version in `package.json`
|
|
219
|
-
* Tag the commit
|
|
220
|
-
* Create a GitHub release (including release notes)
|
|
221
|
-
* Deploy a new package to NPM
|
|
222
|
-
|
|
223
|
-
### Releasing from Maintenance Branches
|
|
224
|
-
|
|
225
|
-
Occasionally you'll want to backport a feature or bug fix to an older release. `semantic-release` refers to these as [maintenance branches](https://semantic-release.gitbook.io/semantic-release/usage/workflow-configuration#maintenance-branches).
|
|
226
|
-
|
|
227
|
-
Maintenance branch names should be of the form: `+([0-9])?(.{+([0-9]),x}).x`.
|
|
228
|
-
|
|
229
|
-
Regular expressions are complicated, but this essentially means branch names should look like:
|
|
230
|
-
* `1.15.x` for patch releases on top of the `1.15` release (after version `1.16` exists)
|
|
231
|
-
* `2.x` for feature releases on top of the `2` release (after version `3` exists)
|
|
198
|
+
To learn how to create major releases and release from maintenance branches, refer to the [semantic-release GitHub Action](https://github.com/BrightspaceUI/actions/tree/main/semantic-release) documentation.
|
|
@@ -20,6 +20,16 @@ class LabsSortByDropdownOption extends RtlMixin(MenuItemRadioMixin(LitElement))
|
|
|
20
20
|
`;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
+
updated(changedProperties) {
|
|
24
|
+
super.updated(changedProperties);
|
|
25
|
+
if (changedProperties.has('text') && this.selected) {
|
|
26
|
+
this.dispatchEvent(new CustomEvent('d2l-labs-sort-by-dropdown-option-selected-text-change', {
|
|
27
|
+
detail: { text: this.text },
|
|
28
|
+
bubbles: true
|
|
29
|
+
}));
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
23
33
|
}
|
|
24
34
|
|
|
25
35
|
customElements.define('d2l-labs-sort-by-dropdown-option', LabsSortByDropdownOption);
|
|
@@ -131,12 +131,17 @@ class LabsSortByDropdown extends mixinBehaviors(
|
|
|
131
131
|
this._text = initialOption.text;
|
|
132
132
|
this.value = initialOption.value;
|
|
133
133
|
});
|
|
134
|
+
|
|
135
|
+
this._selectedTextChangeHandler = e => this._text = e.detail.text;
|
|
136
|
+
this.addEventListener('d2l-labs-sort-by-dropdown-option-selected-text-change', this._selectedTextChangeHandler);
|
|
134
137
|
}
|
|
135
138
|
|
|
136
139
|
disconnectedCallback() {
|
|
137
140
|
super.disconnectedCallback();
|
|
138
141
|
this.$['d2l-labs-sort-by-menu'].removeEventListener('d2l-menu-item-change',
|
|
139
|
-
this._boundListeners._onItemSelect
|
|
142
|
+
this._boundListeners._onItemSelect
|
|
143
|
+
);
|
|
144
|
+
this.removeEventListener('d2l-labs-sort-by-dropdown-option-selected-text-change', this._selectedTextChangeHandler);
|
|
140
145
|
}
|
|
141
146
|
|
|
142
147
|
_computeSelectedOptionText(selection, localize, resources) {
|
package/custom-elements.json
CHANGED