Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into benelan/ccr-vite-fix
Browse files Browse the repository at this point in the history
* origin/main:
  chore: release next
  fix(input-time-zone): prevent items from being deselected (#7661)
  • Loading branch information
benelan committed Sep 5, 2023
2 parents 05ab848 + 4b4c43c commit 67da1f5
Show file tree
Hide file tree
Showing 7 changed files with 35 additions and 15 deletions.
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions packages/calcite-components-react/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [1.7.1-next.2](https://github.com/Esri/calcite-design-system/compare/@esri/calcite-components-react@1.7.1-next.1...@esri/calcite-components-react@1.7.1-next.2) (2023-09-05)

**Note:** Version bump only for package @esri/calcite-components-react

## [1.7.1-next.1](https://github.com/Esri/calcite-design-system/compare/@esri/calcite-components-react@1.7.1-next.0...@esri/calcite-components-react@1.7.1-next.1) (2023-09-02)

**Note:** Version bump only for package @esri/calcite-components-react
Expand Down
4 changes: 2 additions & 2 deletions packages/calcite-components-react/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@esri/calcite-components-react",
"sideEffects": false,
"version": "1.7.1-next.1",
"version": "1.7.1-next.2",
"homepage": "https://developers.arcgis.com/calcite-design-system/",
"description": "A set of React components that wrap calcite components",
"license": "SEE LICENSE.md",
Expand All @@ -20,7 +20,7 @@
"dist/"
],
"dependencies": {
"@esri/calcite-components": "^1.7.1-next.1"
"@esri/calcite-components": "^1.7.1-next.2"
},
"peerDependencies": {
"react": ">=16.7",
Expand Down
6 changes: 6 additions & 0 deletions packages/calcite-components/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [1.7.1-next.2](https://github.com/Esri/calcite-design-system/compare/@esri/calcite-components@1.7.1-next.1...@esri/calcite-components@1.7.1-next.2) (2023-09-05)

### Bug Fixes

- **input-time-zone:** prevent items from being deselected ([#7661](https://github.com/Esri/calcite-design-system/issues/7661)) ([c2dd436](https://github.com/Esri/calcite-design-system/commit/c2dd4368c2707dcfdfeafb85d80e2f48706e0354)), closes [#7530](https://github.com/Esri/calcite-design-system/issues/7530)

## [1.7.1-next.1](https://github.com/Esri/calcite-design-system/compare/@esri/calcite-components@1.7.1-next.0...@esri/calcite-components@1.7.1-next.1) (2023-09-02)

### Bug Fixes
Expand Down
2 changes: 1 addition & 1 deletion packages/calcite-components/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@esri/calcite-components",
"version": "1.7.1-next.1",
"version": "1.7.1-next.2",
"homepage": "https://developers.arcgis.com/calcite-design-system/",
"description": "Web Components for Esri's Calcite Design System.",
"main": "dist/index.cjs.js",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,4 +103,21 @@ describe("calcite-input-time-zone", () => {

expect(await timeZoneItem.getProperty("textLabel")).toMatch("GMT-6");
});

it("does not allow users to deselect a timezone offset", async () => {
const page = await newE2EPage();
await page.emulateTimezone("America/Los_Angeles");
await page.setContent(html`<calcite-input-time-zone value="-360" open></calcite-input-time-zone>`);
await page.waitForChanges();

let selectedTimeZoneItem = await page.find("calcite-input-time-zone >>> calcite-combobox-item[selected]");
await selectedTimeZoneItem.click();
await page.waitForChanges();

selectedTimeZoneItem = await page.find("calcite-input-time-zone >>> calcite-combobox-item[selected]");
const input = await page.find("calcite-input-time-zone");

expect(await input.getProperty("value")).toBe("-360");
expect(await selectedTimeZoneItem.getProperty("textLabel")).toMatch("GMT-6");
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -138,13 +138,6 @@ export class InputTimeZone
*/
@Prop({ mutable: true }) value: string;

@Watch("value")
valueWatcher(value: string): void {
if (this.comboboxEl && this.comboboxEl.value !== value) {
this.comboboxEl.value = value;
}
}

//--------------------------------------------------------------------------
//
// Public Methods
Expand Down Expand Up @@ -316,7 +309,7 @@ export class InputTimeZone
open={this.open}
overlayPositioning={this.overlayPositioning}
scale={this.scale}
selectionMode="single"
selectionMode="single-persist"
// eslint-disable-next-line react/jsx-sort-props -- ref should be last so node attrs/props are in sync (see https://github.com/Esri/calcite-design-system/pull/6530)
ref={this.setComboboxRef}
>
Expand Down

0 comments on commit 67da1f5

Please sign in to comment.