Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@googlemaps/extended-component-library

Package Overview
Dependencies
Maintainers
2
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@googlemaps/extended-component-library - npm Package Compare versions

Comparing version 0.2.1 to 0.2.2

lib/utils/googlemaps_types.d.ts

2

lib/base/constants.d.ts

@@ -7,4 +7,4 @@ /**

/** Package version of this component library. */
export declare const LIBRARY_VERSION = "0.2.1";
export declare const LIBRARY_VERSION = "0.2.2";
/** Identifier of where this component library is sourced from. */
export declare const ATTRIBUTION_SOURCE_ID = "GIT";

@@ -7,5 +7,5 @@ /**

/** Package version of this component library. */
export const LIBRARY_VERSION = '0.2.1'; // x-release-please-version
export const LIBRARY_VERSION = '0.2.2'; // x-release-please-version
/** Identifier of where this component library is sourced from. */
export const ATTRIBUTION_SOURCE_ID = 'NPM';
//# sourceMappingURL=constants.js.map

@@ -7,3 +7,4 @@ /**

import { LitElement, ReactiveController, ReactiveControllerHost } from 'lit';
import { StringLiterals } from './strings.js';
import { StringFunction, StringLiterals } from './strings.js';
declare type ParametersOrEmpty<T extends string | StringFunction> = T extends StringFunction ? Parameters<T> : [];
/**

@@ -26,3 +27,3 @@ * Controller that provides localized string literals (`en-US` by default)

*/
getStringLiteral<T extends keyof StringLiterals>(id: T, ...args: Parameters<Exclude<StringLiterals[T], string>>): string;
getStringLiteral<T extends keyof StringLiterals>(id: T, ...args: ParametersOrEmpty<StringLiterals[T]>): string;
/**

@@ -37,3 +38,3 @@ * Sets one or many localized string literals in the new locale then

*/
static buildLocalizer(baseComponent: LitElement): <T extends keyof StringLiterals>(id: T, ...args: Parameters<Exclude<StringLiterals[T], string>>) => string;
static buildLocalizer(baseComponent: LitElement): <T extends keyof StringLiterals>(id: T, ...args: ParametersOrEmpty<StringLiterals[T]>) => string;
/**

@@ -47,1 +48,2 @@ * Resets Localization Controller state by clearing its connected components

}
export {};

@@ -6,6 +6,5 @@ /**

*/
/// <reference types="google.maps" />
import { TemplateResult } from 'lit';
import type { Place } from '../../utils/googlemaps_types.js';
import { PlaceDataConsumer } from '../place_data_consumer.js';
declare type Place = google.maps.places.Place;
/**

@@ -37,2 +36,1 @@ * Component that renders any listing attributions from the Places API.

}
export {};

@@ -37,6 +37,6 @@ [Extended Component Library](../../../README.md) » [Place Building Blocks](../README.md)

| Attribute | Property | Property type | Description | Default | Reflects? |
| --------- | -------- | --------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- | --------- |
| | `place` | `google.maps.places.Place\|google.maps.places.PlaceResult\|null\|undefined` | Place data to render, overriding anything provided by context. | | ❌ |
| `no-data` | `noData` | `boolean` | This read-only property and attribute indicate whether the component has the required Place data to display itself.<br/><br/>Use the attribute to target CSS rules if you wish to hide this component, or display alternate content, when there's no valid data. | `true` | ✅ |
| Attribute | Property | Property type | Description | Default | Reflects? |
| --------- | -------- | ------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- | --------- |
| | `place` | `Place\|PlaceResult\|null\|undefined` | Place data to render, overriding anything provided by context. | | ❌ |
| `no-data` | `noData` | `boolean` | This read-only property and attribute indicate whether the component has the required Place data to display itself.<br/><br/>Use the attribute to target CSS rules if you wish to hide this component, or display alternate content, when there's no valid data. | `true` | ✅ |

@@ -43,0 +43,0 @@ ## Styling

@@ -6,7 +6,5 @@ /**

*/
/// <reference types="google.maps" />
import { PropertyValues } from 'lit';
import { BaseComponent } from '../base/base_component.js';
declare type Place = google.maps.places.Place;
declare type PlaceResult = google.maps.places.PlaceResult;
import type { Place, PlaceResult } from '../utils/googlemaps_types.js';
/**

@@ -23,3 +21,3 @@ * Registration functions passed from a `PlaceDataProvider` via context. The

export declare const placeContext: {
__context__: google.maps.places.Place | undefined;
__context__: Place | undefined;
};

@@ -47,7 +45,7 @@ export declare const placeConsumerRegistrationContext: {

*/
contextPlace: google.maps.places.Place | undefined;
contextPlace: Place | undefined;
/**
* Place data to render, overriding anything provided by context.
*/
get place(): google.maps.places.Place | google.maps.places.PlaceResult | null | undefined;
get place(): Place | PlaceResult | null | undefined;
set place(value: Place | PlaceResult | null | undefined);

