Skip to content

Commit

Permalink
Merge pull request #439 from Esri/share-options
Browse files Browse the repository at this point in the history
add share options
  • Loading branch information
jmhauck authored Dec 1, 2023
2 parents 5014b4e + 44c44a6 commit 99fe0f2
Show file tree
Hide file tree
Showing 5 changed files with 60 additions and 1 deletion.
32 changes: 32 additions & 0 deletions src/components.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,14 @@ export namespace Components {
* ISearchConfiguration: Configuration details for the Search widget
*/
"searchConfiguration": ISearchConfiguration;
/**
* boolean: When true the share options will include embed option
*/
"shareIncludeEmbed": boolean;
/**
* boolean: When true the share options will include social media sharing
*/
"shareIncludeSocial": boolean;
/**
* boolean: when true the table will be sorted by objectid in descending order by default
*/
Expand Down Expand Up @@ -398,6 +406,14 @@ export namespace Components {
* boolean: When true only editable layers that support the update capability will be available
*/
"onlyShowUpdatableLayers": boolean;
/**
* boolean: When true the share options will include embed option
*/
"shareIncludeEmbed": boolean;
/**
* boolean: When true the share options will include social media sharing
*/
"shareIncludeSocial": boolean;
/**
* boolean: when true the table will be sorted by objectid in descending order by default
*/
Expand Down Expand Up @@ -1868,6 +1884,14 @@ declare namespace LocalJSX {
* ISearchConfiguration: Configuration details for the Search widget
*/
"searchConfiguration"?: ISearchConfiguration;
/**
* boolean: When true the share options will include embed option
*/
"shareIncludeEmbed"?: boolean;
/**
* boolean: When true the share options will include social media sharing
*/
"shareIncludeSocial"?: boolean;
/**
* boolean: when true the table will be sorted by objectid in descending order by default
*/
Expand Down Expand Up @@ -2092,6 +2116,14 @@ declare namespace LocalJSX {
* boolean: When true only editable layers that support the update capability will be available
*/
"onlyShowUpdatableLayers"?: boolean;
/**
* boolean: When true the share options will include embed option
*/
"shareIncludeEmbed"?: boolean;
/**
* boolean: When true the share options will include social media sharing
*/
"shareIncludeSocial"?: boolean;
/**
* boolean: when true the table will be sorted by objectid in descending order by default
*/
Expand Down
12 changes: 12 additions & 0 deletions src/components/crowdsource-manager/crowdsource-manager.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,16 @@ export class CrowdsourceManager {
*/
@Prop() searchConfiguration: ISearchConfiguration;

/**
* boolean: When true the share options will include embed option
*/
@Prop() shareIncludeEmbed: boolean;

/**
* boolean: When true the share options will include social media sharing
*/
@Prop() shareIncludeSocial: boolean;

/**
* theme: "light" | "dark" theme to be used
*/
Expand Down Expand Up @@ -720,6 +730,8 @@ export class CrowdsourceManager {
mapInfo={this._mapInfo}
mapView={this?._mapView}
onlyShowUpdatableLayers={this.onlyShowUpdatableLayers}
shareIncludeEmbed={this.shareIncludeEmbed}
shareIncludeSocial={this.shareIncludeSocial}
showNewestFirst={this.showNewestFirst}
zoomAndScrollToSelected={this.zoomAndScrollToSelected}
/>
Expand Down
2 changes: 2 additions & 0 deletions src/components/crowdsource-manager/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@
| `mapInfos` | -- | IMapInfo[]: array of map infos (name and id) | `IMapInfo[]` | `[]` |
| `onlyShowUpdatableLayers` | `only-show-updatable-layers` | boolean: When true only editable layers that support the update capability will be available | `boolean` | `true` |
| `searchConfiguration` | -- | ISearchConfiguration: Configuration details for the Search widget | `ISearchConfiguration` | `undefined` |
| `shareIncludeEmbed` | `share-include-embed` | boolean: When true the share options will include embed option | `boolean` | `undefined` |
| `shareIncludeSocial` | `share-include-social` | boolean: When true the share options will include social media sharing | `boolean` | `undefined` |
| `showNewestFirst` | `show-newest-first` | boolean: when true the table will be sorted by objectid in descending order by default | `boolean` | `true` |
| `theme` | `theme` | theme: "light" \| "dark" theme to be used | `"dark" \| "light"` | `"light"` |
| `zoomAndScrollToSelected` | `zoom-and-scroll-to-selected` | boolean: When true the selected feature will zoomed to in the map and the row will be scrolled to within the table | `boolean` | `false` |
Expand Down
13 changes: 12 additions & 1 deletion src/components/layer-table/layer-table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,16 @@ export class LayerTable {
*/
@Prop() onlyShowUpdatableLayers: boolean;

/**
* boolean: When true the share options will include embed option
*/
@Prop() shareIncludeEmbed: boolean;

/**
* boolean: When true the share options will include social media sharing
*/
@Prop() shareIncludeSocial: boolean;

/**
* boolean: when true the table will be sorted by objectid in descending order by default
*/
Expand Down Expand Up @@ -1064,11 +1074,12 @@ export class LayerTable {
<instant-apps-social-share
autoUpdateShareUrl={false}
class="instant-app-share"
embed={this.shareIncludeEmbed}
popoverButtonIconScale="s"
ref={el => this._shareNode = el}
scale="m"
shareButtonColor="neutral"
socialMedia={true}
socialMedia={this.shareIncludeSocial}
view={this.mapView}
/>
{this._getToolTip("bottom", icon, this._translations.share)}
Expand Down
2 changes: 2 additions & 0 deletions src/components/layer-table/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
| `mapInfo` | -- | IMapInfo: key configuration details about the current map | `IMapInfo` | `undefined` |
| `mapView` | -- | esri/views/View: https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html | `MapView` | `undefined` |
| `onlyShowUpdatableLayers` | `only-show-updatable-layers` | boolean: When true only editable layers that support the update capability will be available | `boolean` | `undefined` |
| `shareIncludeEmbed` | `share-include-embed` | boolean: When true the share options will include embed option | `boolean` | `undefined` |
| `shareIncludeSocial` | `share-include-social` | boolean: When true the share options will include social media sharing | `boolean` | `undefined` |
| `showNewestFirst` | `show-newest-first` | boolean: when true the table will be sorted by objectid in descending order by default | `boolean` | `undefined` |
| `zoomAndScrollToSelected` | `zoom-and-scroll-to-selected` | boolean: When true the selected feature will zoomed to in the map and the row will be scrolled to within the table | `boolean` | `undefined` |

Expand Down

0 comments on commit 99fe0f2

Please sign in to comment.