Skip to content

Commit

Permalink
Merge pull request #1203 from Esri/CT-Manager-AGOL-2025.R01
Browse files Browse the repository at this point in the history
Delivery for Manager AGOL-2025.R01 (#1202)
  • Loading branch information
MikeTschudi authored Feb 19, 2025
2 parents 2307b8d + 11da1aa commit a95af94
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 15 deletions.
3 changes: 2 additions & 1 deletion src/components/crowdsource-manager/crowdsource-manager.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1225,6 +1225,7 @@ export class CrowdsourceManager {
onCalciteSwitchChange={(e) => {
const active = e.target.checked || this._filterList?.filterCount > 0;
void this._layerTable.filterUpdate(active, e.target.checked);
void this._mapCard.updateFilterState(active);
this._mapExtentFilterChecked = e.target.checked;
}}
scale="m" />
Expand Down Expand Up @@ -1268,7 +1269,7 @@ export class CrowdsourceManager {
open={this._filterOpen}
width="s"
>
{this._mapExtentFilter()}
{!this._layer?.isTable && this._mapExtentFilter()}
{showFilterModal && <instant-apps-filter-list
autoUpdateUrl={false}
closeBtn={true}
Expand Down
28 changes: 17 additions & 11 deletions src/components/layer-table/layer-table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1404,10 +1404,12 @@ export class LayerTable {
const featuresSelected = this._featuresSelected();
// hide multiple edits for R03
const showMultipleEdits = this.selectedIds.length > 1 && this._layer?.capabilities?.operations?.supportsUpdate && false;
const showZoom = !this.mapHidden && !this._layer?.isTable;
const featuresEmpty = this._featuresEmpty();
const showFilterIcon = !this._layer?.isTable || this._hasFilterExpressions();
if (this._translations) {
this._toolInfos = [
!this.mapHidden ? {
showZoom ? {
active: false,
icon: "zoom-to-object",
indicator: false,
Expand All @@ -1416,15 +1418,15 @@ export class LayerTable {
disabled: !featuresSelected,
isOverflow: false
} : undefined,
{
showFilterIcon ? {
active: false,
icon: "filter",
indicator: false,
label: this._translations.filters,
func: () => this.createFilterModal ? this._toggleFilter() : this.toggleFilter.emit(),
disabled: false,
isOverflow: false
},
} : undefined,
showMultipleEdits ? {
active: false,
icon: "pencil",
Expand Down Expand Up @@ -2124,8 +2126,10 @@ export class LayerTable {
*/
protected tempHighlightOnHover(e: __esri.FeatureTableCellPointeroverEvent): void {
this._removeTempHighlight();
const temporaryFeature = e.feature;
this._temporaryFeatureHandle = this._selectedLayerView.highlight([temporaryFeature], { name: "temporary" });
if (this._selectedLayerView) {
const temporaryFeature = e.feature;
this._temporaryFeatureHandle = this._selectedLayerView?.highlight([temporaryFeature], { name: "temporary" });
}
}

/**
Expand All @@ -2143,10 +2147,12 @@ export class LayerTable {
*/
protected _highlightFeatures(currentFeatureId: number): void {
this._clearHighlights();
this._currentFeatureHighlightHandle = this._selectedLayerView.highlight([currentFeatureId], { name: "current-selection" });
if (this.selectedIds.length > 1) {
const secondaryFeatures = this.selectedIds.filter((id) => id !== currentFeatureId);
this._defaultFeaturesHandle = this._selectedLayerView.highlight(secondaryFeatures, { name: "default" });
if (this._selectedLayerView) {
this._currentFeatureHighlightHandle = this._selectedLayerView?.highlight([currentFeatureId], { name: "current-selection" });
if (this.selectedIds.length > 1) {
const secondaryFeatures = this.selectedIds.filter((id) => id !== currentFeatureId);
this._defaultFeaturesHandle = this._selectedLayerView?.highlight(secondaryFeatures, { name: "default" });
}
}
}

Expand Down Expand Up @@ -2410,7 +2416,7 @@ export class LayerTable {
e: MouseEvent
): void {
const id = (e.target as any)?.id;
if (id.startsWith('layer-table-')) {
if (id.startsWith('layer-table-') && this._moreDropdown) {
this._moreDropdown.open = true;
} else if (this._showHideOpen && Object.keys(this._columnsInfo).indexOf(id) < 0 && id !== "chevron-right") {
this._closeShowHide();
Expand Down Expand Up @@ -2776,7 +2782,7 @@ export class LayerTable {
this._fetchingData = true;
const layer = await getLayerOrTable(this.mapView, id);
layer && await layer.when(async () => {
this._selectedLayerView = await getFeatureLayerView(this.mapView, layer.id);
this._selectedLayerView = !layer.isTable ? await getFeatureLayerView(this.mapView, layer.id) : null;
if (this._table && (this._table?.viewModel as any)?.attachmentsViewOptions?.objectId) {
this._table.viewModel.hideAttachmentsView()
}
Expand Down
5 changes: 2 additions & 3 deletions src/components/map-card/map-card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1085,7 +1085,6 @@ export class MapCard {
*/
protected _initToolInfos(): void {
const featuresSelected = this.selectedFeaturesIds?.length > 0;
const hasFilterExpressions = this._hasFilterExpressions();
// hide multiple edits for R03
const showMultipleEdits = this.selectedFeaturesIds?.length > 1 && false;
if (this._translations) {
Expand All @@ -1099,15 +1098,15 @@ export class MapCard {
disabled: !featuresSelected,
isOverflow: false
},
hasFilterExpressions ? {
{
active: false,
icon: "filter",
indicator: false,
label: this._translations.filters,
func: () => this._toggleFilter(),
disabled: false,
isOverflow: false
} : undefined,
},
showMultipleEdits ? {
active: false,
icon: "pencil",
Expand Down

0 comments on commit a95af94

Please sign in to comment.