@conterra/ct-mapapps-typings 4.14.2 → 4.15.0-next.20230120041840
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/agssearch/AGSSearchInterpreter.d.ts +5 -6
- package/agssearch/AGSSearchMerger.d.ts +10 -4
- package/agssearch/AGSStoreFactory.d.ts +7 -25
- package/agssearch/AutoStoreRegistration.d.ts +17 -17
- package/agssearch/FilterStoreFactory.d.ts +19 -12
- package/agssearch/LayerStore.d.ts +7 -8
- package/agssearch/StoreInitializer.d.ts +14 -7
- package/agssearch/api.d.ts +95 -0
- package/agssearch/util.d.ts +3 -2
- package/apprt/Constants.d.ts +0 -1
- package/apprt-binding/Bindable.d.ts +2 -2
- package/apprt-binding/Binding.d.ts +2 -2
- package/apprt-binding/PropertyAccess.d.ts +3 -3
- package/apprt-binding/Transformers.d.ts +1 -1
- package/apprt-binding/Watchable.d.ts +1 -1
- package/apprt-binding/shared.d.ts +1 -1
- package/apprt-core/CancelablePromise.d.ts +1 -1
- package/apprt-core/Events.d.ts +4 -4
- package/apprt-core/InjectedReference.d.ts +1 -1
- package/apprt-core/Logger.d.ts +2 -2
- package/apprt-core/Mutable.d.ts +25 -25
- package/apprt-core/Observers.d.ts +3 -3
- package/apprt-core/Promise.d.ts +1 -1
- package/apprt-core/Types.d.ts +28 -10
- package/apprt-core/assignWithPrototype.d.ts +1 -1
- package/apprt-core/bind.d.ts +3 -3
- package/apprt-core/bindAsync.d.ts +3 -3
- package/apprt-core/comparators.d.ts +3 -3
- package/apprt-core/config.d.ts +5 -5
- package/apprt-core/freeze.d.ts +1 -1
- package/apprt-core/string-replace.d.ts +3 -3
- package/apprt-core/when.d.ts +2 -2
- package/apprt-dom/css.d.ts +1 -1
- package/apprt-dom/elements.d.ts +3 -3
- package/apprt-esri-init/AGOLTokenRegistration.d.ts +2 -1
- package/apprt-esri-init/Activator.d.ts +1 -1
- package/apprt-esri-init/CredentialStorage.d.ts +13 -7
- package/apprt-esri-init/IdentityManagerExtender.d.ts +2 -2
- package/apprt-esri-init/{identityRequestUtils.d.ts → IdentityManagerUtils.d.ts} +3 -3
- package/apprt-esri-init/IdentityRequestInterceptor.d.ts +1 -3
- package/apprt-esri-init/IdentityRequestProcessor.d.ts +5 -3
- package/apprt-esri-init/IdentityRequestProcessorRegistration.d.ts +4 -2
- package/apprt-esri-init/OAuthInitialization.d.ts +2 -1
- package/apprt-esri-init/ReportTokenParameterExtender.d.ts +1 -1
- package/apprt-esri-init/TokenRequestInterceptor.d.ts +1 -1
- package/apprt-esri-init/account-token.d.ts +1 -1
- package/apprt-esri-init/init-config.d.ts +1 -1
- package/apprt-esri-init/init-security.d.ts +1 -1
- package/apprt-esri-init/init.d.ts +1 -1
- package/apprt-esri-init/module.d.ts +2 -2
- package/apprt-fetch/TimeoutController.d.ts +1 -1
- package/apprt-fetch/fetch.d.ts +1 -1
- package/apprt-fetch/index.d.ts +5 -5
- package/apprt-fetch/origin.d.ts +1 -1
- package/apprt-integration/IntegrationAPIFactory.d.ts +10 -4
- package/apprt-integration/module.d.ts +1 -1
- package/apprt-request/api.d.ts +3 -3
- package/apprt-request/impl/PrePostProcessorEngine.d.ts +2 -2
- package/apprt-streams/Helpers.d.ts +6 -6
- package/apprt-tokens/api.d.ts +1 -1
- package/apprt-vue/mixins/Bindable.d.ts +0 -3
- package/apprt-vuetify/close-on-scroll.d.ts +0 -2
- package/console/_BaseStore.d.ts +1 -1
- package/coordinatetransformer/api/CoordinateTransformer.d.ts +3 -3
- package/coordinatetransformer/api/ProjectionStore.d.ts +2 -2
- package/ct/store/ComplexQueryToSolrQL.d.ts +1 -1
- package/ct/store/Filter.d.ts +1 -1
- package/domains-system/LayersInterpreter.d.ts +1 -4
- package/geojson/external-libs/geojson.d.ts +19 -0
- package/geojson/external-libs/geojson_wkt.d.ts +2 -0
- package/highlights/api.d.ts +4 -4
- package/locateme/LocateMeModel.d.ts +1 -0
- package/locator-store/ItemId.d.ts +5 -11
- package/locator-store/LocatorStore.d.ts +19 -9
- package/locator-store/MetadataProvider.d.ts +5 -4
- package/locator-store/candidateResponseConversions.d.ts +21 -0
- package/locator-store/complexQueryToParams.d.ts +3 -0
- package/locator-store/module.d.ts +1 -1
- package/manager-monaco/plugins/AppJsonValidator.d.ts +1 -1
- package/manager-monaco/plugins/AppValidationPlugin.d.ts +1 -1
- package/manager-monaco/plugins/BundleCompletionProvider.d.ts +1 -1
- package/map-config-api/BasemapConfigParser.d.ts +9 -57
- package/map-config-api/GroundConfigParser.d.ts +9 -45
- package/map-config-api/LayerConfigParser.d.ts +8 -24
- package/map-config-api/LayerFactory.d.ts +26 -40
- package/map-config-api/api.d.ts +305 -0
- package/map-config-api/module.d.ts +4 -4
- package/map-widget/Constraints.d.ts +1 -1
- package/map-widget/LODSynchronizer.d.ts +1 -1
- package/map-widget/LayerObserver.d.ts +2 -2
- package/map-widget/LayerTraverser.d.ts +2 -2
- package/map-widget/MapLoadingInfoWidget.d.ts +1 -1
- package/map-widget/MapWidgetModel.d.ts +2 -53
- package/map-widget/Navigation.d.ts +1 -1
- package/map-widget/SubLayersInfo.d.ts +4 -6
- package/map-widget/ViewProvider.d.ts +1 -1
- package/map-widget/ViewReadyWatcher.d.ts +1 -1
- package/map-widget/api/Constraints.d.ts +1 -1
- package/map-widget/api/MapWidgetModel.d.ts +4 -4
- package/map-widget/api/Navigation.d.ts +1 -1
- package/maptips/PositionCalculator.d.ts +1 -1
- package/maptips/TipConfig.d.ts +1 -1
- package/package.json +1 -1
- package/parameter-url/UrlUpdater.d.ts +1 -1
- package/parametermanager/api.d.ts +2 -2
- package/parametersearch/Config.d.ts +4 -3
- package/parametersearch/SearchParameterResolver.d.ts +13 -2
- package/parametersearch/SearchTrigger.d.ts +31 -2
- package/popups/Action.d.ts +3 -5
- package/popups/ActionType.d.ts +3 -2
- package/popups/BaseAction.d.ts +34 -4
- package/popups/ContentUpdateProxy.d.ts +60 -2
- package/popups/CustomActionsInterceptor.d.ts +10 -3
- package/popups/CustomActionsUpdater.d.ts +16 -5
- package/popups/LayerPopupTemplateCustomizer.d.ts +13 -7
- package/popups/PopupConfig.d.ts +22 -17
- package/popups/PopupCustomizationsResolver.d.ts +65 -27
- package/popups/PopupInterceptor.d.ts +18 -24
- package/popups/PopupTemplateResolver.d.ts +6 -24
- package/popups/PopupTemplateWrapper.d.ts +12 -5
- package/popups/PopupType.d.ts +3 -3
- package/popups/PopupTypeTracker.d.ts +11 -6
- package/popups/StorePopupTemplateCustomizer.d.ts +15 -11
- package/popups/TypeBuilder.d.ts +23 -2
- package/popups/TypedFactoryIndex.d.ts +11 -7
- package/popups/api.d.ts +312 -0
- package/popups/module.d.ts +4 -4
- package/popups-default/FieldTypeFormatResolver.d.ts +6 -11
- package/popups-default/GridPopupDefinition.d.ts +10 -28
- package/popups-default/GridPopupDefinitionFactory.d.ts +22 -3
- package/popups-default/TemplateBuilder.d.ts +22 -6
- package/popups-default/types.d.ts +3 -0
- package/portal-webitem-map-config/AGOLStore.d.ts +1 -1
- package/result-api/DataTableCollectionImpl.d.ts +1 -1
- package/result-api/DataTableFactoryImpl.d.ts +1 -2
- package/result-api/GeometryCache.d.ts +1 -1
- package/result-api/InMemoryStoreDataset.d.ts +3 -3
- package/result-api/SharedZoomTo.d.ts +1 -1
- package/result-api/TableActionResolverImpl.d.ts +1 -1
- package/result-api/TableStateMapVisualizer.d.ts +1 -1
- package/result-api/actions/CsvConverter.d.ts +1 -1
- package/result-api/api/actions.d.ts +3 -3
- package/result-api/api/formatting.d.ts +3 -3
- package/result-api/api/model.d.ts +10 -10
- package/result-api/api/service.d.ts +1 -2
- package/result-api/formatters/DateTimeFormatter.d.ts +1 -1
- package/result-api/visualizer/DefaultSymbolLookup.d.ts +2 -2
- package/result-api/visualizer/RecordVisualizer.d.ts +1 -1
- package/result-ui/state/ReactiveStoreLogicImpl.d.ts +1 -1
- package/result-ui/state/api/ReactiveStore.d.ts +2 -2
- package/search-api/Config.d.ts +2 -2
- package/search-api/DataSource.d.ts +2 -2
- package/search-api/SearchServiceImpl.d.ts +1 -1
- package/search-api/StoreFacade.d.ts +1 -1
- package/search-api/api.d.ts +2 -2
- package/selection-resultcenter/CachingStore.d.ts +2 -2
- package/selection-services/LayerVisibility.d.ts +0 -1
- package/selection-tools/ToolRegistry.d.ts +1 -0
- package/store-api/ComplexQuery.d.ts +7 -7
- package/store-api/InMemoryStore.d.ts +1 -2
- package/store-api/QueryExecution.d.ts +2 -2
- package/store-api/QueryExecutions.d.ts +2 -2
- package/store-api/SpatialQuery.d.ts +1 -1
- package/store-api/_WatchForExecutionMixin.d.ts +1 -1
- package/store-api/api/ComplexQueryLang.d.ts +5 -5
- package/store-api/api/Store.d.ts +10 -10
- package/store-api/api/index.d.ts +2 -0
- package/store-api/rest/BaseRestStore.d.ts +1 -2
- package/store-api/rest/BaseWriteableRestStore.d.ts +1 -1
- package/store-api/rest/ComplexQueryToRQL.d.ts +2 -2
- package/store-api/rest/ComplexQueryToSQL.d.ts +2 -2
- package/store-api/rest/ComplexQueryToSolrQL.d.ts +4 -4
- package/store-api/rest/RQLStore.d.ts +2 -3
- package/store-api/rest/SQLStore.d.ts +2 -3
- package/store-api/utils.d.ts +7 -8
- package/template-appsoverview/template.d.ts +0 -1
- package/templates-config/TemplateModelStore.d.ts +1 -1
- package/themes-config/ThemeModelStore.d.ts +1 -1
- package/locateme-gpsgate/GPSGate.d.ts +0 -5
- package/locateme-gpsgate/GPSGateLocationProvider.d.ts +0 -7
- package/locateme-gpsgate/module.d.ts +0 -1
- package/locator-store/CandidateResponseConverter.d.ts +0 -2
- package/locator-store/ComplexQueryToParams.d.ts +0 -3
- package/popups/arc/ActionFactory.d.ts +0 -47
- package/popups/arc/PopupDefinitionFactory.d.ts +0 -58
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
apply: () => void;
|
|
5
|
-
dispose: () => void;
|
|
6
|
-
} | undefined>;
|
|
1
|
+
import { ConfigFragment, ConfigFragmentInterpreter, Disposable } from "domains-system/api";
|
|
2
|
+
import type { FilterStoreFactory } from "./FilterStoreFactory";
|
|
3
|
+
export declare class AGSSearchInterpreter implements ConfigFragmentInterpreter {
|
|
7
4
|
#private;
|
|
5
|
+
set _filterStoreFactory(value: FilterStoreFactory);
|
|
6
|
+
interpret(configFragment: ConfigFragment): Promise<Disposable | void>;
|
|
8
7
|
}
|
|
@@ -1,4 +1,10 @@
|
|
|
1
|
-
export
|
|
2
|
-
apply
|
|
3
|
-
dispose
|
|
4
|
-
}
|
|
1
|
+
export interface AGSSearchMerger {
|
|
2
|
+
apply(): void;
|
|
3
|
+
dispose(): void;
|
|
4
|
+
}
|
|
5
|
+
export interface SearchConfiguration {
|
|
6
|
+
id: string;
|
|
7
|
+
}
|
|
8
|
+
export declare function createAGSSearchMerger(storeFactory: any, // TODO(typings)
|
|
9
|
+
bundleContext: any, // TODO(typings)
|
|
10
|
+
configuration: SearchConfiguration[]): AGSSearchMerger;
|
|
@@ -1,29 +1,11 @@
|
|
|
1
|
+
import type { AGSStore, AGSStoreFactory as AGSStoreFactoryInterface, AGSStoreFromLayerOptions, AGSStoreFromURLOptions } from "./api";
|
|
1
2
|
/**
|
|
2
3
|
* Factory class that creates store instances.
|
|
3
4
|
*/
|
|
4
|
-
export class AGSStoreFactory {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
* @param {string} [options.id] The id of the new store
|
|
11
|
-
* @param {string} [options.layerId] A valid layer or sublayer id
|
|
12
|
-
* @param {string} [options.url] A service url, for services that are not in the map
|
|
13
|
-
* @param {boolean} [options.legacyImplementation]
|
|
14
|
-
* Set this value to `true` to use the deprecated old MapServerLayerStore implementation
|
|
15
|
-
* instead of the new LayerStore.
|
|
16
|
-
* @returns A promise that resolves to the new store instance
|
|
17
|
-
*/
|
|
18
|
-
createStore(options: {
|
|
19
|
-
id?: string | undefined;
|
|
20
|
-
layerId?: string | undefined;
|
|
21
|
-
url?: string | undefined;
|
|
22
|
-
legacyImplementation?: boolean | undefined;
|
|
23
|
-
}): Promise<LayerStore<import("./LayerStore").SupportedLayerType> | MapServerLayerStore>;
|
|
24
|
-
_createLegacyStore(layerId: any, options: any): MapServerLayerStore;
|
|
25
|
-
_createLayerStore(layerId: any, target: any, options: any): Promise<LayerStore<import("./LayerStore").SupportedLayerType>>;
|
|
26
|
-
_getServiceInfoFromMap(layerId: any): any;
|
|
5
|
+
export declare class AGSStoreFactory implements AGSStoreFactoryInterface {
|
|
6
|
+
private _mapWidgetModel;
|
|
7
|
+
createStore(options: AGSStoreFromLayerOptions | AGSStoreFromURLOptions): Promise<AGSStore>;
|
|
8
|
+
private _createLayerStore;
|
|
9
|
+
private _createLegacyStore;
|
|
10
|
+
private _getServiceInfoFromMap;
|
|
27
11
|
}
|
|
28
|
-
import { LayerStore } from "./LayerStore";
|
|
29
|
-
import MapServerLayerStore from "ct/mapping/store/MapServerLayerStore";
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
export class AutoStoreRegistration {
|
|
2
|
-
_observers
|
|
3
|
-
_storeRegistrations
|
|
1
|
+
export declare class AutoStoreRegistration {
|
|
2
|
+
private _observers;
|
|
3
|
+
private _storeRegistrations;
|
|
4
|
+
private _map;
|
|
5
|
+
private _agsStoreFactory;
|
|
6
|
+
private _bundleContext;
|
|
7
|
+
private _useLegacyImplementation;
|
|
8
|
+
private _delay;
|
|
4
9
|
activate(componentContext: any): void;
|
|
5
|
-
_bundleContext: any;
|
|
6
|
-
_delay: any;
|
|
7
|
-
_useLegacyImplementation: any;
|
|
8
|
-
_observeMap(): void;
|
|
9
|
-
_observeLayer(layer: any, callback: any): {
|
|
10
|
-
remove: () => void;
|
|
11
|
-
};
|
|
12
|
-
_checkServiceLayer(layer: any, id: any): void;
|
|
13
|
-
_observeServiceLayer(rootLayer: any, id: any): void;
|
|
14
|
-
_checkSublayer(layer: any, id: any): void;
|
|
15
|
-
_delayedRegisterStore(layer: any, id: any): void;
|
|
16
|
-
_delayedUnregisterStore(layer: any): void;
|
|
17
|
-
_registerStore(layer: any, id: any, registerId: any): Promise<void>;
|
|
18
|
-
_unregisterStore(layer: any, id: any, registerId: any): void;
|
|
19
10
|
deactivate(): void;
|
|
11
|
+
private _observeMap;
|
|
12
|
+
private _observeLayer;
|
|
13
|
+
private _checkServiceLayer;
|
|
14
|
+
private _observeServiceLayer;
|
|
15
|
+
private _checkSublayer;
|
|
16
|
+
private _delayedRegisterStore;
|
|
17
|
+
private _delayedUnregisterStore;
|
|
18
|
+
private _registerStore;
|
|
19
|
+
private _unregisterStore;
|
|
20
20
|
}
|
|
@@ -1,14 +1,21 @@
|
|
|
1
|
-
export
|
|
1
|
+
export declare class FilterStoreFactory {
|
|
2
|
+
#private;
|
|
3
|
+
private _mapWidgetModel;
|
|
4
|
+
private _agsStoreFactory;
|
|
5
|
+
private _logger;
|
|
6
|
+
private _i18n;
|
|
7
|
+
private _properties;
|
|
8
|
+
private _componentContext;
|
|
2
9
|
activate(): void;
|
|
3
|
-
_initStore(): any;
|
|
4
|
-
_logError(id: any, error: any): any;
|
|
5
|
-
_observeLayer(layerId: any): void;
|
|
6
|
-
_buildLayerObserver(mapWidgetModel: any, path: any): import("map-widget/LayerObserver").LayerObserver;
|
|
7
|
-
_trackLayerChange(path: any, layer: any, removed: any): void;
|
|
8
|
-
_trackSublayerChange(layer: any, subLayerId: any): void;
|
|
9
|
-
_trackVisibilityChanges(layerOrSublayer: any): void;
|
|
10
|
-
_checkStoreRegistrationStateAsync(targetLayer: any): void;
|
|
11
|
-
_checkStoreRegistrationState(targetLayer: any): void;
|
|
12
10
|
deactivate(): void;
|
|
13
|
-
|
|
14
|
-
|
|
11
|
+
private _initStore;
|
|
12
|
+
private _logError;
|
|
13
|
+
private _observeLayer;
|
|
14
|
+
private _buildLayerObserver;
|
|
15
|
+
private _trackLayerChange;
|
|
16
|
+
private _trackSublayerChange;
|
|
17
|
+
private _trackVisibilityChanges;
|
|
18
|
+
private _checkStoreRegistrationStateAsync;
|
|
19
|
+
private _checkStoreRegistrationState;
|
|
20
|
+
private _register;
|
|
21
|
+
}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
/// <reference types="arcgis-js-api" />
|
|
2
|
+
import { SpatialReference } from "esri/geometry";
|
|
2
3
|
import FeatureLayer from "esri/layers/FeatureLayer";
|
|
3
4
|
import type Sublayer from "esri/layers/support/Sublayer";
|
|
4
5
|
import type Map from "esri/Map";
|
|
5
|
-
import type { ComplexQueryExpression } from "store-api/api
|
|
6
|
-
import type { AsyncStore, GetOptions, Metadata, QueryOptions, AsyncQueryResult } from "store-api/api/Store";
|
|
7
|
-
import { SpatialReference } from "esri/geometry";
|
|
6
|
+
import type { ComplexQueryExpression, AsyncQueryResult, AsyncStore, GetOptions, Metadata, QueryOptions } from "store-api/api";
|
|
8
7
|
export interface LayerStoreMetadata extends Metadata {
|
|
9
8
|
/** The feature id property name. Same as store.idProperty. */
|
|
10
9
|
readonly idProperty: string;
|
|
@@ -17,11 +16,11 @@ export interface LayerStoreMetadata extends Metadata {
|
|
|
17
16
|
*/
|
|
18
17
|
readonly spatialReference: SpatialReference;
|
|
19
18
|
}
|
|
20
|
-
|
|
21
|
-
export
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
export
|
|
19
|
+
type FeatureLayerProps = "type" | "destroy" | "load" | "loaded" | "url" | "layerId" | "capabilities" | "sourceJSON" | "objectIdField" | "title" | "displayField" | "geometryType" | "fullExtent" | "popupTemplate" | "fields" | "createQuery" | "queryObjectIds" | "queryFeatures" | "queryFeatureCount" | "definitionExpression" | "spatialReference";
|
|
20
|
+
export type SimpleFeatureLayer = Pick<FeatureLayer, FeatureLayerProps>;
|
|
21
|
+
type Feature = Record<string, any>;
|
|
22
|
+
type FeatureId = string | number;
|
|
23
|
+
export type SupportedLayerType = SimpleFeatureLayer | Sublayer;
|
|
25
24
|
/**
|
|
26
25
|
* A store implementation that searches directly on an ArcGIS Feature Layer object.
|
|
27
26
|
*/
|
|
@@ -1,7 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import { AGSStore, AGSStoreFactory } from "./api";
|
|
2
|
+
export interface StoreInitializer {
|
|
3
|
+
init(props: Record<string, any>): Promise<StoreInitializerResult>;
|
|
4
|
+
}
|
|
5
|
+
export interface StoreInitializerOptions {
|
|
6
|
+
fac: AGSStoreFactory;
|
|
7
|
+
defaults: Record<string, any>;
|
|
8
|
+
}
|
|
9
|
+
export interface StoreInitializerResult {
|
|
10
|
+
store: AGSStore;
|
|
11
|
+
nonFilteredStore: AGSStore;
|
|
12
|
+
props: Record<string, any>;
|
|
13
|
+
}
|
|
14
|
+
export declare function createStoreInitializer(opts: StoreInitializerOptions): StoreInitializer;
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Provides an API to create custom store instances.
|
|
3
|
+
*
|
|
4
|
+
* @example
|
|
5
|
+
* Use the service name `agssearch.AGSStoreFactory` to obtain a {@link AGSStoreFactory} reference for your component:
|
|
6
|
+
* ```js
|
|
7
|
+
* "components": [
|
|
8
|
+
* {
|
|
9
|
+
* "name": "MyExampleComponent",
|
|
10
|
+
* "references": [
|
|
11
|
+
* {
|
|
12
|
+
* "name": "_storeFactory",
|
|
13
|
+
* "providing": "agssearch.AGSStoreFactory"
|
|
14
|
+
* }
|
|
15
|
+
* ]
|
|
16
|
+
* }
|
|
17
|
+
* ]
|
|
18
|
+
* ```
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* Use the obtained {@link AGSStoreFactory} to create new store instances.
|
|
22
|
+
* ```js
|
|
23
|
+
* class MyExampleComponent {
|
|
24
|
+
* async exampleMethod() {
|
|
25
|
+
* const store = await this._storeFactory.createStore({
|
|
26
|
+
* id: "my-new-store",
|
|
27
|
+
* layerId: "a-valid-layer-id"
|
|
28
|
+
* // or url: "https://example.com/some/FeatureServer"
|
|
29
|
+
* });
|
|
30
|
+
* }
|
|
31
|
+
* }
|
|
32
|
+
* ```
|
|
33
|
+
*
|
|
34
|
+
* @module
|
|
35
|
+
*/
|
|
36
|
+
import { AsyncStore } from "store-api/api";
|
|
37
|
+
/**
|
|
38
|
+
* Factory used to created new store instances.
|
|
39
|
+
*
|
|
40
|
+
* Use service name `"agssearch.AGSStoreFactory"` to inject an instance of this factory.
|
|
41
|
+
*/
|
|
42
|
+
export interface AGSStoreFactory {
|
|
43
|
+
/**
|
|
44
|
+
* Creates a new store instance backed by an ArcGIS Feature Server or Map Server.
|
|
45
|
+
* Either the `layerId` parameter or the `url` parameter must be specified.
|
|
46
|
+
*
|
|
47
|
+
* @example
|
|
48
|
+
* ```ts
|
|
49
|
+
* const store = await this._storeFactory.createStore({
|
|
50
|
+
* id: "my-new-store",
|
|
51
|
+
* layerId: "a-valid-layer-id"
|
|
52
|
+
* // or url: "https://example.com/some/FeatureServer"
|
|
53
|
+
* });
|
|
54
|
+
* ```
|
|
55
|
+
*/
|
|
56
|
+
createStore(options: AGSStoreFromLayerOptions | AGSStoreFromURLOptions): Promise<AGSStore>;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Properties supported by AGSStores.
|
|
60
|
+
*/
|
|
61
|
+
export interface AGSStoreCommonOptions {
|
|
62
|
+
/** The id of the new store. */
|
|
63
|
+
id: string;
|
|
64
|
+
/**
|
|
65
|
+
* Set this value to `true` to use the deprecated old MapServerLayerStore implementation
|
|
66
|
+
* instead of the new LayerStore.
|
|
67
|
+
*/
|
|
68
|
+
legacyImplementation?: boolean;
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Specifies an AGSStore constructed from a layer or sublayer id.
|
|
72
|
+
*/
|
|
73
|
+
export interface AGSStoreFromLayerOptions extends AGSStoreCommonOptions {
|
|
74
|
+
/** A valid layer id (e.g. `"mylayer"`) or sub layer id (e.g. `"mylayer/1"`). */
|
|
75
|
+
layerId: string;
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Specifies an AGSStore constructed from a URL.
|
|
79
|
+
*/
|
|
80
|
+
export interface AGSStoreFromURLOptions extends AGSStoreCommonOptions {
|
|
81
|
+
/** A service url, for services that are not in the map. */
|
|
82
|
+
url: string;
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* The type of stores created by the {@link AGSStoreFactory}.
|
|
86
|
+
*/
|
|
87
|
+
export interface AGSStore extends AsyncStore {
|
|
88
|
+
/**
|
|
89
|
+
* The URL of the layer queried by this store.
|
|
90
|
+
* Undefined if this store works on a client side layer.
|
|
91
|
+
*/
|
|
92
|
+
url: string | undefined;
|
|
93
|
+
/** @deprecated Use {@link url} instead. */
|
|
94
|
+
target: string | undefined;
|
|
95
|
+
}
|
package/agssearch/util.d.ts
CHANGED
package/apprt/Constants.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ export interface WatchHandle {
|
|
|
6
6
|
/** Unregister the watch handle */
|
|
7
7
|
remove(): void;
|
|
8
8
|
}
|
|
9
|
-
export
|
|
9
|
+
export type WatchCallback = () => void;
|
|
10
10
|
/**
|
|
11
11
|
* The interface that must be implemented by the left and right side objects of a Binding.
|
|
12
12
|
* Methods of this interface enable the synchronization of watches by making properties reactive:
|
|
@@ -52,4 +52,4 @@ export interface BindableInterface {
|
|
|
52
52
|
* If BindableInterface is used directly, the compiler complains because of "no common properties":
|
|
53
53
|
* https://stackoverflow.com/questions/46449237/type-x-has-no-properties-in-common-with-type-y
|
|
54
54
|
*/
|
|
55
|
-
export
|
|
55
|
+
export type Bindable = BindableInterface & Record<string, any>;
|
|
@@ -19,7 +19,7 @@ export * from "./Bindable";
|
|
|
19
19
|
* });
|
|
20
20
|
* ```
|
|
21
21
|
*/
|
|
22
|
-
export
|
|
22
|
+
export type ConvertFunction = (newValue: any, context: Context) => any;
|
|
23
23
|
/**
|
|
24
24
|
* The Context is available in conversion functions.
|
|
25
25
|
*/
|
|
@@ -57,7 +57,7 @@ export interface Context {
|
|
|
57
57
|
*/
|
|
58
58
|
promiseValue<T>(candidate: PromiseLike<T>): any;
|
|
59
59
|
}
|
|
60
|
-
export
|
|
60
|
+
export type PropertyName = string | symbol;
|
|
61
61
|
/**
|
|
62
62
|
* Class for two way binding between bindables.
|
|
63
63
|
*/
|
|
@@ -4,10 +4,10 @@ declare const ACCESS_IN_INSTANCE_KEY: unique symbol;
|
|
|
4
4
|
declare const _state: unique symbol;
|
|
5
5
|
declare const _instance: unique symbol;
|
|
6
6
|
declare const _destroyed: unique symbol;
|
|
7
|
-
export
|
|
7
|
+
export type PropertyAccessInstance = Bindable & {
|
|
8
8
|
[ACCESS_IN_INSTANCE_KEY]?: PropertyAccess;
|
|
9
9
|
};
|
|
10
|
-
export
|
|
10
|
+
export type GroupId = number | string;
|
|
11
11
|
export interface WatchState {
|
|
12
12
|
name: PropertyName;
|
|
13
13
|
value: any;
|
|
@@ -35,5 +35,5 @@ export declare class PropertyAccess {
|
|
|
35
35
|
watch(propertyName: PropertyName, watchListener: WatchListener): WatchHandle;
|
|
36
36
|
destroy(): void;
|
|
37
37
|
}
|
|
38
|
-
|
|
38
|
+
type WatchListener = (state: WatchState, ...args: any[]) => void;
|
|
39
39
|
export {};
|
|
@@ -5,7 +5,7 @@ import type { ConvertFunction } from "./Binding";
|
|
|
5
5
|
/**
|
|
6
6
|
* Transforms a value into another value.
|
|
7
7
|
*/
|
|
8
|
-
export
|
|
8
|
+
export type Transformer = ConvertFunction;
|
|
9
9
|
/**
|
|
10
10
|
* A transformer that also supports an `else` function that can be used
|
|
11
11
|
* when the transformer would otherwise skip a value (e.g. if {@link isDefined} is being used).
|
|
@@ -7,7 +7,7 @@ export interface WatchEvent {
|
|
|
7
7
|
* Note: the event object might not be present if the watchable did not wrap the watch method, i.e.
|
|
8
8
|
* if the Bindable already had a watch method.
|
|
9
9
|
*/
|
|
10
|
-
export
|
|
10
|
+
export type InternalWatchCallback = (event?: WatchEvent) => void;
|
|
11
11
|
/**
|
|
12
12
|
* A watchable wraps a Bindable instance and provides the complete interface.
|
|
13
13
|
* Optional methods that are not present on the original Bindable implementation will be
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export
|
|
1
|
+
export type TaskFunction<Args extends any[]> = (...args: Args) => void;
|
|
2
2
|
export declare function triggerMicroTasks<Args extends any[]>(fns?: TaskFunction<Args>[], ...args: Args): void;
|
|
@@ -6,7 +6,7 @@ import ExtendedPromise from "./Promise";
|
|
|
6
6
|
* @param reject callback to reject the promise with an error
|
|
7
7
|
* @param onCancelled accepts a cleanup function to invoke when the promise is cancelled
|
|
8
8
|
*/
|
|
9
|
-
export
|
|
9
|
+
export type CancelablePromiseExecutor<T> = (resolve: (value: T | PromiseLike<T>) => void, reject: (reason?: any) => void, onCancelled: (cleanup: () => void) => void) => void;
|
|
10
10
|
/**
|
|
11
11
|
* Promise class which provides a 'cancel' method.
|
|
12
12
|
* Read more about [Promises](./PROMISES.md).
|
package/apprt-core/Events.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import type { Equal } from "./Types";
|
|
2
2
|
/** Valid event names for the given events specifier. */
|
|
3
|
-
export
|
|
4
|
-
|
|
3
|
+
export type EventNames<Events> = keyof Events & string;
|
|
4
|
+
type Params<T> = Equal<T, any> extends true ? [] | [value: unknown] : Equal<T, void> extends true ? [] : [value: T];
|
|
5
5
|
/**
|
|
6
6
|
* Type of an event listener.
|
|
7
7
|
* @typeParam T the type of the event value. If `T` is `void`, no value will be available.
|
|
8
8
|
*/
|
|
9
|
-
export
|
|
9
|
+
export type EventCallback<T> = (...values: Params<T>) => void;
|
|
10
10
|
/** A handle that allows de-registration from events. */
|
|
11
11
|
export interface EventHandle {
|
|
12
12
|
/**
|
|
@@ -85,7 +85,7 @@ export interface Evented<Events> {
|
|
|
85
85
|
* This is useful if clients of a class should not be able to invoke the `emit()` function
|
|
86
86
|
* themselves.
|
|
87
87
|
*/
|
|
88
|
-
export
|
|
88
|
+
export type EventSource<Events> = Pick<Evented<Events>, "on">;
|
|
89
89
|
interface Constructor<T extends {}, Args extends any[]> {
|
|
90
90
|
new (...args: Args): T;
|
|
91
91
|
}
|
package/apprt-core/Logger.d.ts
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* * If ERROR is enabled for a logger, then the messages on level ERROR are logged.
|
|
8
8
|
* * If OFF is enabled for a logger, then nothing is logged.
|
|
9
9
|
*/
|
|
10
|
-
export
|
|
10
|
+
export type LogLevel = "DEBUG" | "INFO" | "WARN" | "ERROR" | "OFF";
|
|
11
11
|
/**
|
|
12
12
|
* A logger interface.
|
|
13
13
|
* It is inspired from the interface and behavior of the
|
|
@@ -209,7 +209,7 @@ export declare function getLogConfig(): [string, LogLevel][];
|
|
|
209
209
|
/**
|
|
210
210
|
* Type of a effective output method.
|
|
211
211
|
*/
|
|
212
|
-
export
|
|
212
|
+
export type WriterMethod = (msg: string, ...params: any[]) => void;
|
|
213
213
|
/**
|
|
214
214
|
* The effective writer of log messages.
|
|
215
215
|
* The default Writer implementation is the console.
|
package/apprt-core/Mutable.d.ts
CHANGED
|
@@ -2,8 +2,8 @@ declare const _mutableMembers: unique symbol;
|
|
|
2
2
|
interface MembersTag<Members> {
|
|
3
3
|
[_mutableMembers]: Members;
|
|
4
4
|
}
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
type PropertyKey = string | symbol;
|
|
6
|
+
type SimpleValueSpec = null | undefined | boolean | number | PropertyKey | bigint | any[];
|
|
7
7
|
interface ComplexValueSpec<T> {
|
|
8
8
|
value?: T;
|
|
9
9
|
type?: PropType<T>;
|
|
@@ -16,35 +16,35 @@ interface ComplexValueSpec<T> {
|
|
|
16
16
|
cast?(value: unknown): T;
|
|
17
17
|
clone?(value: T): T;
|
|
18
18
|
}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
19
|
+
type ValueSpec = SimpleValueSpec | ComplexValueSpec<any>;
|
|
20
|
+
type MethodSpec = (...args: any[]) => any;
|
|
21
|
+
type SpecialNames = "$inherit" | "$watch" | "$construct";
|
|
22
|
+
type WatchAction<T> = (value: T, evt: WatchEvent<any, T>) => void;
|
|
23
|
+
type WatchItem<T> = WatchAction<T> | {
|
|
24
24
|
triggerOnInit?: boolean;
|
|
25
25
|
depends?: PropertyKey[];
|
|
26
26
|
do: WatchAction<T>;
|
|
27
27
|
};
|
|
28
|
-
export
|
|
29
|
-
$watch?: Record<PropertyKey, WatchItem<any
|
|
28
|
+
export type MutableDefinition<T> = {
|
|
29
|
+
$watch?: Record<PropertyKey, WatchItem<any> & ThisType<Mutable<BuildMutableMembers<MutableDefinition<T>>>>>;
|
|
30
30
|
$construct?(options?: any): void;
|
|
31
31
|
} & {
|
|
32
32
|
[P in keyof Exclude<T, SpecialNames>]: ValueSpec | MethodSpec | any;
|
|
33
33
|
};
|
|
34
|
-
|
|
35
|
-
|
|
34
|
+
type IsEmptyObject<T> = T extends {} ? ({} extends T ? true : false) : false;
|
|
35
|
+
type ResolveSpecType<Spec> = Spec extends {
|
|
36
36
|
type: PropType<infer T>;
|
|
37
37
|
} ? T : Spec extends {
|
|
38
38
|
value: infer V;
|
|
39
39
|
} ? V : Spec extends ComplexValueSpec<infer V> ? V : never;
|
|
40
|
-
|
|
40
|
+
type ResolveSpecRequired<Spec, ResolvedType> = Spec extends {
|
|
41
41
|
required: true;
|
|
42
42
|
} ? NonNullable<ResolvedType> : ResolvedType | undefined;
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
43
|
+
type InferTypeFromComplexValueSpec<Spec> = ResolveSpecRequired<Spec, ResolveSpecType<Spec>>;
|
|
44
|
+
type MapSpecToProperty<Spec, Original = Spec> = Spec extends SimpleValueSpec ? Original | undefined : IsEmptyObject<Spec> extends true ? Spec | undefined : Spec extends ComplexValueSpec<any> ? InferTypeFromComplexValueSpec<Spec> : never;
|
|
45
|
+
type MapSpecToClassMember<Spec, Original = Spec> = Spec extends ValueSpec ? MapSpecToProperty<Original> : Spec extends MethodSpec ? Spec : never;
|
|
46
|
+
type ExcludeSpecialPropertiesAndInvalidSpecs<Name, Spec> = Exclude<Name, SpecialNames> extends never ? never : MapSpecToClassMember<Spec> extends never ? never : Name;
|
|
47
|
+
type BuildMutableMembers<Specs> = {
|
|
48
48
|
[P in keyof Specs as ExcludeSpecialPropertiesAndInvalidSpecs<P, Specs[P]>]: MapSpecToClassMember<Specs[P]>;
|
|
49
49
|
};
|
|
50
50
|
/** Common methods and properties present on all mutable instances. */
|
|
@@ -102,7 +102,7 @@ interface MutableBase<Members> extends MembersTag<Members> {
|
|
|
102
102
|
* Represents the type of mutable instances built from some definition.
|
|
103
103
|
* All properties and methods listed in the original definition are mapped to class members.
|
|
104
104
|
*/
|
|
105
|
-
export
|
|
105
|
+
export type Mutable<Members> = MutableBase<Members> & Members;
|
|
106
106
|
/**
|
|
107
107
|
* Event that is emitted when a property value changes.
|
|
108
108
|
*/
|
|
@@ -115,17 +115,17 @@ export interface WatchEvent<Name = PropertyKey, T = unknown> {
|
|
|
115
115
|
value: T;
|
|
116
116
|
}
|
|
117
117
|
/** Event handler function type for property changes. */
|
|
118
|
-
export
|
|
118
|
+
export type WatchCallback<Name, T> = (event: WatchEvent<Name, T>) => void;
|
|
119
119
|
/** Handle that allows disconnecting from a previous `watch()` call. */
|
|
120
120
|
export interface WatchHandle {
|
|
121
121
|
/** Stops watching for property changes. */
|
|
122
122
|
remove(): void;
|
|
123
123
|
}
|
|
124
|
-
|
|
125
|
-
|
|
124
|
+
type RemoveFunction<T> = T extends (...args: any[]) => any ? never : true;
|
|
125
|
+
type RemoveFunctions<T> = {
|
|
126
126
|
[P in keyof T as RemoveFunction<T[P]> extends never ? never : P]: T[P];
|
|
127
127
|
};
|
|
128
|
-
export
|
|
128
|
+
export type PropType<T> = {
|
|
129
129
|
(): T;
|
|
130
130
|
} | {
|
|
131
131
|
new (...args: never[]): T & object;
|
|
@@ -135,13 +135,13 @@ export declare type PropType<T> = {
|
|
|
135
135
|
/**
|
|
136
136
|
* This type lists all valid properties of the given mutable, including their types.
|
|
137
137
|
*/
|
|
138
|
-
export
|
|
138
|
+
export type Properties<M extends Mutable<any>> = M extends MembersTag<infer V> ? RemoveFunctions<V> : {};
|
|
139
139
|
/**
|
|
140
140
|
* This type is a union listing all valid property identifiers for the given mutable.
|
|
141
141
|
*/
|
|
142
|
-
export
|
|
142
|
+
export type PropertyName<M extends Mutable<any>> = Extract<keyof Properties<M>, PropertyKey>;
|
|
143
143
|
/** Excludes symbol properties from the list of property names (they are not watchable via '*') */
|
|
144
|
-
|
|
144
|
+
type PublicPropertyName<M extends Mutable<any>> = Exclude<PropertyName<M>, symbol>;
|
|
145
145
|
/**
|
|
146
146
|
* Represents the type of a mutable class created from a definition.
|
|
147
147
|
* Instances of this type are created by calling the `declare()` function.
|
|
@@ -5,7 +5,7 @@ export interface HandleMethods {
|
|
|
5
5
|
unregister?(): void;
|
|
6
6
|
unsubscribe?(): void;
|
|
7
7
|
}
|
|
8
|
-
|
|
8
|
+
type RequiredKey<T, K extends keyof T> = Required<Pick<T, K>> & T;
|
|
9
9
|
/**
|
|
10
10
|
* Type of supported cleanup handles.
|
|
11
11
|
*
|
|
@@ -16,9 +16,9 @@ declare type RequiredKey<T, K extends keyof T> = Required<Pick<T, K>> & T;
|
|
|
16
16
|
* - unregister()
|
|
17
17
|
* - unsubscribe()
|
|
18
18
|
*/
|
|
19
|
-
export
|
|
19
|
+
export type Handle = RequiredKey<HandleMethods, "destroy"> | RequiredKey<HandleMethods, "dispose"> | RequiredKey<HandleMethods, "remove"> | RequiredKey<HandleMethods, "unregister"> | RequiredKey<HandleMethods, "unsubscribe"> | null | undefined;
|
|
20
20
|
/** Type of the rebind callback supported by {@link Observers} and {@link ObserverGroup}. */
|
|
21
|
-
export
|
|
21
|
+
export type RebindCallback = (self: Observers | ObserverGroup, ...args: unknown[]) => void;
|
|
22
22
|
/**
|
|
23
23
|
* ObserverGroups contain a series of handles.
|
|
24
24
|
*/
|
package/apprt-core/Promise.d.ts
CHANGED
|
@@ -12,7 +12,7 @@ export interface StateQueryable {
|
|
|
12
12
|
/** Returns true if the promise was cancelled before it was able to complete. */
|
|
13
13
|
isCancelled(): boolean;
|
|
14
14
|
}
|
|
15
|
-
|
|
15
|
+
type State = "pending" | "fulfilled" | "rejected" | "cancelled";
|
|
16
16
|
declare const PROMISE: unique symbol;
|
|
17
17
|
declare const STATE: unique symbol;
|
|
18
18
|
declare const PRIVATE_CONSTUCTOR_TAG: unique symbol;
|