diff --git a/src/place_picker/place_picker.ts b/src/place_picker/place_picker.ts index 23c8f0c..3352ed4 100644 --- a/src/place_picker/place_picker.ts +++ b/src/place_picker/place_picker.ts @@ -4,6 +4,7 @@ * SPDX-License-Identifier: Apache-2.0 */ +// Placeholder for objectProperty (google3-only) import {css, html, PropertyValues} from 'lit'; import {customElement, property, query, state} from 'lit/decorators.js'; @@ -255,13 +256,13 @@ export class PlacePicker extends BaseComponent { private readonly autocomplete = new Deferred(); protected override willUpdate(changedProperties: PropertyValues) { - if (changedProperties.has('disableSearch') && this.disableSearch && - this.focusController.isKeyboardNavigating && + if (changedProperties.has(/* @state */ 'disableSearch') && + this.disableSearch && this.focusController.isKeyboardNavigating && getDeepActiveElement() === this.searchButtonElement) { this.clearButtonElement?.focus(); } - if (changedProperties.has('hideClearButton') && this.hideClearButton && - this.focusController.isKeyboardNavigating && + if (changedProperties.has(/* @state */ 'hideClearButton') && + this.hideClearButton && this.focusController.isKeyboardNavigating && getDeepActiveElement() === this.clearButtonElement) { this.inputElement?.focus(); } @@ -318,7 +319,7 @@ export class PlacePicker extends BaseComponent { const map = await this.getMapById(this.forMap); map && this.bindTo(map); } - if (changedProperties.has('valueInternal')) { + if (changedProperties.has(/* @state */ 'valueInternal')) { this.dispatchEvent(new Event('gmpx-placechange')); } } diff --git a/src/store_locator/store_locator.ts b/src/store_locator/store_locator.ts index 2ab71a6..2565cb0 100644 --- a/src/store_locator/store_locator.ts +++ b/src/store_locator/store_locator.ts @@ -12,6 +12,7 @@ import '../place_picker/place_picker.js'; import '../icon_button/icon_button.js'; import '../place_building_blocks/place_directions_button/place_directions_button.js'; +// Placeholder for objectProperty (google3-only) import {html, nothing} from 'lit'; import {customElement, property, query, state} from 'lit/decorators.js'; import {classMap} from 'lit/directives/class-map.js'; @@ -199,7 +200,7 @@ export class StoreLocator extends BaseComponent { */ protected override willUpdate(changedProperties: Map) { if (changedProperties.has('listings') || - changedProperties.has('initialized')) { + changedProperties.has(/* @state */ 'initialized')) { this.internalListings = (this.listings ?? []).map((x) => this.createInternalListing(x)); this.listingDistances.clear(); @@ -210,12 +211,12 @@ export class StoreLocator extends BaseComponent { // Perform map updates after the DOM has rendered, so the map element // will exist. if (changedProperties.has('listings') || - changedProperties.has('initialized')) { + changedProperties.has(/* @state */ 'initialized')) { this.updateBounds(); } if ((changedProperties.has('mapOptions') || - changedProperties.has('initialized')) && + changedProperties.has(/* @state */ 'initialized')) && this.mapOptions) { this.mapElement?.innerMap?.setOptions(this.mapOptions); }