jmapcloud-ng-core-types 1.1.42 → 2.0.0
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/README.md +1 -1
- package/all-enums.ts +3 -0
- package/enums.ts +24 -0
- package/index.d.ts +23 -2
- package/package.json +2 -1
- package/public/core.d.ts +244 -47
- package/public/global-aliases.d.ts +15 -0
- package/public/jmap/attachment.d.ts +18 -35
- package/public/jmap/datasource.ts +3 -0
- package/public/jmap/layer.d.ts +2 -1
- package/public/jmap/map-context.d.ts +1 -0
- package/public/jmap/map.d.ts +23 -0
- package/public/jmap/message.d.ts +69 -0
- package/public/jmap/startup-options.d.ts +28 -7
- package/public/jmap/user.d.ts +35 -1
- package/public/state.d.ts +19 -2
package/README.md
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
JMap Cloud NG Core
|
|
4
4
|
|
|
5
|
-
The latest version of the JMap Cloud NG
|
|
5
|
+
The latest version of the JMap Cloud NG Javascript API documentation, including Core types and API, is available <a href="https://k2geospatial.github.io/jmapcloud-frontend/jmapcloud-ng-types/latest" target="_blank">here</a>.
|
|
6
6
|
|
|
7
7
|
Examples and user documentation are available <a href="https://docs.jmapcloud.io/en/jmap-ng/jmap-ng-developer-documentation" target="_blank">here</a>.
|
package/all-enums.ts
CHANGED
|
@@ -21,6 +21,7 @@ import {
|
|
|
21
21
|
JLAYER_STYLE_LINE_JOIN,
|
|
22
22
|
JLAYER_STYLE_RULE_CONDITION_EXPRESSION_OPERATORS,
|
|
23
23
|
JLAYER_STYLE_TYPES,
|
|
24
|
+
JAPP_MESSAGE_SEVERITIES,
|
|
24
25
|
JLAYER_THEMATIC_FAMILY_TYPES,
|
|
25
26
|
JLAYER_THEMATIC_TYPES,
|
|
26
27
|
JLOCALES,
|
|
@@ -259,6 +260,8 @@ export const ALL_ROLES: ROLES[] = [ROLES.ORG_ADMIN, ROLES.ORG_EDITOR, ROLES.ORG_
|
|
|
259
260
|
|
|
260
261
|
export const ALL_MEMBER_ROLES: MEMBER_ROLES[] = [ROLES.ORG_ADMIN, ROLES.ORG_EDITOR, ROLES.ORG_VIEWER]
|
|
261
262
|
|
|
263
|
+
export const ALL_APP_MESSAGE_SEVERITIES: JAPP_MESSAGE_SEVERITIES[] = [JAPP_MESSAGE_SEVERITIES.SUCCESS, JAPP_MESSAGE_SEVERITIES.INFO, JAPP_MESSAGE_SEVERITIES.WARNING, JAPP_MESSAGE_SEVERITIES.ERROR]
|
|
264
|
+
|
|
262
265
|
export const ALL_TABLE_ATTRIBUTE_TYPES: JTABLE_ATTRIBUTE_TYPES[] = [
|
|
263
266
|
JTABLE_ATTRIBUTE_TYPES.BINARY,
|
|
264
267
|
JTABLE_ATTRIBUTE_TYPES.BOOLEAN,
|
package/enums.ts
CHANGED
|
@@ -365,6 +365,30 @@ export enum JMAP_CONTEXT_SORT_BY_DIRECTIONS {
|
|
|
365
365
|
DESC = "desc"
|
|
366
366
|
}
|
|
367
367
|
|
|
368
|
+
// From message.d.ts
|
|
369
|
+
export enum JAPP_MESSAGE_SEVERITIES {
|
|
370
|
+
SUCCESS = "success",
|
|
371
|
+
INFO = "info",
|
|
372
|
+
WARNING = "warning",
|
|
373
|
+
ERROR = "error"
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
// From message.d.ts — cross-bundle action-type contract; string values must
|
|
377
|
+
// stay in sync with ACTIONS.APP_MESSAGE_* in core/store/actions.ts.
|
|
378
|
+
export enum MESSAGE_ACTION_TYPES {
|
|
379
|
+
ADD_MESSAGE = "APP_MESSAGE_ADD_MESSAGE",
|
|
380
|
+
SET_MESSAGE_EXPIRED = "APP_MESSAGE_SET_MESSAGE_EXPIRED",
|
|
381
|
+
SET_CONFIRM_MESSAGE = "APP_MESSAGE_SET_CONFIRM_MESSAGE",
|
|
382
|
+
ADD_OVERLAY_MESSAGE = "APP_MESSAGE_ADD_OVERLAY_MESSAGE",
|
|
383
|
+
DELETE_OVERLAY_MESSAGES = "APP_MESSAGE_DELETE_OVERLAY_MESSAGES"
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
// From user.d.ts — cross-bundle action-type contract; string value must
|
|
387
|
+
// stay in sync with ACTIONS.APP_USER_SET_ACTIONS in core/store/actions.ts.
|
|
388
|
+
export enum USER_ACTION_TYPES {
|
|
389
|
+
SET_ACTIONS = "APP_USER_SET_ACTIONS"
|
|
390
|
+
}
|
|
391
|
+
|
|
368
392
|
// From server.d.ts
|
|
369
393
|
export enum JSERVER_MICRO_SERVICE_STATUSES {
|
|
370
394
|
STARTING = "STARTING",
|
package/index.d.ts
CHANGED
|
@@ -23,6 +23,8 @@ export type {
|
|
|
23
23
|
JUIState,
|
|
24
24
|
JUserState
|
|
25
25
|
} from "./public/state.d.ts"
|
|
26
|
+
export type { JAppConfirmMessage, JAppMessage, JAppMessageOptions, JAppMessageService, JAppMessageState, JAppOverlayMessage } from "./public/jmap/message.d.ts"
|
|
27
|
+
export type { JAppUserAction } from "./public/jmap/user.d.ts"
|
|
26
28
|
|
|
27
29
|
export interface JCoreService extends JCoreMainService {
|
|
28
30
|
Project: JProjectService
|
|
@@ -54,6 +56,7 @@ export interface JCoreService extends JCoreMainService {
|
|
|
54
56
|
|
|
55
57
|
export interface JUIService {
|
|
56
58
|
setMainLayoutVisibility(isVisible: boolean): void
|
|
59
|
+
setExtensionRoot(node: unknown): void
|
|
57
60
|
openIFramePopup(params: JIFramePopupParams): void
|
|
58
61
|
closeIFramePopup(): void
|
|
59
62
|
getContainerWidth(): number
|
|
@@ -197,6 +200,11 @@ export interface JGeolocationService {
|
|
|
197
200
|
isSupportedByBrowser(): boolean
|
|
198
201
|
isEnabled(): boolean
|
|
199
202
|
getMyLocation(): Promise<JLocation>
|
|
203
|
+
followMyLocation(options?: JPanAndZoomOptions): Promise<JLocation>
|
|
204
|
+
stopFollowingMyLocation(): void
|
|
205
|
+
/**
|
|
206
|
+
* @deprecated Use followMyLocation instead.
|
|
207
|
+
*/
|
|
200
208
|
goToMyLocation(options?: JPanAndZoomOptions): Promise<JLocation>
|
|
201
209
|
}
|
|
202
210
|
|
|
@@ -405,7 +413,7 @@ export interface JAttachmentService {
|
|
|
405
413
|
update(dataSourceId: string, dataSourceOrganizationId: string, attachmentId: string, params: JUpdateAttachmentParams): Promise<string>
|
|
406
414
|
download(dataSourceId: string, dataSourceOrganizationId: string, attachmentId: string): Promise<{ data: Blob; headers: any }>
|
|
407
415
|
downloadToDevice(attachment: JAttachmentFile, dataSourceId: string, dataSourceOrganizationId: string): Promise<void>
|
|
408
|
-
previewAttachments(
|
|
416
|
+
previewAttachments(attachmentId: string, dataSourceId: string, dataSourceOrganizationId: string, itemId: JId): void
|
|
409
417
|
}
|
|
410
418
|
|
|
411
419
|
export interface JFormService {
|
|
@@ -516,6 +524,7 @@ export interface JMapService {
|
|
|
516
524
|
getMap(): maplibregl.Map
|
|
517
525
|
getMapJSLib(): any
|
|
518
526
|
getDomContainerId(): string
|
|
527
|
+
getMaplibreContainerElement(): HTMLElement | null
|
|
519
528
|
getAllDistanceUnits(): JMAP_DISTANCE_UNITS[]
|
|
520
529
|
getDistanceUnit(): JMAP_DISTANCE_UNITS
|
|
521
530
|
setDistanceUnit(distanceUnit: JMAP_DISTANCE_UNITS): void
|
|
@@ -545,6 +554,9 @@ export interface JMapService {
|
|
|
545
554
|
setTerrainControlVisibility(isVisible: boolean): void
|
|
546
555
|
isMapInfoControlExpanded(): boolean
|
|
547
556
|
setMapInfoControlExpansion(isExpanded: boolean): void
|
|
557
|
+
isInitialExtentControlVisible(): boolean
|
|
558
|
+
setInitialExtentControlVisibility(isVisible: boolean): void
|
|
559
|
+
zoomToProjectInitialExtent(): Promise<void>
|
|
548
560
|
getMaplibreSupportedJMapLayerIds(): JId[]
|
|
549
561
|
getMaplibreSupportedJMapLayerIdBefore(layerId: JId): JId | undefined
|
|
550
562
|
getMaplibreSupportedJMapLayerIdAfter(layerId: JId): JId | undefined
|
|
@@ -582,10 +594,18 @@ export interface JMapService {
|
|
|
582
594
|
openModificationPopupForCenter(): void
|
|
583
595
|
openModificationPopupForScale(): void
|
|
584
596
|
closeModificationPopup(): void
|
|
597
|
+
/** @deprecated Use JMap.Map.getLayerTransparency to read overridden transparency. For non-overridden layers, use JMap.Map.getRasterLayerInitialTransparency. */
|
|
585
598
|
getRasterLayerTransparency(layerId: JId): number
|
|
599
|
+
/** @deprecated This method is unreliable when style opacity is expression-based and will be removed in a future version. */
|
|
586
600
|
getRasterLayerInitialTransparency(layerId: JId): number
|
|
601
|
+
/** @deprecated Use JMap.Map.resetLayerTransparency instead. It manages all supported map layer types (vector and raster), not only raster layers. */
|
|
587
602
|
resetRasterLayerTransparency(layerId: JId): number
|
|
603
|
+
/** @deprecated Use JMap.Map.setLayerTransparency instead. It manages all supported map layer types (vector and raster), not only raster layers. */
|
|
588
604
|
setRasterLayerTransparency(layerId: JId, transparency: number): void
|
|
605
|
+
getLayerTransparency(layerId: JId): number | undefined
|
|
606
|
+
isLayerTransparencyOverridden(layerId: JId): boolean
|
|
607
|
+
setLayerTransparency(layerId: JId, transparency: number): void
|
|
608
|
+
resetLayerTransparency(layerId: JId): void
|
|
589
609
|
setPixelRatio(pixelRatio: number): boolean
|
|
590
610
|
getPixelRatio(): number
|
|
591
611
|
}
|
|
@@ -695,6 +715,7 @@ export interface JLayerService {
|
|
|
695
715
|
getLayerTreeElementsById(): { [key in JId]: JLayerTreeElement }
|
|
696
716
|
getLayers(): JLayer[]
|
|
697
717
|
getLayerIds(): JId[]
|
|
718
|
+
setLayersMapOrder(layerIds: JId[]): void
|
|
698
719
|
getVectorLayers(): JLayer[]
|
|
699
720
|
getVectorLayerIds(): JId[]
|
|
700
721
|
getLayerAttributes(layerId: JId): JLayerAttribute[]
|
|
@@ -782,7 +803,7 @@ export interface JUserService {
|
|
|
782
803
|
removePreference(name: string): Promise<string | null>
|
|
783
804
|
setPreference(name: string, value: string | undefined): Promise<void>
|
|
784
805
|
setToken(token: string, organizationId?: string): Promise<JSessionData>
|
|
785
|
-
login(login?: string, password?: string): Promise<JSessionData> | Promise<void>
|
|
806
|
+
login(login?: string, password?: string, connectionName?: string): Promise<JSessionData> | Promise<void>
|
|
786
807
|
loginIntoOrganization(organizationId: string): Promise<JSessionData> | Promise<void>
|
|
787
808
|
loginWithIdentityProvider(providerId: string): void
|
|
788
809
|
logout(): Promise<void>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "jmapcloud-ng-core-types",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"description": "JMap Cloud specific version of JMap Cloud NG Core types and interfaces",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"types": "ambient.d.ts",
|
|
@@ -27,6 +27,7 @@
|
|
|
27
27
|
},
|
|
28
28
|
"homepage": "https://github.com/k2geospatial/jmapcloud-ng-core-types#readme",
|
|
29
29
|
"devDependencies": {
|
|
30
|
+
"rollup-plugin-visualizer": "^5.14.0",
|
|
30
31
|
"typedoc": "^0.25.13"
|
|
31
32
|
},
|
|
32
33
|
"dependencies": {
|
package/public/core.d.ts
CHANGED
|
@@ -461,9 +461,41 @@ export namespace JMap {
|
|
|
461
461
|
* ```
|
|
462
462
|
*/
|
|
463
463
|
function getMyLocation(): Promise<JLocation>
|
|
464
|
+
/**
|
|
465
|
+
* **JMap.Geolocation.followMyLocation**
|
|
466
|
+
*
|
|
467
|
+
* Returns the user current location if promise succeed, pan and zoom to this location and starts monitoring the user location.
|
|
468
|
+
*
|
|
469
|
+
* @throws if browser doesn't support geolocation, if geolocation is disabled, if an unexpected error occurs while getting location from browser
|
|
470
|
+
* @param options pan and zoom options
|
|
471
|
+
* @example
|
|
472
|
+
* ```ts
|
|
473
|
+
* // pan and zoom to the user location and start monitoring location updates
|
|
474
|
+
* JMap.Geolocation.followMyLocation()
|
|
475
|
+
* .then(location => console.info("Paned and zommed to user location ", location))
|
|
476
|
+
* .error(error => console.error("Cannot get my location : ", error))
|
|
477
|
+
* ```
|
|
478
|
+
*/
|
|
479
|
+
function followMyLocation(options?: JPanAndZoomOptions): Promise<JLocation>
|
|
480
|
+
|
|
481
|
+
/**
|
|
482
|
+
* **JMap.Geolocation.stopFollowingMyLocation**
|
|
483
|
+
*
|
|
484
|
+
* Stops following the user location and hides the geolocation marker.
|
|
485
|
+
*
|
|
486
|
+
* @example
|
|
487
|
+
* ```ts
|
|
488
|
+
* // stop following user location updates
|
|
489
|
+
* JMap.Geolocation.stopFollowingMyLocation()
|
|
490
|
+
* ```
|
|
491
|
+
*/
|
|
492
|
+
function stopFollowingMyLocation(): void
|
|
493
|
+
|
|
464
494
|
/**
|
|
465
495
|
* **JMap.Geolocation.goToMyLocation**
|
|
466
496
|
*
|
|
497
|
+
* @deprecated Use JMap.Geolocation.followMyLocation instead.
|
|
498
|
+
*
|
|
467
499
|
* Returns the user current location if promise succeed, and pan and zoom to this location.
|
|
468
500
|
*
|
|
469
501
|
* @throws if browser doesn't support geolocation, if geolocation is disabled, if an unexpected error occurs while getting location from browser
|
|
@@ -1908,6 +1940,30 @@ export namespace JMap {
|
|
|
1908
1940
|
* ```
|
|
1909
1941
|
*/
|
|
1910
1942
|
function getLayerIds(): JId[]
|
|
1943
|
+
/**
|
|
1944
|
+
* **JMap.Layer.setLayersMapOrder**
|
|
1945
|
+
*
|
|
1946
|
+
* Sets the display order on the map of supported layers for the current NG session.
|
|
1947
|
+
*
|
|
1948
|
+
* The provided array must contain exactly the same layer ids returned by `JMap.Map.getMaplibreSupportedJMapLayerIds()`,
|
|
1949
|
+
* but in the desired order.
|
|
1950
|
+
*
|
|
1951
|
+
* This only updates the client session state. It does not persist the order on the server.
|
|
1952
|
+
*
|
|
1953
|
+
* @throws Error if the array contains missing ids, extra ids, duplicates, or non-layer ids.
|
|
1954
|
+
* @param layerIds the complete ordered array of map-supported layer ids
|
|
1955
|
+
* @example
|
|
1956
|
+
* ```ts
|
|
1957
|
+
* // move first layer to the end
|
|
1958
|
+
* const orderedIds = JMap.Map.getMaplibreSupportedJMapLayerIds()
|
|
1959
|
+
* const firstId = orderedIds.shift()
|
|
1960
|
+
* if (firstId !== undefined) {
|
|
1961
|
+
* orderedIds.push(firstId)
|
|
1962
|
+
* JMap.Layer.setLayersMapOrder(orderedIds)
|
|
1963
|
+
* }
|
|
1964
|
+
* ```
|
|
1965
|
+
*/
|
|
1966
|
+
function setLayersMapOrder(layerIds: JId[]): void
|
|
1911
1967
|
/**
|
|
1912
1968
|
* **JMap.Layer.getVectorLayers**
|
|
1913
1969
|
*
|
|
@@ -2983,15 +3039,39 @@ export namespace JMap {
|
|
|
2983
3039
|
/**
|
|
2984
3040
|
* ***JMap.Map.getDomContainerId***
|
|
2985
3041
|
*
|
|
2986
|
-
* Returns the
|
|
3042
|
+
* Returns the id of the JMap UI wrapper. In library-in-host-div mode this is the id the embedder
|
|
3043
|
+
* set on the host div; in standalone mode it is the auto-created container id (default `"jmap-map"`).
|
|
3044
|
+
*
|
|
3045
|
+
* Since the shell-decoupling refactor, this id refers to the WRAPPER, not the maplibre attach point.
|
|
3046
|
+
* Use `JMap.Map.getMaplibreContainerElement()` if you specifically need a reference to the maplibre
|
|
3047
|
+
* container.
|
|
2987
3048
|
*
|
|
2988
3049
|
* @example
|
|
2989
3050
|
* ```ts
|
|
2990
|
-
* // returns the
|
|
3051
|
+
* // returns the wrapper div id (e.g. "my-map" if the embedder set JMAP_OPTIONS.map.containerId)
|
|
2991
3052
|
* JMap.Map.getDomContainerId()
|
|
2992
3053
|
* ```
|
|
2993
3054
|
*/
|
|
2994
3055
|
function getDomContainerId(): string
|
|
3056
|
+
/**
|
|
3057
|
+
* ***JMap.Map.getMaplibreContainerElement***
|
|
3058
|
+
*
|
|
3059
|
+
* Returns the internal `#jmap-maplibre-host` div where maplibre-gl is attached, or `null` if the
|
|
3060
|
+
* DOM has not been initialized yet (i.e., before the project bootstrapper runs).
|
|
3061
|
+
*
|
|
3062
|
+
* Embedders rarely need this — most legitimate uses of "the map container" want the wrapper, which
|
|
3063
|
+
* is what `JMap.Map.getDomContainerId()` returns. Provided as a defensive helper for embedders that
|
|
3064
|
+
* previously resolved the maplibre container by id directly.
|
|
3065
|
+
*
|
|
3066
|
+
* @example
|
|
3067
|
+
* ```ts
|
|
3068
|
+
* const maplibreEl = JMap.Map.getMaplibreContainerElement()
|
|
3069
|
+
* if (maplibreEl) {
|
|
3070
|
+
* maplibreEl.style.cursor = "crosshair"
|
|
3071
|
+
* }
|
|
3072
|
+
* ```
|
|
3073
|
+
*/
|
|
3074
|
+
function getMaplibreContainerElement(): HTMLElement | null
|
|
2995
3075
|
/**
|
|
2996
3076
|
* **JMap.Map.getAllDistanceUnits**
|
|
2997
3077
|
*
|
|
@@ -3311,6 +3391,48 @@ export namespace JMap {
|
|
|
3311
3391
|
* ```
|
|
3312
3392
|
*/
|
|
3313
3393
|
function setTerrainActive(active: boolean): void
|
|
3394
|
+
/**
|
|
3395
|
+
* ***JMap.Map.isInitialExtentControlVisible***
|
|
3396
|
+
*
|
|
3397
|
+
* Returns true if the initial extent control is visible, false otherwise.
|
|
3398
|
+
*
|
|
3399
|
+
* @example
|
|
3400
|
+
* ```ts
|
|
3401
|
+
* // returns true if the initial extent control is visible, false otherwise
|
|
3402
|
+
* JMap.Map.isInitialExtentControlVisible()
|
|
3403
|
+
* ```
|
|
3404
|
+
*/
|
|
3405
|
+
function isInitialExtentControlVisible(): boolean
|
|
3406
|
+
/**
|
|
3407
|
+
* ***JMap.Map.setInitialExtentControlVisibility***
|
|
3408
|
+
*
|
|
3409
|
+
* Changes the initial extent control visibility on the map.
|
|
3410
|
+
*
|
|
3411
|
+
* @param isVisible true to display the initial extent control, false to hide
|
|
3412
|
+
*
|
|
3413
|
+
* @example
|
|
3414
|
+
* ```ts
|
|
3415
|
+
* // displays the initial extent control on the map
|
|
3416
|
+
* JMap.Map.setInitialExtentControlVisibility(true)
|
|
3417
|
+
*
|
|
3418
|
+
* // hides the initial extent control on the map
|
|
3419
|
+
* JMap.Map.setInitialExtentControlVisibility(false)
|
|
3420
|
+
* ```
|
|
3421
|
+
*/
|
|
3422
|
+
function setInitialExtentControlVisibility(isVisible: boolean): void
|
|
3423
|
+
/**
|
|
3424
|
+
* ***JMap.Map.zoomToProjectInitialExtent***
|
|
3425
|
+
*
|
|
3426
|
+
* Zooms to the active project's initial extent. If the project has no initial extent, will zoom to the world's extent
|
|
3427
|
+
*
|
|
3428
|
+
* @throws Error if no project is active
|
|
3429
|
+
* @example
|
|
3430
|
+
* ```ts
|
|
3431
|
+
* // zoom to the active project's extent
|
|
3432
|
+
* JMap.Map.zoomToProjectInitialExtent()
|
|
3433
|
+
* ```
|
|
3434
|
+
*/
|
|
3435
|
+
function zoomToProjectInitialExtent(): Promise<void>
|
|
3314
3436
|
/**
|
|
3315
3437
|
* ***JMap.Map.setSelectionStyle***
|
|
3316
3438
|
*
|
|
@@ -4122,30 +4244,43 @@ export namespace JMap {
|
|
|
4122
4244
|
/**
|
|
4123
4245
|
* **JMap.Map.getRasterLayerTransparency**
|
|
4124
4246
|
*
|
|
4125
|
-
* Returns the transparency for a given raster layer
|
|
4247
|
+
* Returns the transparency for a given raster layer.
|
|
4248
|
+
*
|
|
4249
|
+
* If the transparency is currently overridden (for example via `JMap.Map.setLayerTransparency`),
|
|
4250
|
+
* this overridden transparency is returned.
|
|
4251
|
+
*
|
|
4252
|
+
* Otherwise, transparencies are read from all associated style layers:
|
|
4253
|
+
* if they are all identical, that value is returned; if they differ, the lowest transparency value is returned.
|
|
4254
|
+
*
|
|
4255
|
+
* @deprecated Use {@link JMap.Map.getLayerTransparency} to read overridden transparency.
|
|
4256
|
+
* For non-overridden layers, use {@link JMap.Map.getRasterLayerInitialTransparency}.
|
|
4126
4257
|
*
|
|
4127
4258
|
* @throws Error if layer not found or not a raster layer
|
|
4128
4259
|
* @param layerId The JMap layer id
|
|
4129
4260
|
* @returns the current transparency value
|
|
4130
4261
|
* @example
|
|
4131
4262
|
* ```ts
|
|
4132
|
-
* // returns the transparency of raster layer id=
|
|
4133
|
-
* JMap.Map.getRasterLayerTransparency(
|
|
4263
|
+
* // returns the transparency of raster layer id="6a8b1f8c-3f0a-4d4b-9b8f-31a6ad8d11a2"
|
|
4264
|
+
* JMap.Map.getRasterLayerTransparency("6a8b1f8c-3f0a-4d4b-9b8f-31a6ad8d11a2")
|
|
4134
4265
|
* ```
|
|
4135
4266
|
*/
|
|
4136
4267
|
function getRasterLayerTransparency(layerId: JId): number
|
|
4137
4268
|
/**
|
|
4138
4269
|
* **JMap.Map.getRasterLayerInitialTransparency**
|
|
4139
4270
|
*
|
|
4140
|
-
*
|
|
4271
|
+
* Returns the initial transparency for a given raster layer.
|
|
4272
|
+
*
|
|
4273
|
+
* If many style layers/properties are present with different initial transparency values, the lowest transparency is returned.
|
|
4274
|
+
*
|
|
4275
|
+
* @deprecated This method is unreliable when style opacity is expression-based and will be removed in a future version.
|
|
4141
4276
|
*
|
|
4142
4277
|
* @throws Error if layer not found or not a raster layer
|
|
4143
4278
|
* @param layerId The JMap layer id
|
|
4144
4279
|
* @returns the initial transparency value
|
|
4145
4280
|
* @example
|
|
4146
4281
|
* ```ts
|
|
4147
|
-
* // returns the initial transparency of raster layer id=
|
|
4148
|
-
* JMap.Map.getRasterLayerInitialTransparency(
|
|
4282
|
+
* // returns the initial transparency of raster layer id="6a8b1f8c-3f0a-4d4b-9b8f-31a6ad8d11a2"
|
|
4283
|
+
* JMap.Map.getRasterLayerInitialTransparency("6a8b1f8c-3f0a-4d4b-9b8f-31a6ad8d11a2")
|
|
4149
4284
|
* ```
|
|
4150
4285
|
*/
|
|
4151
4286
|
function getRasterLayerInitialTransparency(layerId: JId): number
|
|
@@ -4154,16 +4289,50 @@ export namespace JMap {
|
|
|
4154
4289
|
*
|
|
4155
4290
|
* Sets the transparency for a given raster layer
|
|
4156
4291
|
*
|
|
4292
|
+
* @deprecated Use {@link JMap.Map.setLayerTransparency} instead. The replacement method manages all supported map layer types (vector and raster), not only raster layers.
|
|
4293
|
+
*
|
|
4157
4294
|
* @throws Error if layer is not found, not a raster layer or transparency is invalid
|
|
4158
4295
|
* @param layerId The JMap layer id
|
|
4159
4296
|
* @param transparency the new layer transparency between 0 and 1
|
|
4160
4297
|
* @example
|
|
4161
4298
|
* ```ts
|
|
4162
|
-
* // Make raster layer id=
|
|
4163
|
-
* JMap.Map.setRasterLayerTransparency(
|
|
4299
|
+
* // Make raster layer id="f2c9a34d-0d6f-4f98-bf6f-22e1e0f4bf7d" transparent
|
|
4300
|
+
* JMap.Map.setRasterLayerTransparency("f2c9a34d-0d6f-4f98-bf6f-22e1e0f4bf7d", 1)
|
|
4164
4301
|
* ```
|
|
4165
4302
|
*/
|
|
4166
4303
|
function setRasterLayerTransparency(layerId: JId, transparency: number): void
|
|
4304
|
+
/**
|
|
4305
|
+
* **JMap.Map.getLayerTransparency**
|
|
4306
|
+
*
|
|
4307
|
+
* Returns the currently overridden transparency value for a map layer (vector or raster).
|
|
4308
|
+
*
|
|
4309
|
+
* If the layer transparency is not currently overridden, returns `undefined`.
|
|
4310
|
+
*
|
|
4311
|
+
* @throws Error if layer is not found or not supported by map
|
|
4312
|
+
* @param layerId The JMap layer id
|
|
4313
|
+
* @returns The current overridden transparency value between 0 and 1, or `undefined` if not overridden
|
|
4314
|
+
* @example
|
|
4315
|
+
* ```ts
|
|
4316
|
+
* // returns undefined if no override is applied
|
|
4317
|
+
* const transparency = JMap.Map.getLayerTransparency("f2c9a34d-0d6f-4f98-bf6f-22e1e0f4bf7d")
|
|
4318
|
+
* ```
|
|
4319
|
+
*/
|
|
4320
|
+
function getLayerTransparency(layerId: JId): number | undefined
|
|
4321
|
+
/**
|
|
4322
|
+
* **JMap.Map.isLayerTransparencyOverridden**
|
|
4323
|
+
*
|
|
4324
|
+
* Returns true when a layer transparency is currently overridden, else false.
|
|
4325
|
+
*
|
|
4326
|
+
* @throws Error if layer is not found or not supported by map
|
|
4327
|
+
* @param layerId The JMap layer id
|
|
4328
|
+
* @example
|
|
4329
|
+
* ```ts
|
|
4330
|
+
* if (JMap.Map.isLayerTransparencyOverridden("f2c9a34d-0d6f-4f98-bf6f-22e1e0f4bf7d")) {
|
|
4331
|
+
* console.info("Layer transparency has been overridden")
|
|
4332
|
+
* }
|
|
4333
|
+
* ```
|
|
4334
|
+
*/
|
|
4335
|
+
function isLayerTransparencyOverridden(layerId: JId): boolean
|
|
4167
4336
|
/**
|
|
4168
4337
|
* ***JMap.Map.setPixelRatio***
|
|
4169
4338
|
*
|
|
@@ -4194,18 +4363,53 @@ export namespace JMap {
|
|
|
4194
4363
|
*
|
|
4195
4364
|
* Resets the raster layer transparency to its initial value as defined on the server
|
|
4196
4365
|
*
|
|
4366
|
+
* @deprecated Use {@link JMap.Map.resetLayerTransparency} instead. The replacement method manages all supported map layer types (vector and raster), not only raster layers.
|
|
4367
|
+
*
|
|
4197
4368
|
* @throws Error if layer is not found or not a raster layer
|
|
4198
4369
|
* @param layerId The JMap layer id
|
|
4199
4370
|
* @returns the initial transparency value
|
|
4200
4371
|
* @example
|
|
4201
4372
|
* ```ts
|
|
4202
|
-
* // Make raster layer id=
|
|
4203
|
-
* JMap.Map.setRasterLayerTransparency(
|
|
4373
|
+
* // Make raster layer id="f2c9a34d-0d6f-4f98-bf6f-22e1e0f4bf7d" transparent
|
|
4374
|
+
* JMap.Map.setRasterLayerTransparency("f2c9a34d-0d6f-4f98-bf6f-22e1e0f4bf7d", 1)
|
|
4204
4375
|
* // Reset to its initial opacity
|
|
4205
|
-
* JMap.Map.resetRasterLayerTransparency(
|
|
4376
|
+
* JMap.Map.resetRasterLayerTransparency("f2c9a34d-0d6f-4f98-bf6f-22e1e0f4bf7d")
|
|
4206
4377
|
* ```
|
|
4207
4378
|
*/
|
|
4208
4379
|
function resetRasterLayerTransparency(layerId: JId): number
|
|
4380
|
+
/**
|
|
4381
|
+
* **JMap.Map.setLayerTransparency**
|
|
4382
|
+
*
|
|
4383
|
+
* Sets the map transparency of a given JMap layer (vector or raster).
|
|
4384
|
+
*
|
|
4385
|
+
* This method applies the same transparency to all style layers associated to the specified JMap layer.
|
|
4386
|
+
*
|
|
4387
|
+
* @throws Error if layer is not found, not supported by map or transparency is invalid
|
|
4388
|
+
* @param layerId The JMap layer id
|
|
4389
|
+
* @param transparency The new transparency value between 0 and 1
|
|
4390
|
+
* @example
|
|
4391
|
+
* ```ts
|
|
4392
|
+
* // Make layer id="f2c9a34d-0d6f-4f98-bf6f-22e1e0f4bf7d" fully transparent
|
|
4393
|
+
* JMap.Map.setLayerTransparency("f2c9a34d-0d6f-4f98-bf6f-22e1e0f4bf7d", 1)
|
|
4394
|
+
* ```
|
|
4395
|
+
*/
|
|
4396
|
+
function setLayerTransparency(layerId: JId, transparency: number): void
|
|
4397
|
+
/**
|
|
4398
|
+
* **JMap.Map.resetLayerTransparency**
|
|
4399
|
+
*
|
|
4400
|
+
* Resets a layer map transparency to its initial style opacity values.
|
|
4401
|
+
*
|
|
4402
|
+
* This restores each style layer opacity property to the original values received from the map style.
|
|
4403
|
+
*
|
|
4404
|
+
* @throws Error if layer is not found or not supported by map
|
|
4405
|
+
* @param layerId The JMap layer id
|
|
4406
|
+
* @example
|
|
4407
|
+
* ```ts
|
|
4408
|
+
* JMap.Map.setLayerTransparency("f2c9a34d-0d6f-4f98-bf6f-22e1e0f4bf7d", 1)
|
|
4409
|
+
* JMap.Map.resetLayerTransparency("f2c9a34d-0d6f-4f98-bf6f-22e1e0f4bf7d")
|
|
4410
|
+
* ```
|
|
4411
|
+
*/
|
|
4412
|
+
function resetLayerTransparency(layerId: JId): void
|
|
4209
4413
|
/**
|
|
4210
4414
|
* **JMap.Map.Interaction**
|
|
4211
4415
|
*
|
|
@@ -6123,7 +6327,8 @@ export namespace JMap {
|
|
|
6123
6327
|
*
|
|
6124
6328
|
* @throws Error if bad credentials or server error.
|
|
6125
6329
|
* @param login The user's username (when using {@link JCoreOptions.legacyAuthentication})
|
|
6126
|
-
* @param password The user's password (when using {@link JCoreOptions.legacyAuthentication}
|
|
6330
|
+
* @param password The user's password (when using {@link JCoreOptions.legacyAuthentication})
|
|
6331
|
+
* @param connectionName Optional Auth0 database connection name to use for authentication flow.
|
|
6127
6332
|
* @example
|
|
6128
6333
|
* ```ts
|
|
6129
6334
|
* const userLogin = "jdo@mycompany.com"
|
|
@@ -6140,7 +6345,7 @@ export namespace JMap {
|
|
|
6140
6345
|
* })
|
|
6141
6346
|
* ```
|
|
6142
6347
|
*/
|
|
6143
|
-
function login(login?: string, password?: string): Promise<void> | Promise<JSessionData>
|
|
6348
|
+
function login(login?: string, password?: string, connectionName?: string): Promise<void> | Promise<JSessionData>
|
|
6144
6349
|
/**
|
|
6145
6350
|
* **JMap.User.loginIntoOrganization**
|
|
6146
6351
|
*
|
|
@@ -8280,7 +8485,12 @@ export namespace JMap {
|
|
|
8280
8485
|
/**
|
|
8281
8486
|
* ***JMap.Event.Map.on.mapLoad***
|
|
8282
8487
|
*
|
|
8283
|
-
* This event is triggered when the map is created and ready.
|
|
8488
|
+
* This event is triggered when the map is created and ready. It fires after the
|
|
8489
|
+
* map's first idle, when both the basemap style is parseable AND project layers
|
|
8490
|
+
* (if any) have been added. Subscribers may safely query layer-related map state.
|
|
8491
|
+
*
|
|
8492
|
+
* For "basemap visible" timing (e.g. to remove a boot spinner before project layers
|
|
8493
|
+
* finish loading), read the `isStyleLoaded` flag on the map redux state instead.
|
|
8284
8494
|
*
|
|
8285
8495
|
* @param listenerId Your listener id (must be unique for all map events)
|
|
8286
8496
|
* @param fn Your listener function
|
|
@@ -9648,33 +9858,28 @@ export namespace JMap {
|
|
|
9648
9858
|
/**
|
|
9649
9859
|
* ***JMap.Attachment.previewAttachments***
|
|
9650
9860
|
*
|
|
9651
|
-
* Opens a client-side preview modal for
|
|
9861
|
+
* Opens a client-side preview modal for a feature's image attachments.
|
|
9652
9862
|
*
|
|
9653
|
-
* The
|
|
9863
|
+
* The viewer fetches the feature's attachments itself, filters to image attachments, and orders them
|
|
9864
|
+
* the same way the mouseover popup does (subjects sorted alphabetically, then images within each subject
|
|
9865
|
+
* sorted by name). When more than one image is available, the viewer shows prev/next arrows, a position
|
|
9866
|
+
* counter, and supports arrow-key navigation. Standard images and 360° panoramas are supported.
|
|
9654
9867
|
*
|
|
9655
|
-
* @param
|
|
9868
|
+
* @param attachmentId the id of the attachment to display first
|
|
9656
9869
|
* @param dataSourceId the JMap data source id
|
|
9657
9870
|
* @param dataSourceOrganizationId the id of the organization to which the data source belongs
|
|
9871
|
+
* @param itemId the id of the feature/item whose attachments should be loaded
|
|
9658
9872
|
* @example
|
|
9659
9873
|
* ```ts
|
|
9660
|
-
* JMap.Attachment
|
|
9661
|
-
*
|
|
9662
|
-
*
|
|
9663
|
-
*
|
|
9664
|
-
*
|
|
9665
|
-
*
|
|
9666
|
-
* fileId: "d9428888-122b-11e1-b85c-61cd3cbb3210",
|
|
9667
|
-
* fileName: "panorama.jpg",
|
|
9668
|
-
* fileSize: 8675309,
|
|
9669
|
-
* mimeType: "image/jpeg"
|
|
9670
|
-
* },
|
|
9671
|
-
* "f47ac10b-58cc-4372-a567-0e02b2c3d479"
|
|
9672
|
-
* )
|
|
9673
|
-
* .then(() => console.log("Preview opened"))
|
|
9674
|
-
* .catch(error => console.error("Preview failed", error))
|
|
9874
|
+
* JMap.Attachment.previewAttachments(
|
|
9875
|
+
* "c56a4180-65aa-42ec-a945-5fd21dec0538",
|
|
9876
|
+
* "f47ac10b-58cc-4372-a567-0e02b2c3d479",
|
|
9877
|
+
* "9b2c4180-65aa-42ec-a945-5fd21dec0538",
|
|
9878
|
+
* "feature-123"
|
|
9879
|
+
* )
|
|
9675
9880
|
* ```
|
|
9676
9881
|
*/
|
|
9677
|
-
function previewAttachments(
|
|
9882
|
+
function previewAttachments(attachmentId: string, dataSourceId: string, dataSourceOrganizationId: string, itemId: JId): void
|
|
9678
9883
|
}
|
|
9679
9884
|
/**
|
|
9680
9885
|
* **JMap.DataSource**
|
|
@@ -12106,20 +12311,12 @@ export namespace JMap {
|
|
|
12106
12311
|
/**
|
|
12107
12312
|
* **JMap.UI.setMainLayoutVisibility**
|
|
12108
12313
|
*
|
|
12109
|
-
*
|
|
12110
|
-
*
|
|
12111
|
-
*
|
|
12314
|
+
* @deprecated This method has no effect. Control the shell with the `ui` startup option
|
|
12315
|
+
* (`"full"` | `"minimal"`) or the `?ngUi=` URL parameter instead. The function is kept
|
|
12316
|
+
* for source compatibility and will be removed in a future major version.
|
|
12112
12317
|
*
|
|
12113
12318
|
* @throws if isVisible is not boolean value
|
|
12114
|
-
* @param isVisible
|
|
12115
|
-
* @example
|
|
12116
|
-
* ```ts
|
|
12117
|
-
* // display main layout
|
|
12118
|
-
* JMap.UI.setMainLayoutVisibility(true)
|
|
12119
|
-
*
|
|
12120
|
-
* // hide main layout
|
|
12121
|
-
* JMap.UI.setMainLayoutVisibility(false)
|
|
12122
|
-
* ```
|
|
12319
|
+
* @param isVisible ignored
|
|
12123
12320
|
*/
|
|
12124
12321
|
function setMainLayoutVisibility(isVisible: boolean): void
|
|
12125
12322
|
/**
|
|
@@ -17,6 +17,7 @@ import type * as layer from "./jmap/layer"
|
|
|
17
17
|
import type * as main from "./jmap/main"
|
|
18
18
|
import type * as mapcontext from "./jmap/map-context"
|
|
19
19
|
import type * as map from "./jmap/map"
|
|
20
|
+
import type * as message from "./jmap/message"
|
|
20
21
|
import type * as mouseover from "./jmap/mouseover"
|
|
21
22
|
import type * as photos from "./jmap/photos"
|
|
22
23
|
import type * as project from "./jmap/project"
|
|
@@ -357,6 +358,16 @@ declare global {
|
|
|
357
358
|
/** @internal */ type JZoomOptions = map.JZoomOptions
|
|
358
359
|
/** @internal */ type JPanAndZoomOptions = map.JPanAndZoomOptions
|
|
359
360
|
/** @internal */ type JCoreMapOptions = map.JCoreMapOptions
|
|
361
|
+
/** @internal */ type JAPP_MESSAGE_SEVERITIES = message.JAPP_MESSAGE_SEVERITIES
|
|
362
|
+
/** @internal */ const JAPP_MESSAGE_SEVERITIES: typeof message.JAPP_MESSAGE_SEVERITIES
|
|
363
|
+
/** @internal */ type MESSAGE_ACTION_TYPES = message.MESSAGE_ACTION_TYPES
|
|
364
|
+
/** @internal */ const MESSAGE_ACTION_TYPES: typeof message.MESSAGE_ACTION_TYPES
|
|
365
|
+
/** @internal */ type JAppMessage = message.JAppMessage
|
|
366
|
+
/** @internal */ type JAppOverlayMessage = message.JAppOverlayMessage
|
|
367
|
+
/** @internal */ type JAppConfirmMessage = message.JAppConfirmMessage
|
|
368
|
+
/** @internal */ type JAppMessageOptions = message.JAppMessageOptions
|
|
369
|
+
/** @internal */ type JAppMessageState = message.JAppMessageState
|
|
370
|
+
/** @internal */ type JAppMessageService = message.JAppMessageService
|
|
360
371
|
/** @internal */ type JMapMouseOver = mouseover.JMapMouseOver
|
|
361
372
|
/** @internal */ type JMouseOverContent = mouseover.JMouseOverContent
|
|
362
373
|
/** @internal */ type JMouseOverOpenPopupParams = mouseover.JMouseOverOpenPopupParams
|
|
@@ -423,6 +434,7 @@ declare global {
|
|
|
423
434
|
/** @internal */ type JUserEventSessionChangedParams = user.JUserEventSessionChangedParams
|
|
424
435
|
/** @internal */ type JTokenInfo = user.JTokenInfo
|
|
425
436
|
/** @internal */ type JSessionData = user.JSessionData
|
|
437
|
+
/** @internal */ type JIdentity = user.JIdentity
|
|
426
438
|
/** @internal */ type JUser = user.JUser
|
|
427
439
|
/** @internal */ type JUserInfo = user.JUserInfo
|
|
428
440
|
/** @internal */ type JOrganizationInfo = user.JOrganizationInfo
|
|
@@ -449,4 +461,7 @@ declare global {
|
|
|
449
461
|
/** @internal */ type JUserViewPermissionType = user.JUserViewPermissionType
|
|
450
462
|
/** @internal */ type JUserResourcePermissionParams = user.JUserResourcePermissionParams
|
|
451
463
|
/** @internal */ type JUserResourcePermissionsResponse = user.JUserResourcePermissionsResponse
|
|
464
|
+
/** @internal */ type USER_ACTION_TYPES = user.USER_ACTION_TYPES
|
|
465
|
+
/** @internal */ const USER_ACTION_TYPES: typeof user.USER_ACTION_TYPES
|
|
466
|
+
/** @internal */ type JAppUserAction = user.JAppUserAction
|
|
452
467
|
}
|
|
@@ -1,36 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
import type {
|
|
2
|
+
AttachmentBaseDTO,
|
|
3
|
+
AttachmentDTO,
|
|
4
|
+
AttachmentFileDTO,
|
|
5
|
+
AttachmentUrlDTO,
|
|
6
|
+
CreateAttachmentFileParams,
|
|
7
|
+
CreateAttachmentParams,
|
|
8
|
+
CreateAttachmentUrlParams,
|
|
9
|
+
UpdateAttachmentParams
|
|
10
|
+
} from "jmapcloud-types"
|
|
10
11
|
|
|
11
|
-
export
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
export
|
|
19
|
-
url: string
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
export type JAttachment = JAttachmentUrl | JAttachmentFile
|
|
23
|
-
|
|
24
|
-
export type JCreateAttachmentUrlParams = {
|
|
25
|
-
itemId: number
|
|
26
|
-
} & Pick<JAttachmentUrl, "subject" | "description" | "url">
|
|
27
|
-
|
|
28
|
-
export type JCreateAttachmentFileParams = {
|
|
29
|
-
itemId: number
|
|
30
|
-
} & Pick<JAttachmentFile, "subject" | "description"> & {
|
|
31
|
-
file: File
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
export type JCreateAttachmentParams = JCreateAttachmentFileParams | JCreateAttachmentUrlParams
|
|
35
|
-
|
|
36
|
-
export type JUpdateAttachmentParams = Partial<Pick<JAttachmentUrl, "subject" | "description" | "url"> | Pick<JAttachmentFile, "subject" | "description">>
|
|
12
|
+
export type JAttachmentBase = AttachmentBaseDTO
|
|
13
|
+
export type JAttachmentFile = AttachmentFileDTO
|
|
14
|
+
export type JAttachmentUrl = AttachmentUrlDTO
|
|
15
|
+
export type JAttachment = AttachmentDTO
|
|
16
|
+
export type JCreateAttachmentUrlParams = CreateAttachmentUrlParams
|
|
17
|
+
export type JCreateAttachmentFileParams = CreateAttachmentFileParams
|
|
18
|
+
export type JCreateAttachmentParams = CreateAttachmentParams
|
|
19
|
+
export type JUpdateAttachmentParams = UpdateAttachmentParams
|
|
@@ -9,7 +9,10 @@ export interface JDataSourceDataParams {
|
|
|
9
9
|
startIndex?: number
|
|
10
10
|
limit?: number
|
|
11
11
|
filter?: string
|
|
12
|
+
// Tabular data source rows: SQL-style "FIELD ASC, FIELD2 DESC".
|
|
12
13
|
sort?: string
|
|
14
|
+
// OGC API Features (collections/items): property names with `-` prefix for descending, e.g. ["property1", "-property2"].
|
|
15
|
+
sortBy?: string[]
|
|
13
16
|
attributes?: string[]
|
|
14
17
|
}
|
|
15
18
|
|
package/public/jmap/layer.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { JAnyFilterCondition, JAttribute, JDynamicFilterGraphQL } from "jmapcloud-types"
|
|
1
|
+
import type { JAnyFilterCondition, JAttribute, JDynamicFilterGraphQL, UserMetadata } from "jmapcloud-types"
|
|
2
2
|
import type { JFORM_TYPES } from "./form.d.ts"
|
|
3
3
|
import type { JBoundaryBox } from "./geometry.d.ts"
|
|
4
4
|
import type { JId } from "./main.d.ts"
|
|
@@ -302,6 +302,7 @@ export interface JLayer extends JLayerTreeElement {
|
|
|
302
302
|
useClientCache: boolean
|
|
303
303
|
defaultMetadatas: JLayerMetadata[]
|
|
304
304
|
metadataSections: JLayerMetadataSection[]
|
|
305
|
+
userMetadata: UserMetadata<string>[]
|
|
305
306
|
attributes: JLayerAttribute[]
|
|
306
307
|
JMCAttributes: JAttribute[]
|
|
307
308
|
mouseOver: JMapMouseOver
|
|
@@ -67,6 +67,7 @@ export interface JMapContextDataLayer extends JMapContextDataLayerElement {
|
|
|
67
67
|
// TODO JMAP8-3266 : replace this with new dynamic filters
|
|
68
68
|
dynamicFilterConditions: JDynamicFilterCondition[]
|
|
69
69
|
dynamicFilterIsActive: boolean
|
|
70
|
+
// Defined only when layer transparency has been explicitly overridden
|
|
70
71
|
transparency?: number
|
|
71
72
|
}
|
|
72
73
|
|
package/public/jmap/map.d.ts
CHANGED
|
@@ -466,6 +466,29 @@ export interface JCoreMapOptions {
|
|
|
466
466
|
* ```
|
|
467
467
|
*/
|
|
468
468
|
terrainControlVisible?: boolean
|
|
469
|
+
/**
|
|
470
|
+
* By default the Initial Extent control is visible.
|
|
471
|
+
*
|
|
472
|
+
* But if ***initialExtentControlVisible*** is false, it will be hidden on the map.
|
|
473
|
+
*
|
|
474
|
+
* ```html
|
|
475
|
+
* <html>
|
|
476
|
+
* ...
|
|
477
|
+
* <body>
|
|
478
|
+
* <script type="text/javascript">
|
|
479
|
+
* window.JMAP_OPTIONS = {
|
|
480
|
+
* ...
|
|
481
|
+
* map: {
|
|
482
|
+
* initialExtentControlVisible: false,
|
|
483
|
+
* }
|
|
484
|
+
* }
|
|
485
|
+
* </script>
|
|
486
|
+
* ...
|
|
487
|
+
* </body>
|
|
488
|
+
* </html>
|
|
489
|
+
* ```
|
|
490
|
+
*/
|
|
491
|
+
initialExtentControlVisible?: boolean
|
|
469
492
|
/**
|
|
470
493
|
* You can choose the position of the scale control on the map.
|
|
471
494
|
*
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import type { JLOCALES } from "./language.d.ts"
|
|
2
|
+
export {}
|
|
3
|
+
|
|
4
|
+
// ALL_APP_MESSAGE_SEVERITIES in all-enums.ts
|
|
5
|
+
export enum JAPP_MESSAGE_SEVERITIES {
|
|
6
|
+
SUCCESS = "success",
|
|
7
|
+
INFO = "info",
|
|
8
|
+
WARNING = "warning",
|
|
9
|
+
ERROR = "error"
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
// Cross-bundle action-type contract. NG dispatches actions whose `type` matches
|
|
13
|
+
// these strings, and ng-core's reducer reads them via its local ACTIONS enum.
|
|
14
|
+
// The string values must stay in sync with ng-core/src/core/store/actions.ts.
|
|
15
|
+
export enum MESSAGE_ACTION_TYPES {
|
|
16
|
+
ADD_MESSAGE = "APP_MESSAGE_ADD_MESSAGE",
|
|
17
|
+
SET_MESSAGE_EXPIRED = "APP_MESSAGE_SET_MESSAGE_EXPIRED",
|
|
18
|
+
SET_CONFIRM_MESSAGE = "APP_MESSAGE_SET_CONFIRM_MESSAGE",
|
|
19
|
+
ADD_OVERLAY_MESSAGE = "APP_MESSAGE_ADD_OVERLAY_MESSAGE",
|
|
20
|
+
DELETE_OVERLAY_MESSAGES = "APP_MESSAGE_DELETE_OVERLAY_MESSAGES"
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export interface JAppMessage {
|
|
24
|
+
id: string
|
|
25
|
+
text: string
|
|
26
|
+
severity: JAPP_MESSAGE_SEVERITIES
|
|
27
|
+
expired: boolean
|
|
28
|
+
duration: number | null
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export interface JAppOverlayMessage {
|
|
32
|
+
id: string
|
|
33
|
+
text: string
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export interface JAppConfirmMessage {
|
|
37
|
+
message: string
|
|
38
|
+
title: string
|
|
39
|
+
isInputMessage?: boolean
|
|
40
|
+
isInputOptional?: boolean
|
|
41
|
+
inputPlaceholder?: string
|
|
42
|
+
confirmButtonLabel?: string
|
|
43
|
+
cancelButtonLabel?: string
|
|
44
|
+
locale?: JLOCALES
|
|
45
|
+
onSuccess: (input: string) => any
|
|
46
|
+
onCancel?: () => any
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export interface JAppMessageOptions {
|
|
50
|
+
severity?: JAPP_MESSAGE_SEVERITIES
|
|
51
|
+
duration?: number | null
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export interface JAppMessageState {
|
|
55
|
+
messages: JAppMessage[]
|
|
56
|
+
overlayMessages: JAppOverlayMessage[]
|
|
57
|
+
confirmMessage: JAppConfirmMessage | undefined
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export interface JAppMessageService {
|
|
61
|
+
error(message: string, options?: JAppMessageOptions): void
|
|
62
|
+
warning(message: string, options?: JAppMessageOptions): void
|
|
63
|
+
info(message: string, options?: JAppMessageOptions): void
|
|
64
|
+
success(message: string, options?: JAppMessageOptions): void
|
|
65
|
+
confirmMessage(params: JAppConfirmMessage): void
|
|
66
|
+
display(message: string, options?: JAppMessageOptions): void
|
|
67
|
+
displayWaitingOverlay(message: string): string
|
|
68
|
+
closeWaitingOverlay(messageId?: string): void
|
|
69
|
+
}
|
|
@@ -496,14 +496,35 @@ export interface JCoreOptions {
|
|
|
496
496
|
*/
|
|
497
497
|
extensionsUrlOverride?: JExtensionServerOverride[]
|
|
498
498
|
/**
|
|
499
|
-
*
|
|
500
|
-
*
|
|
501
|
-
*
|
|
502
|
-
* - a project selection panel
|
|
499
|
+
* @deprecated Has no effect and is ignored at runtime. Control the shell with the `ui`
|
|
500
|
+
* startup option (`"full"` | `"minimal"`) or the `?ngUi=` URL parameter instead. Kept
|
|
501
|
+
* for source compatibility and will be removed in a future major version.
|
|
503
502
|
*
|
|
504
|
-
*
|
|
505
|
-
*
|
|
506
|
-
* For example NG don't need NG Core minimal UI and use this option.
|
|
503
|
+
* Previously: setting this to `true` suppressed NG Core's built-in main layout
|
|
504
|
+
* (loader, login panel, project selection panel).
|
|
507
505
|
*/
|
|
508
506
|
hideMainLayout?: boolean
|
|
507
|
+
/**
|
|
508
|
+
* Selects which UI shell ng renders on top of the always-loaded core map.
|
|
509
|
+
*
|
|
510
|
+
* - `"full"` (default) loads the full NG side-panel UI as a lazy chunk.
|
|
511
|
+
* - `"minimal"` boots only the core map and skips the full-UI chunk entirely.
|
|
512
|
+
*
|
|
513
|
+
* Equivalent to the `?ngUi=full|minimal` URL parameter (also accepted as `#ngUi=…`); this
|
|
514
|
+
* option wins when both are set.
|
|
515
|
+
*/
|
|
516
|
+
ui?: "full" | "minimal"
|
|
517
|
+
/**
|
|
518
|
+
* Test-only: pin the AppShell to a specific boot stage so containment / visual specs
|
|
519
|
+
* can drive every pre-app surface deterministically without sequencing a real boot.
|
|
520
|
+
*
|
|
521
|
+
* Accepted values: `"connecting" | "login" | "orgs" | "projects" | "openingProject" |
|
|
522
|
+
* "chunkError" | "error.serverInfo" | "error.anonymousLogin"`.
|
|
523
|
+
*
|
|
524
|
+
* Also accepts a `?__bootStage=<stage>` URL query parameter (useful for iframe
|
|
525
|
+
* scenarios where `JMAP_OPTIONS` is set inside the framed document). This is
|
|
526
|
+
* wired up exclusively for the rendering-tests harness; do not set it in any
|
|
527
|
+
* production boot.
|
|
528
|
+
*/
|
|
529
|
+
testBootStageOverride?: string
|
|
509
530
|
}
|
package/public/jmap/user.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { JTranslationItem } from "./language.d.ts"
|
|
1
2
|
import type { JProjectServerExtension } from "./project.d.ts"
|
|
2
3
|
export {}
|
|
3
4
|
// ALL_LOGIN_STATUS in all-enum.ts
|
|
@@ -56,9 +57,12 @@ export interface JTokenInfo {
|
|
|
56
57
|
export interface JSessionData extends JUser, JTokenInfo {
|
|
57
58
|
/**
|
|
58
59
|
* The user permission to change his password
|
|
59
|
-
* @deprecated
|
|
60
60
|
*/
|
|
61
61
|
changePasswordAllowed: boolean
|
|
62
|
+
/**
|
|
63
|
+
* The user permission to change his full name.
|
|
64
|
+
*/
|
|
65
|
+
changeFullNameAllowed: boolean
|
|
62
66
|
/**
|
|
63
67
|
* Infos about the user's organizations.
|
|
64
68
|
*/
|
|
@@ -69,11 +73,20 @@ export interface JSessionData extends JUser, JTokenInfo {
|
|
|
69
73
|
currentOrganization: JOrganization
|
|
70
74
|
}
|
|
71
75
|
|
|
76
|
+
export interface JIdentity {
|
|
77
|
+
name: string
|
|
78
|
+
auth0UserId: string
|
|
79
|
+
connection: string
|
|
80
|
+
provider: string
|
|
81
|
+
isPrimary: boolean
|
|
82
|
+
}
|
|
83
|
+
|
|
72
84
|
export interface JUser {
|
|
73
85
|
name: string
|
|
74
86
|
email: string
|
|
75
87
|
organizationInfos: JOrganizationInfo[]
|
|
76
88
|
roles: ROLES[]
|
|
89
|
+
identities?: JIdentity[]
|
|
77
90
|
}
|
|
78
91
|
|
|
79
92
|
export interface JUserInfo {
|
|
@@ -176,3 +189,24 @@ export interface JUserResourcePermissionsResponse {
|
|
|
176
189
|
permissions: JUserResourcePermissionType[]
|
|
177
190
|
principal: string
|
|
178
191
|
}
|
|
192
|
+
|
|
193
|
+
// Cross-bundle action-type contract for the user-actions slice. NG dispatches
|
|
194
|
+
// actions tagged with these strings; ng-core's reducer reads them via its
|
|
195
|
+
// local ACTIONS enum. The string values must stay in sync with
|
|
196
|
+
// ng-core/src/core/store/actions.ts.
|
|
197
|
+
export enum USER_ACTION_TYPES {
|
|
198
|
+
SET_ACTIONS = "APP_USER_SET_ACTIONS"
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
export interface JAppUserAction {
|
|
202
|
+
id: string
|
|
203
|
+
label: string | JTranslationItem
|
|
204
|
+
/**
|
|
205
|
+
* must be a fontawsome IconDefinition or a valid <img> src (url or base64 data)
|
|
206
|
+
*/
|
|
207
|
+
icon: import("@fortawesome/fontawesome-svg-core").IconDefinition | string
|
|
208
|
+
isHelp?: boolean
|
|
209
|
+
href?: string
|
|
210
|
+
disabled?: boolean
|
|
211
|
+
onClick?: import("react").MouseEventHandler<HTMLLIElement>
|
|
212
|
+
}
|
package/public/state.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ import type { JGeocodingResult } from "./jmap/geocoding.d.ts"
|
|
|
3
3
|
import type { JBoundaryBox, JLocation } from "./jmap/geometry.d.ts"
|
|
4
4
|
import type { JLOCALES } from "./jmap/language.d.ts"
|
|
5
5
|
import type { JLayerMetadataSchemaItem, JLayerStyleSamplesById, JLayerTree, JLayerTreeElement } from "./jmap/layer.d.ts"
|
|
6
|
+
import type { JAppMessageState } from "./jmap/message.d.ts"
|
|
6
7
|
import type { JId } from "./jmap/main.d.ts"
|
|
7
8
|
import type { JMAP_CONTEXT_SORT_BY_DIRECTIONS, JMAP_CONTEXT_SORT_BY_OPTIONS, JMAP_CONTEXT_TABS, JMapContext } from "./jmap/map-context.d.ts"
|
|
8
9
|
import type { JBasemap, JMAP_DISTANCE_UNITS, JMAP_MODIFICATION_TYPES, JMAP_POSITIONS, JMapAttribution, JMapNavigationStep, JMapSelection, JProjection, JZoomOptions } from "./jmap/map.d.ts"
|
|
@@ -11,7 +12,7 @@ import type { JSERVER_IDENTITY_PROVIDER_TYPES, JServerInfo } from "./jmap/server
|
|
|
11
12
|
import type { JSimpleSearchResult } from "./jmap/simple-search.d.ts"
|
|
12
13
|
import type { JTable } from "./jmap/table.d.ts"
|
|
13
14
|
import type { JIFramePopup } from "./jmap/ui.d.ts"
|
|
14
|
-
import type { JOrganization, JOrganizationInfo, JTokenInfo, JUser, JUserInfo, LOGIN_STATUS } from "./jmap/user.d.ts"
|
|
15
|
+
import type { JAppUserAction, JOrganization, JOrganizationInfo, JTokenInfo, JUser, JUserInfo, LOGIN_STATUS } from "./jmap/user.d.ts"
|
|
15
16
|
export {}
|
|
16
17
|
|
|
17
18
|
export interface JCoreState {
|
|
@@ -28,12 +29,19 @@ export interface JCoreState {
|
|
|
28
29
|
server: JServerState
|
|
29
30
|
mapContext: JMapContextState
|
|
30
31
|
ui: JUIState
|
|
32
|
+
message: JAppMessageState
|
|
31
33
|
external?: any
|
|
32
34
|
}
|
|
33
35
|
|
|
34
36
|
export interface JUIState {
|
|
37
|
+
/**
|
|
38
|
+
* @deprecated No longer drives rendering and is always `true`. The shell is selected
|
|
39
|
+
* by the `ui` startup option (`"full"` | `"minimal"`) or `?ngUi=`. Kept for source
|
|
40
|
+
* compatibility; will be removed in a future major version.
|
|
41
|
+
*/
|
|
35
42
|
isMainLayoutVisible: boolean
|
|
36
43
|
iframePopup: JIFramePopup
|
|
44
|
+
chunkLoadError: boolean
|
|
37
45
|
}
|
|
38
46
|
|
|
39
47
|
export interface JMapContextState {
|
|
@@ -95,6 +103,7 @@ export interface JMapState {
|
|
|
95
103
|
rotation: number
|
|
96
104
|
bearing: number
|
|
97
105
|
isLoaded: boolean
|
|
106
|
+
isStyleLoaded: boolean
|
|
98
107
|
hasFirstLoaded: boolean
|
|
99
108
|
hasLoadingError: boolean
|
|
100
109
|
navigationHistory: JMapNavigationStep[]
|
|
@@ -112,6 +121,7 @@ export interface JMapState {
|
|
|
112
121
|
isTerrainAvailable: boolean
|
|
113
122
|
isTerrainActive: boolean
|
|
114
123
|
isScaleControlVisible: boolean
|
|
124
|
+
isInitialExtentControlVisible: boolean
|
|
115
125
|
isMapRotationControlVisible: boolean
|
|
116
126
|
isTerrainControlVisible: boolean
|
|
117
127
|
isMapInfoControlVisible: boolean
|
|
@@ -121,7 +131,7 @@ export interface JMapState {
|
|
|
121
131
|
containerHeight: number
|
|
122
132
|
modificationType: JMAP_MODIFICATION_TYPES
|
|
123
133
|
attributions: JMapAttribution[]
|
|
124
|
-
|
|
134
|
+
overriddenTransparencyByLayerId: { [id: JId]: number }
|
|
125
135
|
projection: JProjection
|
|
126
136
|
}
|
|
127
137
|
|
|
@@ -131,6 +141,11 @@ export interface JProjectState {
|
|
|
131
141
|
allProjects: JProject[]
|
|
132
142
|
selectedProject: JProject
|
|
133
143
|
disableProjectChange: boolean
|
|
144
|
+
// True iff a specific project target was requested at boot (URL hash,
|
|
145
|
+
// JMAP_OPTIONS, or remembered storage), or the user clicked one in the list.
|
|
146
|
+
// Drives the boot state machine to render `openingProject` (minimal spinner)
|
|
147
|
+
// instead of briefly flashing the project list.
|
|
148
|
+
hasRequestedTarget: boolean
|
|
134
149
|
}
|
|
135
150
|
|
|
136
151
|
export interface JLayerState {
|
|
@@ -162,10 +177,12 @@ export interface JUserState extends JTokenInfo {
|
|
|
162
177
|
organizationInfos: JOrganizationInfo[]
|
|
163
178
|
informations: JUserInfo[]
|
|
164
179
|
changePasswordAllowed: boolean
|
|
180
|
+
changeFullNameAllowed: boolean
|
|
165
181
|
identityProviderType: JSERVER_IDENTITY_PROVIDER_TYPES
|
|
166
182
|
loginStatus: LOGIN_STATUS
|
|
167
183
|
loginStatusDetailTranslationKey: string
|
|
168
184
|
callbackAtTokenRefresh: (() => void) | null
|
|
185
|
+
actions: JAppUserAction[]
|
|
169
186
|
}
|
|
170
187
|
|
|
171
188
|
export interface JLanguageState {
|