From 44c44a671f21faed363e67b39fd53b61eeda20a8 Mon Sep 17 00:00:00 2001 From: John Hauck Date: Fri, 1 Dec 2023 14:41:20 -0700 Subject: [PATCH] add share options --- src/components.d.ts | 32 +++++++++++++++++++ .../crowdsource-manager.tsx | 12 +++++++ src/components/crowdsource-manager/readme.md | 2 ++ src/components/layer-table/layer-table.tsx | 13 +++++++- src/components/layer-table/readme.md | 2 ++ 5 files changed, 60 insertions(+), 1 deletion(-) diff --git a/src/components.d.ts b/src/components.d.ts index 4e69e423a..900abb826 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -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 */ @@ -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 */ @@ -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 */ @@ -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 */ diff --git a/src/components/crowdsource-manager/crowdsource-manager.tsx b/src/components/crowdsource-manager/crowdsource-manager.tsx index 5eec7a869..9d0c9fb49 100644 --- a/src/components/crowdsource-manager/crowdsource-manager.tsx +++ b/src/components/crowdsource-manager/crowdsource-manager.tsx @@ -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 */ @@ -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} /> diff --git a/src/components/crowdsource-manager/readme.md b/src/components/crowdsource-manager/readme.md index 42e6242e3..bc524ef10 100644 --- a/src/components/crowdsource-manager/readme.md +++ b/src/components/crowdsource-manager/readme.md @@ -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` | diff --git a/src/components/layer-table/layer-table.tsx b/src/components/layer-table/layer-table.tsx index 1ba90afc3..ed402028a 100644 --- a/src/components/layer-table/layer-table.tsx +++ b/src/components/layer-table/layer-table.tsx @@ -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 */ @@ -1064,11 +1074,12 @@ export class LayerTable { this._shareNode = el} scale="m" shareButtonColor="neutral" - socialMedia={true} + socialMedia={this.shareIncludeSocial} view={this.mapView} /> {this._getToolTip("bottom", icon, this._translations.share)} diff --git a/src/components/layer-table/readme.md b/src/components/layer-table/readme.md index dffdf4c8a..57df1b265 100644 --- a/src/components/layer-table/readme.md +++ b/src/components/layer-table/readme.md @@ -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` |