@@ -102,2 +100,1 @@ /**

}
export {};

@@ -6,4 +6,3 @@ /**

*/
/// <reference types="google.maps" />
declare type Place = google.maps.places.Place;
import type { Place } from '../../utils/googlemaps_types.js';
/**

@@ -38,2 +37,1 @@ * A limited-capacity cache of `Place` objects keyed by place ID. Creates new

}
export {};

@@ -6,9 +6,7 @@ /**

*/
/// <reference types="google.maps" />
import { PropertyValues } from 'lit';
import { BaseComponent } from '../../base/base_component.js';
import { SlotValidationController } from '../../base/slot_validation_controller.js';
import type { Place, PlaceResult } from '../../utils/googlemaps_types.js';
import { PlaceConsumerRegistration } from '../place_data_consumer.js';
declare type Place = google.maps.places.Place;
declare type PlaceResult = google.maps.places.PlaceResult;
/**

@@ -97,2 +95,1 @@ * Provides place data to child components as context.

}
export {};

@@ -8,4 +8,4 @@ /**

import '../../icon_button/icon_button.js';
import type { Place } from '../../utils/googlemaps_types.js';
import { PlaceDataConsumer } from '../place_data_consumer.js';
declare type Place = google.maps.places.Place;
declare global {

@@ -63,2 +63,1 @@ interface HTMLElementTagNameMap {

}
export {};

@@ -27,11 +27,11 @@ [Extended Component Library](../../../README.md) » [Place Building Blocks](../README.md)

| Attribute | Property | Property type | Description | Default | Reflects? |
| ------------ | ----------- | --------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------ | --------- |
| `aria-label` | `ariaLabel` | `null` | A description that gets read by assistive devices. In the case of icon-only buttons, you should always include an ARIA label for optimal accessibility. | `null` | ✅ |
| `condensed` | `condensed` | `boolean` | Whether to render the button in a condensed layout, where the label appears below the icon. | `false` | ✅ |
| | `origin` | `google.maps.LatLng\|google.maps.LatLngLiteral\|Place \| undefined` | Optionally specify the starting location or Place. Otherwise Google Maps will ask for or estimate the user’s starting location. | | ❌ |
| `reversed` | `reversed` | `boolean` | Get directions from destination to origin instead. | `false` | ✅ |
| `variant` | `variant` | `'outlined'\|'filled'` | Specifies the display style of the button. | `'outlined'` | ✅ |
| | `place` | `google.maps.places.Place\|google.maps.places.PlaceResult\|null\|undefined` | Place data to render, overriding anything provided by context. | | ❌ |
| `no-data` | `noData` | `boolean` | This read-only property and attribute indicate whether the component has the required Place data to display itself.<br/><br/>Use the attribute to target CSS rules if you wish to hide this component, or display alternate content, when there's no valid data. | `true` | ✅ |
| Attribute | Property | Property type | Description | Default | Reflects? |
| ------------ | ----------- | ------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------ | --------- |
| `aria-label` | `ariaLabel` | `null` | A description that gets read by assistive devices. In the case of icon-only buttons, you should always include an ARIA label for optimal accessibility. | `null` | ✅ |
| `condensed` | `condensed` | `boolean` | Whether to render the button in a condensed layout, where the label appears below the icon. | `false` | ✅ |
| | `origin` | `google.maps.LatLng\|google.maps.LatLngLiteral\|Place \| undefined` | Optionally specify the starting location or Place. Otherwise Google Maps will ask for or estimate the user’s starting location. | | ❌ |
| `reversed` | `reversed` | `boolean` | Get directions from destination to origin instead. | `false` | ✅ |
| `variant` | `variant` | `'outlined'\|'filled'` | Specifies the display style of the button. | `'outlined'` | ✅ |
| | `place` | `Place\|PlaceResult\|null\|undefined` | Place data to render, overriding anything provided by context. | | ❌ |
| `no-data` | `noData` | `boolean` | This read-only property and attribute indicate whether the component has the required Place data to display itself.<br/><br/>Use the attribute to target CSS rules if you wish to hide this component, or display alternate content, when there's no valid data. | `true` | ✅ |

@@ -38,0 +38,0 @@ ## Slots

@@ -9,6 +9,4 @@ /**

import { WebFontController } from '../../base/web_font_controller.js';
import type { LatLng, LatLngLiteral, Place } from '../../utils/googlemaps_types.js';
import { PlaceDataConsumer } from '../place_data_consumer.js';
declare type LatLng = google.maps.LatLng;
declare type LatLngLiteral = google.maps.LatLngLiteral;
declare type Place = google.maps.places.Place;
declare type TravelMode = google.maps.TravelMode;

@@ -15,0 +13,0 @@ declare type TravelModeAttribute = Lowercase<TravelMode>;

@@ -6,6 +6,5 @@ /**

*/
/// <reference types="google.maps" />
import { PropertyValues } from 'lit';
import type { Place } from '../../utils/googlemaps_types.js';
import { PlaceDataConsumer } from '../place_data_consumer.js';
declare type Place = google.maps.places.Place;
declare const PLACE_BOOLEAN_FIELDS_SYNC_ACCESS: readonly ["hasCurbsidePickup", "hasDelivery", "hasDineIn", "hasTakeout", "hasWheelchairAccessibleEntrance", "isReservable", "servesBeer", "servesBreakfast", "servesBrunch", "servesDinner", "servesLunch", "servesVegetarianFood", "servesWine"];

@@ -12,0 +11,0 @@ declare const PLACE_BOOLEAN_FIELDS_ASYNC_ACCESS: readonly ["isOpen()"];

@@ -28,9 +28,9 @@ [Extended Component Library](../../../README.md) » [Place Building Blocks](../README.md)

