Skip to content

Commit

Permalink
Merge branch 'develop' into dependabot-updates
Browse files Browse the repository at this point in the history
  • Loading branch information
MikeTschudi authored Dec 10, 2024
2 parents 4597b70 + d375bce commit 0c89047
Show file tree
Hide file tree
Showing 17 changed files with 403 additions and 256 deletions.
46 changes: 30 additions & 16 deletions src/components.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
* It contains typing information for all components that exist in this project.
*/
import { HTMLStencilElement, JSXBase } from "@stencil/core/internal";
import { AppLayout, ButtonType, DistanceUnit, EditType, EDrawMode, IBasemapConfig, IConsentResponse, IDeleteIds, IExportInfos, IFeatureServiceEnabledStatus, IInventoryItem, ILayerAndTableIds, ILayerExpression, IMapChange, IMapInfo, IReportingOptions, ISearchConfiguration, ISelectionSet, ISketchGraphicsChange, ISolutionSpatialReferenceInfo, ISortingInfo, ISpatialRefRepresentation, ITemplateInfo, IValueChange, theme } from "./utils/interfaces";
import { AppLayout, ButtonType, DistanceUnit, EditType, EDrawMode, IBasemapConfig, IBeforeLayerSelectionChange, IBeforeMapChange, IConsentResponse, IDeleteIds, IExportInfos, IFeatureServiceEnabledStatus, IInventoryItem, ILayerAndTableIds, ILayerExpression, IMapChange, IMapInfo, IReportingOptions, ISearchConfiguration, ISelectionSet, ISketchGraphicsChange, ISolutionSpatialReferenceInfo, ISortingInfo, ISpatialRefRepresentation, ITemplateInfo, IValueChange, theme } from "./utils/interfaces";
import { IReportingOptions as IReportingOptions1 } from "./components";
import { ILayerItemsHash } from "./components/layer-list/layer-list";
import { UserSession } from "@esri/solution-common";
export { AppLayout, ButtonType, DistanceUnit, EditType, EDrawMode, IBasemapConfig, IConsentResponse, IDeleteIds, IExportInfos, IFeatureServiceEnabledStatus, IInventoryItem, ILayerAndTableIds, ILayerExpression, IMapChange, IMapInfo, IReportingOptions, ISearchConfiguration, ISelectionSet, ISketchGraphicsChange, ISolutionSpatialReferenceInfo, ISortingInfo, ISpatialRefRepresentation, ITemplateInfo, IValueChange, theme } from "./utils/interfaces";
export { AppLayout, ButtonType, DistanceUnit, EditType, EDrawMode, IBasemapConfig, IBeforeLayerSelectionChange, IBeforeMapChange, IConsentResponse, IDeleteIds, IExportInfos, IFeatureServiceEnabledStatus, IInventoryItem, ILayerAndTableIds, ILayerExpression, IMapChange, IMapInfo, IReportingOptions, ISearchConfiguration, ISelectionSet, ISketchGraphicsChange, ISolutionSpatialReferenceInfo, ISortingInfo, ISpatialRefRepresentation, ITemplateInfo, IValueChange, theme } from "./utils/interfaces";
export { IReportingOptions as IReportingOptions1 } from "./components";
export { ILayerItemsHash } from "./components/layer-list/layer-list";
export { UserSession } from "@esri/solution-common";
Expand Down Expand Up @@ -961,6 +961,10 @@ export namespace Components {
* boolean: when true the table will be sorted by objectid in descending order by default
*/
"showNewestFirst": boolean;
/**
* Validate if the editor has any pending edits
*/
"validateActiveEdits": () => Promise<boolean>;
/**
* boolean: When true the selected feature will zoomed to in the map and the row will be scrolled to within the table
*/
Expand Down Expand Up @@ -1243,6 +1247,14 @@ export namespace Components {
* string[]: list of layer ids that have been selected by the end user
*/
"selectedIds": string[];
/**
* Set the layer by id
*/
"setLayerById": (id: string, skipEditCheck?: boolean) => Promise<void>;
/**
* Set the layers by ids
*/
"setLayerByIds": (ids: string[], skipEditCheck?: boolean) => Promise<void>;
/**
* boolean: when true a map with a single layer will show a label rather than a dropdown Used in conjunction with _hasMultipleLayers
*/
Expand Down Expand Up @@ -1291,7 +1303,7 @@ export namespace Components {
* IMapInfo[]: array of map infos (name and id)
*/
"mapInfos": IMapInfo[];
"setMapByID": (id: string) => Promise<void>;
"setMapByID": (id: string, skipEditCheck?: boolean) => Promise<void>;
/**
* Expands the list
*/
Expand Down Expand Up @@ -1680,8 +1692,6 @@ export namespace Components {
*/
"sketchPolygonSymbol": __esri.SimpleFillSymbol;
}
interface ShareItem {
}
interface SolutionConfiguration {
/**
* Credentials for requests, which can be a serialized UserSession
Expand Down Expand Up @@ -2236,6 +2246,7 @@ declare global {
};
interface HTMLEditCardElementEventMap {
"closeEdit": void;
"editorInitialized": __esri.Editor;
"editsComplete": void;
"refreshGraphics": __esri.Graphic[];
}
Expand Down Expand Up @@ -2429,6 +2440,7 @@ declare global {
new (): HTMLMapFullscreenElement;
};
interface HTMLMapLayerPickerElementEventMap {
"beforeLayerSelectionChange": IBeforeLayerSelectionChange;
"idsFound": ILayerAndTableIds;
"noLayersFound": void;
"layerSelectionChange": string[];
Expand All @@ -2454,6 +2466,7 @@ declare global {
new (): HTMLMapLegendElement;
};
interface HTMLMapPickerElementEventMap {
"beforeMapInfoChange": IBeforeMapChange;
"mapInfoChange": IMapInfo;
}
interface HTMLMapPickerElement extends Components.MapPicker, HTMLStencilElement {
Expand Down Expand Up @@ -2546,12 +2559,6 @@ declare global {
prototype: HTMLRefineSelectionElement;
new (): HTMLRefineSelectionElement;
};
interface HTMLShareItemElement extends Components.ShareItem, HTMLStencilElement {
}
var HTMLShareItemElement: {
prototype: HTMLShareItemElement;
new (): HTMLShareItemElement;
};
interface HTMLSolutionConfigurationElement extends Components.SolutionConfiguration, HTMLStencilElement {
}
var HTMLSolutionConfigurationElement: {
Expand Down Expand Up @@ -2737,7 +2744,6 @@ declare global {
"pdf-download": HTMLPdfDownloadElement;
"public-notification": HTMLPublicNotificationElement;
"refine-selection": HTMLRefineSelectionElement;
"share-item": HTMLShareItemElement;
"solution-configuration": HTMLSolutionConfigurationElement;
"solution-contents": HTMLSolutionContentsElement;
"solution-item": HTMLSolutionItemElement;
Expand Down Expand Up @@ -3403,6 +3409,10 @@ declare namespace LocalJSX {
* Emitted on demand when the Editor widget should be closed
*/
"onCloseEdit"?: (event: EditCardCustomEvent<void>) => void;
/**
* Emit the Editor when it is initialized
*/
"onEditorInitialized"?: (event: EditCardCustomEvent<__esri.Editor>) => void;
/**
* Emitted on demand when edits are completed on current edit layer
*/
Expand Down Expand Up @@ -4037,6 +4047,10 @@ declare namespace LocalJSX {
* esri/views/View: https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html
*/
"mapView"?: __esri.MapView;
/**
* Emitted before a new map is loaded
*/
"onBeforeLayerSelectionChange"?: (event: MapLayerPickerCustomEvent<IBeforeLayerSelectionChange>) => void;
/**
* Emitted on demand when valid layers are found
*/
Expand Down Expand Up @@ -4105,6 +4119,10 @@ declare namespace LocalJSX {
* IMapInfo[]: array of map infos (name and id)
*/
"mapInfos"?: IMapInfo[];
/**
* Emitted before a new map is loaded
*/
"onBeforeMapInfoChange"?: (event: MapPickerCustomEvent<IBeforeMapChange>) => void;
/**
* Emitted when a new map is loaded
*/
Expand Down Expand Up @@ -4480,8 +4498,6 @@ declare namespace LocalJSX {
*/
"sketchPolygonSymbol"?: __esri.SimpleFillSymbol;
}
interface ShareItem {
}
interface SolutionConfiguration {
/**
* Credentials for requests, which can be a serialized UserSession
Expand Down Expand Up @@ -4725,7 +4741,6 @@ declare namespace LocalJSX {
"pdf-download": PdfDownload;
"public-notification": PublicNotification;
"refine-selection": RefineSelection;
"share-item": ShareItem;
"solution-configuration": SolutionConfiguration;
"solution-contents": SolutionContents;
"solution-item": SolutionItem;
Expand Down Expand Up @@ -4778,7 +4793,6 @@ declare module "@stencil/core" {
"pdf-download": LocalJSX.PdfDownload & JSXBase.HTMLAttributes<HTMLPdfDownloadElement>;
"public-notification": LocalJSX.PublicNotification & JSXBase.HTMLAttributes<HTMLPublicNotificationElement>;
"refine-selection": LocalJSX.RefineSelection & JSXBase.HTMLAttributes<HTMLRefineSelectionElement>;
"share-item": LocalJSX.ShareItem & JSXBase.HTMLAttributes<HTMLShareItemElement>;
"solution-configuration": LocalJSX.SolutionConfiguration & JSXBase.HTMLAttributes<HTMLSolutionConfigurationElement>;
"solution-contents": LocalJSX.SolutionContents & JSXBase.HTMLAttributes<HTMLSolutionContentsElement>;
"solution-item": LocalJSX.SolutionItem & JSXBase.HTMLAttributes<HTMLSolutionItemElement>;
Expand Down
7 changes: 7 additions & 0 deletions src/components/edit-card/edit-card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,11 @@ export class EditCard {
*/
@Event() closeEdit: EventEmitter<void>;

/**
* Emit the Editor when it is initialized
*/
@Event() editorInitialized: EventEmitter<__esri.Editor>;

/**
* Emitted on demand when edits are completed on current edit layer
*/
Expand Down Expand Up @@ -397,6 +402,8 @@ export class EditCard {

// had issues with destroy before adding like this
this._editContainer.appendChild(container);

this.editorInitialized.emit(this._editor);
}
}

Expand Down
11 changes: 6 additions & 5 deletions src/components/edit-card/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,12 @@

## Events

| Event | Description | Type |
| ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------ |
| `closeEdit` | Emitted on demand when the Editor widget should be closed | `CustomEvent<void>` |
| `editsComplete` | Emitted on demand when edits are completed on current edit layer | `CustomEvent<void>` |
| `refreshGraphics` | Emitted on demand when the editor is closed to handle things like attachment updates that don't fire the standard edit update event when complete | `CustomEvent<Graphic[]>` |
| Event | Description | Type |
| ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------ |
| `closeEdit` | Emitted on demand when the Editor widget should be closed | `CustomEvent<void>` |
| `editorInitialized` | Emit the Editor when it is initialized | `CustomEvent<Editor>` |
| `editsComplete` | Emitted on demand when edits are completed on current edit layer | `CustomEvent<void>` |
| `refreshGraphics` | Emitted on demand when the editor is closed to handle things like attachment updates that don't fire the standard edit update event when complete | `CustomEvent<Graphic[]>` |


## Dependencies
Expand Down
Loading

0 comments on commit 0c89047

Please sign in to comment.