| Attribute | Property | Property type | Description | Default | Reflects? |
| --------- | -------- | --------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------- | --------- |
| `field` | `field` | `BooleanField \| undefined` | The field to display, formatted as it is on either a `Place` or `PlaceResult`.<br/><br/>Allowed [Place fields](https://developers.google.com/maps/documentation/javascript/reference/place?utm_source=npm&utm_medium=documentation&utm_campaign=&utm_content=web_components) are `hasCurbsidePickup`, `hasDelivery`, `hasDineIn`, `hasTakeout`, `hasWheelchairAccessibleEntrance`, `isReservable`, `servesBeer`, `servesBreakfast`, `servesBrunch`, `servesDinner`, `servesLunch`, `servesVegetarianFood`, `servesWine`, and `isOpen()`. Please note that only `isOpen()` is supported by the legacy [`PlaceResult` class](https://developers.google.com/maps/documentation/javascript/reference/places-service?utm_source=npm&utm_medium=documentation&utm_campaign=&utm_content=web_components#PlaceResult).<br/><br/>The component also supports the `PlaceResult` field specifier `opening_hours.isOpen()` as an alias for `isOpen()`. | | ✅ |
| | `place` | `google.maps.places.Place\|google.maps.places.PlaceResult\|null\|undefined` | Place data to render, overriding anything provided by context. | | ❌ |
| `no-data` | `noData` | `boolean` | This read-only property and attribute indicate whether the component has the required Place data to display itself.<br/><br/>Use the attribute to target CSS rules if you wish to hide this component, or display alternate content, when there's no valid data. | `true` | ✅ |
| Attribute | Property | Property type | Description | Default | Reflects? |
| --------- | -------- | ------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------- | --------- |
| `field` | `field` | `BooleanField \| undefined` | The field to display, formatted as it is on either a `Place` or `PlaceResult`.<br/><br/>Allowed [Place fields](https://developers.google.com/maps/documentation/javascript/reference/place?utm_source=npm&utm_medium=documentation&utm_campaign=&utm_content=web_components) are `hasCurbsidePickup`, `hasDelivery`, `hasDineIn`, `hasTakeout`, `hasWheelchairAccessibleEntrance`, `isReservable`, `servesBeer`, `servesBreakfast`, `servesBrunch`, `servesDinner`, `servesLunch`, `servesVegetarianFood`, `servesWine`, and `isOpen()`. Please note that only `isOpen()` is supported by the legacy [`PlaceResult` class](https://developers.google.com/maps/documentation/javascript/reference/places-service?utm_source=npm&utm_medium=documentation&utm_campaign=&utm_content=web_components#PlaceResult).<br/><br/>The component also supports the `PlaceResult` field specifier `opening_hours.isOpen()` as an alias for `isOpen()`. | | ✅ |
| | `place` | `Place\|PlaceResult\|null\|undefined` | Place data to render, overriding anything provided by context. | | ❌ |
| `no-data` | `noData` | `boolean` | This read-only property and attribute indicate whether the component has the required Place data to display itself.<br/><br/>Use the attribute to target CSS rules if you wish to hide this component, or display alternate content, when there's no valid data. | `true` | ✅ |

@@ -6,5 +6,4 @@ /**

*/
/// <reference types="google.maps" />
import type { Place } from '../../utils/googlemaps_types.js';
import { PlaceDataConsumer } from '../place_data_consumer.js';
declare type Place = google.maps.places.Place;
/**

@@ -11,0 +10,0 @@ * Supported field names for `PlaceFieldLink`, formatted as `Place` fields.

@@ -29,7 +29,7 @@ [Extended Component Library](../../../README.md) » [Place Building Blocks](../README.md)

| Attribute | Property | Property type | Description | Default | Reflects? |
| ------------ | ----------- | --------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------- | --------- |
| `href-field` | `hrefField` | `LinkField` | The field to link to, formatted as it is on either a `Place` or `PlaceResult`.<br/><br/>Allowed fields are: `googleMapsURI` or `url` for a link to this place on Google Maps; `websiteURI` or `website` for a link to this place's website. | `'websiteURI'` | ✅ |
| | `place` | `google.maps.places.Place\|google.maps.places.PlaceResult\|null\|undefined` | Place data to render, overriding anything provided by context. | | ❌ |
| `no-data` | `noData` | `boolean` | This read-only property and attribute indicate whether the component has the required Place data to display itself.<br/><br/>Use the attribute to target CSS rules if you wish to hide this component, or display alternate content, when there's no valid data. | `true` | ✅ |
| Attribute | Property | Property type | Description | Default | Reflects? |
| ------------ | ----------- | ------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------- | --------- |
| `href-field` | `hrefField` | `LinkField` | The field to link to, formatted as it is on either a `Place` or `PlaceResult`.<br/><br/>Allowed fields are: `googleMapsURI` or `url` for a link to this place on Google Maps; `websiteURI` or `website` for a link to this place's website. | `'websiteURI'` | ✅ |
| | `place` | `Place\|PlaceResult\|null\|undefined` | Place data to render, overriding anything provided by context. | | ❌ |
| `no-data` | `noData` | `boolean` | This read-only property and attribute indicate whether the component has the required Place data to display itself.<br/><br/>Use the attribute to target CSS rules if you wish to hide this component, or display alternate content, when there's no valid data. | `true` | ✅ |

@@ -36,0 +36,0 @@ ## Styling

@@ -6,5 +6,4 @@ /**

*/
/// <reference types="google.maps" />
import type { Place } from '../../utils/googlemaps_types.js';
import { PlaceDataConsumer } from '../place_data_consumer.js';
declare type Place = google.maps.places.Place;
/**

@@ -51,3 +50,3 @@ * Supported field names for `PlaceFieldText`, formatted as `Place` fields.

field?: TextField;
protected readonly getMsg: <T extends keyof import("../../base/strings.js").StringLiterals>(id: T, ...args: Parameters<Exclude<import("../../base/strings.js").StringLiterals[T], string>>) => string;
protected readonly getMsg: <T extends keyof import("../../base/strings.js").StringLiterals>(id: T, ...args: import("../../base/strings.js").StringLiterals[T] extends infer T_1 ? T_1 extends import("../../base/strings.js").StringLiterals[T] ? T_1 extends import("../../base/strings.js").StringFunction ? Parameters<T_1> : [] : never : never) => string;
protected render(): import("lit-html").TemplateResult<1>;

@@ -54,0 +53,0 @@ /** @ignore */

@@ -29,7 +29,7 @@ [Extended Component Library](../../../README.md) » [Place Building Blocks](../README.md)

| Attribute | Property | Property type | Description | Default | Reflects? |
| --------- | -------- | --------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- | --------- |
| `field` | `field` | `TextField \| undefined` | The field to display, formatted as it is on either a `Place` or `PlaceResult`.<br/><br/>Allowed [`Place` fields](https://developers.google.com/maps/documentation/javascript/reference/place?utm_source=npm&utm_medium=documentation&utm_campaign=&utm_content=web_components) are: `businessStatus`, `displayName`, `formattedAddress`, `id`, `internationalPhoneNumber`, `location`, `location.lat`, `location.lng`, `nationalPhoneNumber`, `plusCode.compoundCode`, `plusCode.globalCode`, `rating`, `types`, and `userRatingCount`.<br/><br/>You may also specify one of the equivalent [`PlaceResult` field names](https://developers.google.com/maps/documentation/javascript/reference/places-service?utm_source=npm&utm_medium=documentation&utm_campaign=&utm_content=web_components#PlaceResult): `business_status`, `name`, `formatted_address`, `place_id`, `international_phone_number`, `geometry.location`, `geometry.location.lat`, `geometry.location.lng`, `formatted_phone_number`, `plus_code.compound_code`, `plus_code.global_code`, `rating`, `types`, and `user_ratings_total`. | | ✅ |
| | `place` | `google.maps.places.Place\|google.maps.places.PlaceResult\|null\|undefined` | Place data to render, overriding anything provided by context. | | ❌ |
| `no-data` | `noData` | `boolean` | This read-only property and attribute indicate whether the component has the required Place data to display itself.<br/><br/>Use the attribute to target CSS rules if you wish to hide this component, or display alternate content, when there's no valid data. | `true` | ✅ |
| Attribute | Property | Property type | Description | Default | Reflects? |
| --------- | -------- | ------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- | --------- |
| `field` | `field` | `TextField \| undefined` | The field to display, formatted as it is on either a `Place` or `PlaceResult`.<br/><br/>Allowed [`Place` fields](https://developers.google.com/maps/documentation/javascript/reference/place?utm_source=npm&utm_medium=documentation&utm_campaign=&utm_content=web_components) are: `businessStatus`, `displayName`, `formattedAddress`, `id`, `internationalPhoneNumber`, `location`, `location.lat`, `location.lng`, `nationalPhoneNumber`, `plusCode.compoundCode`, `plusCode.globalCode`, `rating`, `types`, and `userRatingCount`.<br/><br/>You may also specify one of the equivalent [`PlaceResult` field names](https://developers.google.com/maps/documentation/javascript/reference/places-service?utm_source=npm&utm_medium=documentation&utm_campaign=&utm_content=web_components#PlaceResult): `business_status`, `name`, `formatted_address`, `place_id`, `international_phone_number`, `geometry.location`, `geometry.location.lat`, `geometry.location.lng`, `formatted_phone_number`, `plus_code.compound_code`, `plus_code.global_code`, `rating`, `types`, and `user_ratings_total`. | | ✅ |
| | `place` | `Place\|PlaceResult\|null\|undefined` | Place data to render, overriding anything provided by context. | | ❌ |
| `no-data` | `noData` | `boolean` | This read-only property and attribute indicate whether the component has the required Place data to display itself.<br/><br/>Use the attribute to target CSS rules if you wish to hide this component, or display alternate content, when there's no valid data. | `true` | ✅ |

@@ -36,0 +36,0 @@ ## Styling

@@ -6,3 +6,2 @@ /**

*/
/// <reference types="google.maps" />
import '../place_field_boolean/place_field_boolean.js';

@@ -12,4 +11,4 @@ import '../place_field_text/place_field_text.js';

import { WebFontController } from '../../base/web_font_controller.js';
import type { Place } from '../../utils/googlemaps_types.js';
import { PlaceDataConsumer } from '../place_data_consumer.js';
declare type Place = google.maps.places.Place;
declare global {

@@ -42,3 +41,3 @@ interface HTMLElementTagNameMap {

protected willUpdate(changedProperties: PropertyValues<this>): void;
protected readonly getMsg: <T extends keyof import("../../base/strings.js").StringLiterals>(id: T, ...args: Parameters<Exclude<import("../../base/strings.js").StringLiterals[T], string>>) => string;
protected readonly getMsg: <T extends keyof import("../../base/strings.js").StringLiterals>(id: T, ...args: import("../../base/strings.js").StringLiterals[T] extends infer T_1 ? T_1 extends import("../../base/strings.js").StringLiterals[T] ? T_1 extends import("../../base/strings.js").StringFunction ? Parameters<T_1> : [] : never : never) => string;
protected render(): import("lit-html").TemplateResult<1> | typeof nothing;

@@ -52,2 +51,1 @@ /** @ignore */

}
export {};

@@ -34,7 +34,7 @@ [Extended Component Library](../../../README.md) » [Place Building Blocks](../README.md)

| Attribute | Property | Property type | Description | Default | Reflects? |
| -------------- | ------------- | --------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- | --------- |
| `summary-only` | `summaryOnly` | `boolean` | Render only the summary line, without the accordion containing weekly opening hours. | `false` | ✅ |
| | `place` | `google.maps.places.Place\|google.maps.places.PlaceResult\|null\|undefined` | Place data to render, overriding anything provided by context. | | ❌ |
| `no-data` | `noData` | `boolean` | This read-only property and attribute indicate whether the component has the required Place data to display itself.<br/><br/>Use the attribute to target CSS rules if you wish to hide this component, or display alternate content, when there's no valid data. | `true` | ✅ |
| Attribute | Property | Property type | Description | Default | Reflects? |
| -------------- | ------------- | ------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- | --------- |
| `summary-only` | `summaryOnly` | `boolean` | Render only the summary line, without the accordion containing weekly opening hours. | `false` | ✅ |
| | `place` | `Place\|PlaceResult\|null\|undefined` | Place data to render, overriding anything provided by context. | | ❌ |
| `no-data` | `noData` | `boolean` | This read-only property and attribute indicate whether the component has the required Place data to display itself.<br/><br/>Use the attribute to target CSS rules if you wish to hide this component, or display alternate content, when there's no valid data. | `true` | ✅ |

@@ -41,0 +41,0 @@ ## Styling

@@ -6,7 +6,6 @@ /**

*/
/// <reference types="google.maps" />
import { FocusController } from '../../base/focus_controller.js';
import { WebFontController } from '../../base/web_font_controller.js';
import type { Place } from '../../utils/googlemaps_types.js';
import { PlaceDataConsumer } from '../place_data_consumer.js';
declare type Place = google.maps.places.Place;
declare global {

@@ -47,3 +46,3 @@ interface HTMLElementTagNameMap {

disconnectedCallback(): void;
protected readonly getMsg: <T extends keyof import("../../base/strings.js").StringLiterals>(id: T, ...args: Parameters<Exclude<import("../../base/strings.js").StringLiterals[T], string>>) => string;
protected readonly getMsg: <T extends keyof import("../../base/strings.js").StringLiterals>(id: T, ...args: import("../../base/strings.js").StringLiterals[T] extends infer T_1 ? T_1 extends import("../../base/strings.js").StringLiterals[T] ? T_1 extends import("../../base/strings.js").StringFunction ? Parameters<T_1> : [] : never : never) => string;
protected render(): import("lit-html").TemplateResult<1>;

@@ -61,2 +60,1 @@ protected updated(): void;

}
export {};

@@ -46,3 +46,3 @@ /**

tileUri: photo.getURI(tilePhotoOptions),
attributions: photo.attributions,
attributions: photo.authorAttributions,
};

@@ -123,3 +123,3 @@ }

<span>${this.getMsg('PLACE_PHOTO_ATTRIBUTION_PREFIX')}</span>
${map(selectedPhoto.attributions, ({ author, authorURI }) => html `${renderAttribution(author, authorURI)} `)}
${map(selectedPhoto.attributions, ({ displayName, uri }) => html `${renderAttribution(displayName, uri ?? null)} `)}
</div>

@@ -126,0 +126,0 @@ `)}

@@ -28,7 +28,7 @@ [Extended Component Library](../../../README.md) » [Place Building Blocks](../README.md)

| Attribute | Property | Property type | Description | Default | Reflects? |
| ----------- | ---------- | --------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- | --------- |
| `max-tiles` | `maxTiles` | `number \| undefined` | The maximum number of photos to display as tiles. If undefined, all available photos from the Place object will be displayed.<br/><br/>Note that the Places API can fetch up to ten photos of a place. | | ✅ |
| | `place` | `google.maps.places.Place\|google.maps.places.PlaceResult\|null\|undefined` | Place data to render, overriding anything provided by context. | | ❌ |
| `no-data` | `noData` | `boolean` | This read-only property and attribute indicate whether the component has the required Place data to display itself.<br/><br/>Use the attribute to target CSS rules if you wish to hide this component, or display alternate content, when there's no valid data. | `true` | ✅ |
| Attribute | Property | Property type | Description | Default | Reflects? |
| ----------- | ---------- | ------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- | --------- |
| `max-tiles` | `maxTiles` | `number \| undefined` | The maximum number of photos to display as tiles. If undefined, all available photos from the Place object will be displayed.<br/><br/>Note that the Places API can fetch up to ten photos of a place. | | ✅ |
| | `place` | `Place\|PlaceResult\|null\|undefined` | Place data to render, overriding anything provided by context. | | ❌ |
| `no-data` | `noData` | `boolean` | This read-only property and attribute indicate whether the component has the required Place data to display itself.<br/><br/>Use the attribute to target CSS rules if you wish to hide this component, or display alternate content, when there's no valid data. | `true` | ✅ |

@@ -35,0 +35,0 @@ ## Styling

@@ -6,5 +6,4 @@ /**

*/
/// <reference types="google.maps" />
import type { Place } from '../../utils/googlemaps_types.js';
import { PlaceDataConsumer } from '../place_data_consumer.js';
declare type Place = google.maps.places.Place;
/**

@@ -29,2 +28,1 @@ * Renders a symbolic representation of a place's price level (e.g. $$$).

}
export {};

@@ -27,7 +27,7 @@ [Extended Component Library](../../../README.md) » [Place Building Blocks](../README.md)

| Attribute | Property | Property type | Description | Default | Reflects? |
| --------- | -------- | --------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- | --------- |
| `symbol` | `symbol` | `string` | The currency symbol (such as $) to use. | `'$'` | ✅ |
| | `place` | `google.maps.places.Place\|google.maps.places.PlaceResult\|null\|undefined` | Place data to render, overriding anything provided by context. | | ❌ |
| `no-data` | `noData` | `boolean` | This read-only property and attribute indicate whether the component has the required Place data to display itself.<br/><br/>Use the attribute to target CSS rules if you wish to hide this component, or display alternate content, when there's no valid data. | `true` | ✅ |
| Attribute | Property | Property type | Description | Default | Reflects? |
| --------- | -------- | ------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- | --------- |
| `symbol` | `symbol` | `string` | The currency symbol (such as $) to use. | `'$'` | ✅ |
| | `place` | `Place\|PlaceResult\|null\|undefined` | Place data to render, overriding anything provided by context. | | ❌ |
| `no-data` | `noData` | `boolean` | This read-only property and attribute indicate whether the component has the required Place data to display itself.<br/><br/>Use the attribute to target CSS rules if you wish to hide this component, or display alternate content, when there's no valid data. | `true` | ✅ |

@@ -34,0 +34,0 @@ ## Styling

@@ -6,5 +6,4 @@ /**

*/
/// <reference types="google.maps" />
import type { Place } from '../../utils/googlemaps_types.js';
import { PlaceDataConsumer } from '../place_data_consumer.js';
declare type Place = google.maps.places.Place;
/**

@@ -26,3 +25,3 @@ * Renders a place's star rating in either full (4.9 ★★★★★) or condensed

condensed: boolean;
protected readonly getMsg: <T extends keyof import("../../base/strings.js").StringLiterals>(id: T, ...args: Parameters<Exclude<import("../../base/strings.js").StringLiterals[T], string>>) => string;
protected readonly getMsg: <T extends keyof import("../../base/strings.js").StringLiterals>(id: T, ...args: import("../../base/strings.js").StringLiterals[T] extends infer T_1 ? T_1 extends import("../../base/strings.js").StringLiterals[T] ? T_1 extends import("../../base/strings.js").StringFunction ? Parameters<T_1> : [] : never : never) => string;
protected render(): import("lit-html").TemplateResult<1> | undefined;

@@ -39,2 +38,1 @@ /** @ignore */

}
export {};

@@ -28,7 +28,7 @@ [Extended Component Library](../../../README.md) » [Place Building Blocks](../README.md)

| Attribute | Property | Property type | Description | Default | Reflects? |
| ----------- | ----------- | --------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- | --------- |
| `condensed` | `condensed` | `boolean` | Render a condensed star rating (4.9 ★) instead of the full format (4.9 ★★★★★). | `false` | ✅ |
| | `place` | `google.maps.places.Place\|google.maps.places.PlaceResult\|null\|undefined` | Place data to render, overriding anything provided by context. | | ❌ |
| `no-data` | `noData` | `boolean` | This read-only property and attribute indicate whether the component has the required Place data to display itself.<br/><br/>Use the attribute to target CSS rules if you wish to hide this component, or display alternate content, when there's no valid data. | `true` | ✅ |
| Attribute | Property | Property type | Description | Default | Reflects? |
| ----------- | ----------- | ------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- | --------- |
| `condensed` | `condensed` | `boolean` | Render a condensed star rating (4.9 ★) instead of the full format (4.9 ★★★★★). | `false` | ✅ |
| | `place` | `Place\|PlaceResult\|null\|undefined` | Place data to render, overriding anything provided by context. | | ❌ |
| `no-data` | `noData` | `boolean` | This read-only property and attribute indicate whether the component has the required Place data to display itself.<br/><br/>Use the attribute to target CSS rules if you wish to hide this component, or display alternate content, when there's no valid data. | `true` | ✅ |

@@ -35,0 +35,0 @@ ## Styling

@@ -6,6 +6,5 @@ /**

*/
/// <reference types="google.maps" />
import { WebFontController } from '../../base/web_font_controller.js';
import type { Place } from '../../utils/googlemaps_types.js';
import { PlaceDataConsumer } from '../place_data_consumer.js';
declare type Place = google.maps.places.Place;
/**

@@ -30,3 +29,3 @@ * Renders a list of user-generated place reviews.

protected readonly fontLoader: WebFontController;
protected readonly getMsg: <T extends keyof import("../../base/strings.js").StringLiterals>(id: T, ...args: Parameters<Exclude<import("../../base/strings.js").StringLiterals[T], string>>) => string;
protected readonly getMsg: <T extends keyof import("../../base/strings.js").StringLiterals>(id: T, ...args: import("../../base/strings.js").StringLiterals[T] extends infer T_1 ? T_1 extends import("../../base/strings.js").StringLiterals[T] ? T_1 extends import("../../base/strings.js").StringFunction ? Parameters<T_1> : [] : never : never) => string;
protected render(): import("lit-html").TemplateResult<1> | undefined;

@@ -44,2 +43,1 @@ /** @ignore */

}
export {};

@@ -60,9 +60,10 @@ /**

renderOneReview(review) {
const attribution = review.authorAttribution;
const header = html `
<div class="header">
${when(review.author && review.authorPhotoURI, () => html `
<a target="_blank" href="${review.authorURI ?? ''}">
${when(attribution?.photoURI, () => html `
<a target="_blank" href="${attribution?.uri ?? ''}">
<img class="author-photo"
alt=${this.getMsg('PLACE_REVIEWS_AUTHOR_PHOTO_ALT', review.author ?? '')}
src=${review.authorPhotoURI}>
alt=${this.getMsg('PLACE_REVIEWS_AUTHOR_PHOTO_ALT', attribution?.displayName ?? '')}
src=${attribution.photoURI}>
</a>

@@ -72,4 +73,4 @@ `)}

target="_blank"
href="${review.authorURI ?? ''}">
${review.author ?? ''}
href="${attribution?.uri ?? ''}">
${attribution?.displayName ?? ''}
</a>

@@ -76,0 +77,0 @@ </div>

@@ -31,7 +31,7 @@ [Extended Component Library](../../../README.md) » [Place Building Blocks](../README.md)

| Attribute | Property | Property type | Description | Default | Reflects? |
| ------------- | ------------ | --------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- | --------- |
| `max-reviews` | `maxReviews` | `number \| undefined` | The maximum number of reviews to display. No limit if undefined. | | ✅ |
| | `place` | `google.maps.places.Place\|google.maps.places.PlaceResult\|null\|undefined` | Place data to render, overriding anything provided by context. | | ❌ |
| `no-data` | `noData` | `boolean` | This read-only property and attribute indicate whether the component has the required Place data to display itself.<br/><br/>Use the attribute to target CSS rules if you wish to hide this component, or display alternate content, when there's no valid data. | `true` | ✅ |
| Attribute | Property | Property type | Description | Default | Reflects? |
| ------------- | ------------ | ------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- | --------- |
| `max-reviews` | `maxReviews` | `number \| undefined` | The maximum number of reviews to display. No limit if undefined. | | ✅ |
| | `place` | `Place\|PlaceResult\|null\|undefined` | Place data to render, overriding anything provided by context. | | ❌ |
| `no-data` | `noData` | `boolean` | This read-only property and attribute indicate whether the component has the required Place data to display itself.<br/><br/>Use the attribute to target CSS rules if you wish to hide this component, or display alternate content, when there's no valid data. | `true` | ✅ |

@@ -38,0 +38,0 @@ ## Styling

@@ -23,6 +23,3 @@ /**

import { WebFontController } from '../base/web_font_controller.js';
declare type LatLng = google.maps.LatLng;
declare type LatLngLiteral = google.maps.LatLngLiteral;
declare type Place = google.maps.places.Place;
declare type PlaceResult = google.maps.places.PlaceResult;
import type { LatLng, LatLngLiteral, Place, PlaceResult } from '../utils/googlemaps_types.js';
declare global {

@@ -143,3 +140,3 @@ interface HTMLElementTagNameMap {

protected willUpdate(changedProperties: PropertyValues<this>): void;
protected readonly getMsg: <T extends keyof import("../base/strings.js").StringLiterals>(id: T, ...args: Parameters<Exclude<import("../base/strings.js").StringLiterals[T], string>>) => string;
protected readonly getMsg: <T extends keyof import("../base/strings.js").StringLiterals>(id: T, ...args: import("../base/strings.js").StringLiterals[T] extends infer T_1 ? T_1 extends import("../base/strings.js").StringLiterals[T] ? T_1 extends import("../base/strings.js").StringFunction ? Parameters<T_1> : [] : never : never) => string;
protected render(): import("lit-html").TemplateResult<1>;

@@ -154,2 +151,1 @@ private getDisplayNameClass;

}
export {};

@@ -11,2 +11,3 @@ /**

import { WebFontController } from '../base/web_font_controller.js';
import type { Place } from '../utils/googlemaps_types.js';
/** Data field names in a `Place` that are fetched by Place Picker. */

@@ -106,3 +107,3 @@ export declare const PLACE_DATA_FIELDS: readonly ["addressComponents", "adrFormatAddress", "businessStatus", "displayName", "formattedAddress", "googleMapsURI", "iconBackgroundColor", "location", "photos", "id", "plusCode", "svgIconMaskURI", "types", "utcOffsetMinutes", "viewport"];

*/
get value(): google.maps.places.Place | null | undefined;
get value(): Place | null | undefined;
private valueInternal?;

@@ -118,3 +119,3 @@ private disableSearch;

protected willUpdate(changedProperties: PropertyValues): void;
protected readonly getMsg: <T extends keyof import("../base/strings.js").StringLiterals>(id: T, ...args: Parameters<Exclude<import("../base/strings.js").StringLiterals[T], string>>) => string;
protected readonly getMsg: <T extends keyof import("../base/strings.js").StringLiterals>(id: T, ...args: import("../base/strings.js").StringLiterals[T] extends infer T_1 ? T_1 extends import("../base/strings.js").StringLiterals[T] ? T_1 extends import("../base/strings.js").StringFunction ? Parameters<T_1> : [] : never : never) => string;
protected render(): import("lit-html").TemplateResult<1>;

@@ -121,0 +122,0 @@ protected firstUpdated(): void;

@@ -239,6 +239,7 @@ /**

async search(query) {
const { Place } = await APILoader.importLibrary('places', this);
// tslint:disable-next-line:enforce-name-casing
const { Place: OrigPlace } = await APILoader.importLibrary('places', this);
// A Find Place request containing only the Place ID field incurs no charge:
// https://developers.google.com/maps/documentation/places/web-service/usage-and-billing?utm_source=npm&utm_medium=documentation&utm_campaign=&utm_content=web_components#find-place-id-only.
const { places } = await Place.findPlaceFromQuery({
const { places } = await OrigPlace.findPlaceFromQuery({
query,

@@ -245,0 +246,0 @@ fields: ['id'],

@@ -29,12 +29,12 @@ [Extended Component Library](../../README.md)

| Attribute | Property | Property type | Description | Default | Reflects? |
| --------------- | -------------- | ------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- | --------- |
| `country` | `country` | `string[] \| undefined` | Restricts predictions to up to five countries identified by their ISO 3166-1 Alpha-2 country codes, case insensitive ('us', 'br', 'au', etc.).<br/><br/>Multiple country codes can be specified in the attribute as a set of space-separated tokens (for example, "us ca"). | | ✅ |
| `for-map` | `forMap` | `string \| undefined` | The HTML id of a `<gmp-map>` element on the page that Place Autocomplete should bind to for location biasing. Note that the map need not be a parent of the current element. | | ✅ |
| `location-bias` | `locationBias` | `google.maps.LatLngLiteral \| undefined` | Location of the region to bias predictions towards (or restrict if `strict-bounds` is set), in "lat,lng" format.<br/><br/>This attribute must be used in conjunction with `radius`. | | ✅ |
| `placeholder` | `placeholder` | `string \| undefined` | Placeholder text to display before the user has entered any input. | | ✅ |
| `radius` | `radius` | `number \| undefined` | Radius of the region, in meters, to bias predictions towards.<br/><br/>This attribute must be used in conjunction with `location-bias`. | | ✅ |
| `strict-bounds` | `strictBounds` | `boolean` | If true, only predictions that are within the specified location/radius or map viewport will be returned.<br/><br/>Setting this property to false (which is the default) will make the results biased towards, but not restricted to, places contained within the bounds. | `false` | ✅ |
| `type` | `type` | `string \| undefined` | The type of predictions to return. Some examples include “restaurant”, “country” and “address”. This property supports any one type found in Tables 1~3 of [Place Types]( https://developers.google.com/maps/documentation/javascript/supported_types?utm_source=npm&utm_medium=documentation&utm_campaign=&utm_content=web_components).<br/><br/>If no type is specified, predictions of all types will be returned. | | ✅ |
| | `value` | `google.maps.places.Place\|null\|undefined` | This readonly property contains data about the user-selected place.<br/><br/>If the user selects a valid place, then the object is guaranteed to contain at minimum its Place ID, along with all available [Basic Data fields]( https://developers.google.com/maps/documentation/places/web-service/place-data-fields?utm_source=npm&utm_medium=documentation&utm_campaign=&utm_content=web_components#basic).<br/><br/>This property is undefined when user input is empty, and null when no results are found based on user input. | | ❌ |
| Attribute | Property | Property type | Description | Default | Reflects? |
| --------------- | -------------- | ---------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- | --------- |
| `country` | `country` | `string[] \| undefined` | Restricts predictions to up to five countries identified by their ISO 3166-1 Alpha-2 country codes, case insensitive ('us', 'br', 'au', etc.).<br/><br/>Multiple country codes can be specified in the attribute as a set of space-separated tokens (for example, "us ca"). | | ✅ |
| `for-map` | `forMap` | `string \| undefined` | The HTML id of a `<gmp-map>` element on the page that Place Autocomplete should bind to for location biasing. Note that the map need not be a parent of the current element. | | ✅ |
| `location-bias` | `locationBias` | `google.maps.LatLngLiteral \| undefined` | Location of the region to bias predictions towards (or restrict if `strict-bounds` is set), in "lat,lng" format.<br/><br/>This attribute must be used in conjunction with `radius`. | | ✅ |
| `placeholder` | `placeholder` | `string \| undefined` | Placeholder text to display before the user has entered any input. | | ✅ |
| `radius` | `radius` | `number \| undefined` | Radius of the region, in meters, to bias predictions towards.<br/><br/>This attribute must be used in conjunction with `location-bias`. | | ✅ |
| `strict-bounds` | `strictBounds` | `boolean` | If true, only predictions that are within the specified location/radius or map viewport will be returned.<br/><br/>Setting this property to false (which is the default) will make the results biased towards, but not restricted to, places contained within the bounds. | `false` | ✅ |
| `type` | `type` | `string \| undefined` | The type of predictions to return. Some examples include “restaurant”, “country” and “address”. This property supports any one type found in Tables 1~3 of [Place Types]( https://developers.google.com/maps/documentation/javascript/supported_types?utm_source=npm&utm_medium=documentation&utm_campaign=&utm_content=web_components).<br/><br/>If no type is specified, predictions of all types will be returned. | | ✅ |
| | `value` | `Place\|null\|undefined` | This readonly property contains data about the user-selected place.<br/><br/>If the user selects a valid place, then the object is guaranteed to contain at minimum its Place ID, along with all available [Basic Data fields]( https://developers.google.com/maps/documentation/places/web-service/place-data-fields?utm_source=npm&utm_medium=documentation&utm_campaign=&utm_content=web_components#basic).<br/><br/>This property is undefined when user input is empty, and null when no results are found based on user input. | | ❌ |

@@ -41,0 +41,0 @@ ## Methods

@@ -17,2 +17,7 @@ /**

/**
* Generator function that yields the chain of parent nodes upwards in the DOM
* starting at `node`, and piercing shadow boundaries.
*/
export declare function deepParentChain(node: Node): Generator<Node, void, unknown>;
/**
* Behaves like Node.contains() but accounts for shadow descendants as well.

@@ -19,0 +24,0 @@ *

@@ -26,2 +26,20 @@ /**

/**
* Generator function that yields the chain of parent nodes upwards in the DOM
* starting at `node`, and piercing shadow boundaries.
*/
export function* deepParentChain(node) {
while (true) {
yield node;
if (node.parentNode) {
node = node.parentNode;
}
else if (node instanceof ShadowRoot) {
node = node.host;
}
else {
return;
}
}
}
/**
* Behaves like Node.contains() but accounts for shadow descendants as well.

@@ -36,3 +54,7 @@ *

return false;
return someDeepContains([rootNode], otherNode);
for (const node of deepParentChain(otherNode)) {
if (node === rootNode)
return true;
}
return false;
}

@@ -48,18 +70,8 @@ /**

const rootNodeSet = new Set(rootNodes);
let current = otherNode;
while (true) {
if (rootNodeSet.has(current)) {
for (const node of deepParentChain(otherNode)) {
if (rootNodeSet.has(node))
return true;
}
else if (current.parentNode) {
current = current.parentNode;
}
else if (current instanceof ShadowRoot) {
current = current.host;
}
else {
return false;
}
}
return false;
}
//# sourceMappingURL=deep_element_access.js.map

@@ -7,3 +7,3 @@ /**

/// <reference types="google.maps" />
declare type Place = google.maps.places.Place;
import type { Place } from './googlemaps_types.js';
declare type OpeningHoursPoint = google.maps.places.OpeningHoursPoint;

@@ -10,0 +10,0 @@ /**

@@ -6,8 +6,3 @@ /**

*/
/// <reference types="google.maps" />
declare type LatLng = google.maps.LatLng;
declare type LatLngLiteral = google.maps.LatLngLiteral;
declare type Place = google.maps.places.Place;
declare type PlaceResult = google.maps.places.PlaceResult;
declare type PriceLevel = google.maps.places.PriceLevel;
import type { LatLng, LatLngLiteral, Place, PlaceResult, PriceLevel } from './googlemaps_types.js';
/**

@@ -60,2 +55,1 @@ * Returns true if `place` is a `PlaceResult`, and false if it's a `Place`.

export declare function hasDataForOpeningCalculations(place: Place): boolean;
export {};

@@ -83,4 +83,4 @@ /**

export async function makePlaceFromPlaceResult(placeResult, consumer) {
const { Place } = await APILoader.importLibrary('places', consumer);
const place = new Place({ id: placeResult.place_id ?? 'PLACE_ID_MISSING' });
const placesLibrary = await APILoader.importLibrary('places', consumer);
const place = new placesLibrary.Place({ id: placeResult.place_id ?? 'PLACE_ID_MISSING' });
const predefinedFields = convertToPlaceFields(placeResult);

@@ -174,6 +174,6 @@ // Override Place object's getters to return data from PlaceResult if defined.

const { text, url } = extractTextAndURL(html);
return { author: text ?? '', authorURI: url ?? null };
return { displayName: text ?? '', uri: url };
});
return {
attributions,
authorAttributions: attributions,
getURI: photo.getUrl,

@@ -202,5 +202,7 @@ heightPx: photo.height,

place.reviews = placeResult.reviews.map((review) => ({
author: review.author_name,
authorPhotoURI: review.profile_photo_url,
authorURI: review.author_url ?? null,
authorAttribution: {
displayName: review.author_name,
photoURI: review.profile_photo_url,
uri: review.author_url,
},
// Convert publish time from milliseconds to a Date object.

@@ -207,0 +209,0 @@ publishTime: new Date(review.time),

{
"name": "@googlemaps/extended-component-library",
"version": "0.2.1",
"version": "0.2.2",
"description": "Web Components for building rich experiences with the Google Maps JavaScript API.",

@@ -22,3 +22,5 @@ "license": "Apache-2.0",

"build:bundle": "wireit",
"example": "wireit",
"example:react_sample_app": "wireit",
"example:js_sample_app": "wireit",
"example:angular_sample_app": "wireit",
"e2e": "wireit",

@@ -177,16 +179,59 @@ "test": "wireit"

},
"example": {
"command": "chmod +x build/start_example.sh && ./build/start_example.sh",
"example:prepare": {
"command": "chmod +x build/start_example.sh"
},
"example:react_sample_app": {
"command": "./build/start_example.sh react_sample_app",
"env": {
"PORT": "8001"
},
"dependencies": [
"build:bundle"
"build:package",
"example:prepare"
],
"service": true
"service": {
"readyWhen": {
"lineMatches": "You can now view \\S+ in the browser"
}
}
},
"example:js_sample_app": {
"command": "./build/start_example.sh js_sample_app",
"env": {
"PORT": "8002"
},
"dependencies": [
"build:bundle",
"example:prepare"
],
"service": {
"readyWhen": {
"lineMatches": "Web Dev Server started"
}
}
},
"example:angular_sample_app": {
"command": "./build/start_example.sh angular_sample_app",
"env": {
"PORT": "8003"
},
"dependencies": [
"build:package",
"example:prepare"
],
"service": {
"readyWhen": {
"lineMatches": "Angular Live Development Server is listening on localhost"
}
}
},
"e2e": {
"command": "playwright test --config ./e2e/playwright.config.js",
"dependencies": [
"example:react_sample_app",
"example:js_sample_app",
"example:angular_sample_app"
],
"files": [
"e2e/**/*",
"examples/**/*",
"lib/**/*",
"dist/**/*"
"e2e/**/*.js"
],

@@ -193,0 +238,0 @@ "output": []

@@ -100,4 +100,6 @@ # Extended Component Library

**React support**: the Extended Component Library ships with native React components for easy integration. Please see [React Support](src/react/README.md) to get started.
**React**: The Extended Component Library ships with native React components for easy integration. Please see [React Support](src/react/README.md) to get started, then refer to the [example app](examples/react_sample_app).
**Angular**: Angular works well with Web Components. See the Angular [example app](examples/angular_sample_app) to get started.
## Components available with Maps JS SDK

@@ -104,0 +106,0 @@

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc