jmapcloud-ng-types 0.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/.prettierrc +10 -0
- package/README.md +7 -0
- package/all-enums.ts +97 -0
- package/index.ts +434 -0
- package/package.json +29 -0
- package/public/annotation.d.ts +16 -0
- package/public/app.d.ts +3407 -0
- package/public/draw.d.ts +53 -0
- package/public/extension.d.ts +77 -0
- package/public/form.d.ts +24 -0
- package/public/geometry.d.ts +10 -0
- package/public/layer.d.ts +88 -0
- package/public/map-context.d.ts +5 -0
- package/public/measure.d.ts +25 -0
- package/public/message.d.ts +38 -0
- package/public/panel.d.ts +24 -0
- package/public/print.d.ts +27 -0
- package/public/selection.d.ts +6 -0
- package/public/startup-options.d.ts +302 -0
- package/public/ui.d.ts +7 -0
- package/public/user.d.ts +9 -0
package/public/draw.d.ts
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
// ALL_APP_DRAW_TYPES in all-enum.ts
|
|
2
|
+
declare const enum JAPP_DRAW_TYPES {
|
|
3
|
+
POINT = "point",
|
|
4
|
+
POLYGON = "polygon",
|
|
5
|
+
LINE_STRING = "line_string",
|
|
6
|
+
RECTANGLE = "rectangle",
|
|
7
|
+
CIRCLE = "circle",
|
|
8
|
+
TEXT = "text"
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
// ALL_APP_DRAW_MODES in all-enum.ts
|
|
12
|
+
declare const enum JAPP_DRAW_MODES {
|
|
13
|
+
DRAW = "draw",
|
|
14
|
+
SELECT = "select",
|
|
15
|
+
DELETE = "delete"
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
declare type JAppDrawFeaturesFn = (features: JAppDrawFeature[]) => void
|
|
19
|
+
|
|
20
|
+
declare interface JAppDrawFeature extends GeoJSON.Feature {
|
|
21
|
+
id: string
|
|
22
|
+
properties: JAppDrawStyle
|
|
23
|
+
coordinates: JPoint[]
|
|
24
|
+
addCoordinate: (path?: string | number, lng?: number, lat?: number) => void
|
|
25
|
+
isValid: () => boolean
|
|
26
|
+
updateCoordinate: (path?: string | number, lng?: number, lat?: number) => void
|
|
27
|
+
toGeoJSON: () => GeoJSON.Feature
|
|
28
|
+
removeCoordinate: (path: string | number) => void
|
|
29
|
+
incomingCoords(coords: JPoint[][]): void
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
declare interface JAppDrawStyle extends Partial<JAppDrawTextStyle> {
|
|
33
|
+
fillColor?: string
|
|
34
|
+
fillOpacity?: number
|
|
35
|
+
lineColor?: string
|
|
36
|
+
lineOpacity?: number
|
|
37
|
+
lineWidth?: number
|
|
38
|
+
shapeType?: string
|
|
39
|
+
radiusInKm?: number
|
|
40
|
+
pointRadiusStrokeInactive?: number
|
|
41
|
+
pointRadiusActive?: number
|
|
42
|
+
pointRadiusStrokeActive?: number
|
|
43
|
+
pointRadiusInactive?: number
|
|
44
|
+
center?: number[]
|
|
45
|
+
useLocationIcon?: boolean
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
declare interface JAppDrawTextStyle {
|
|
49
|
+
textSize: number
|
|
50
|
+
textColor: string
|
|
51
|
+
textRotation: number
|
|
52
|
+
textZoomRef?: number
|
|
53
|
+
}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* You can create a custom application panel throught the app extension mecanism.
|
|
3
|
+
*
|
|
4
|
+
* It offers a way to add your own panel, map interactor, redux store data, etc ...
|
|
5
|
+
*
|
|
6
|
+
* This way you can fully customize your JMap Cloud NG with your own code, written with your favourite dev tools.
|
|
7
|
+
*/
|
|
8
|
+
declare interface JAppExtension extends JCoreExtension {
|
|
9
|
+
/**
|
|
10
|
+
* The panel creation method.
|
|
11
|
+
*
|
|
12
|
+
* This is where you have to :
|
|
13
|
+
* - Create your panel UI
|
|
14
|
+
* - Add your listeners (like Redux subscribe)
|
|
15
|
+
* - ect ...
|
|
16
|
+
*
|
|
17
|
+
* This method is called each time the panel is :
|
|
18
|
+
* - Created : after a panel change
|
|
19
|
+
* - Displayed : after the panel is displayed after been hidden
|
|
20
|
+
*
|
|
21
|
+
* @param panelContainerId The html container id where you can insert your application.
|
|
22
|
+
*/
|
|
23
|
+
onPanelCreation: (panelContainerId: string) => void
|
|
24
|
+
/**
|
|
25
|
+
* The panel destroy method.
|
|
26
|
+
*
|
|
27
|
+
* This is where you have to :
|
|
28
|
+
* - Destroy the panel UI (if not yet done).
|
|
29
|
+
* - Remove your listeners (like Redux unsubscribe)
|
|
30
|
+
* - etc ...
|
|
31
|
+
*
|
|
32
|
+
* This method is called each time the panel is :
|
|
33
|
+
* - Destroyed : after a panel change (panelContainerId div doesn't exist when called)
|
|
34
|
+
* - Hidden : when the panel is hidden (panelContainerId div still exist when called)
|
|
35
|
+
*
|
|
36
|
+
* @param panelContainerId The html container id where you can insert your application.
|
|
37
|
+
*/
|
|
38
|
+
onPanelDestroy?: (panelContainerId: string) => void
|
|
39
|
+
/**
|
|
40
|
+
* The panel icon.
|
|
41
|
+
*
|
|
42
|
+
* An url (png, jpeg, svg, etc ...), a base 64 string or an svg tag as a string, as you like.
|
|
43
|
+
* For an svg string a viewbox need to be specified for the icon to appear,
|
|
44
|
+
* if no fill attribute is specified, the icon will follow the app theme.
|
|
45
|
+
*/
|
|
46
|
+
panelIcon?: string
|
|
47
|
+
/**
|
|
48
|
+
* The panel icon tooltip.
|
|
49
|
+
*/
|
|
50
|
+
panelTooltip?: string | JTranslationItem
|
|
51
|
+
/**
|
|
52
|
+
* The panel title.
|
|
53
|
+
*
|
|
54
|
+
* If provided, will create a header on top of the panel having
|
|
55
|
+
* the same style of the others panels headers.
|
|
56
|
+
*/
|
|
57
|
+
panelTitle?: string | JTranslationItem
|
|
58
|
+
/**
|
|
59
|
+
* An optional map interactor.
|
|
60
|
+
*
|
|
61
|
+
* See [[JMap.Service.Map.Interaction]] for more details.
|
|
62
|
+
*/
|
|
63
|
+
interactor?: JMapInteractor
|
|
64
|
+
/**
|
|
65
|
+
* The panel registration method.
|
|
66
|
+
*
|
|
67
|
+
* This method is called each time the app extension is :
|
|
68
|
+
* - Registered, after the panel and interactors have been created
|
|
69
|
+
*
|
|
70
|
+
* Here you can perform actions after the registering of the extension.
|
|
71
|
+
*/
|
|
72
|
+
onAppRegistrationDone?: () => void
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
declare interface JAppExtensionEventParams {
|
|
76
|
+
extensionId: string
|
|
77
|
+
}
|
package/public/form.d.ts
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
declare interface JFormParams {
|
|
2
|
+
id: JId
|
|
3
|
+
label: string
|
|
4
|
+
schema: JFormSchema
|
|
5
|
+
uiSchema: JFormUISchema
|
|
6
|
+
validationRules?: JFormValidationRules,
|
|
7
|
+
readOnly?: boolean
|
|
8
|
+
defaultValueById?: { [id: string]: any }
|
|
9
|
+
viewId?: number
|
|
10
|
+
hideClearButton?: boolean
|
|
11
|
+
buttonLabelSubmit?: string
|
|
12
|
+
buttonLabelCancel?: string
|
|
13
|
+
buttonLabelClear?: string
|
|
14
|
+
formIsDestroyedAfterSubmit?: boolean
|
|
15
|
+
isSearch?: boolean
|
|
16
|
+
smallScreenDisplay?: boolean
|
|
17
|
+
disableSubmit?: boolean
|
|
18
|
+
submitErrors?: string[]
|
|
19
|
+
messageToDisplay?: string
|
|
20
|
+
validate: (values: any, formMetada: JFormMetaData) => { [key: string]: string }
|
|
21
|
+
onSubmit: (values: any, formMetada: JFormMetaData) => void | string | Promise<any>
|
|
22
|
+
onCancel?: () => void
|
|
23
|
+
onReset?: () => void
|
|
24
|
+
}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
// ALL_APP_LAYER_DATE_FILTER_OPERATOR_TYPES in all-enum.ts
|
|
2
|
+
declare const enum JAPP_LAYER_DATE_FILTER_OPERATOR_TYPES {
|
|
3
|
+
BEFORE = "before",
|
|
4
|
+
AFTER = "after",
|
|
5
|
+
BETWEEN = "between",
|
|
6
|
+
LAST_PERIOD = "lastPeriod"
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
// ALL_APP_LAYER_TEXT_FILTER_OPERATOR_TYPES in all-enum.ts
|
|
10
|
+
declare const enum JAPP_LAYER_TEXT_FILTER_OPERATOR_TYPES {
|
|
11
|
+
CONTAINS = "contains",
|
|
12
|
+
DOES_NOT_CONTAIN = "doesNotContain",
|
|
13
|
+
EQUALS = "equals",
|
|
14
|
+
DOES_NOT_EQUALS = "doesNotEqual"
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
// ALL_APP_LAYER_NUMBER_FILTER_OPERATOR_TYPES in all-enum.ts
|
|
18
|
+
declare const enum JAPP_LAYER_NUMBER_FILTER_OPERATOR_TYPES {
|
|
19
|
+
EQUALS = "equals",
|
|
20
|
+
DOES_NOT_EQUALS = "doesNotEqual",
|
|
21
|
+
SMALLER_THAN = "smallerThan",
|
|
22
|
+
GREATER_THAN = "greaterThan"
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
// ALL_APP_LAYER_FILTER_DATE_PERIOD_TYPES in all-enum.ts
|
|
26
|
+
declare const enum JAPP_LAYER_FILTER_DATE_PERIOD_TYPES {
|
|
27
|
+
DAY = "day",
|
|
28
|
+
WEEK = "week",
|
|
29
|
+
MONTH = "month",
|
|
30
|
+
YEAR = "year"
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
// ALL_APP_LAYER_EDITION_TABS in all-enum.ts
|
|
34
|
+
declare const enum JAPP_LAYER_EDITION_TABS {
|
|
35
|
+
THEMATICS = "thematics",
|
|
36
|
+
DYNAMIC_FILTER = "dynamic-filter",
|
|
37
|
+
GENERAL = "general"
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
declare type JAppLayerAnyFilterOperatorType =
|
|
41
|
+
| JAPP_LAYER_DATE_FILTER_OPERATOR_TYPES
|
|
42
|
+
| JAPP_LAYER_TEXT_FILTER_OPERATOR_TYPES
|
|
43
|
+
| JAPP_LAYER_NUMBER_FILTER_OPERATOR_TYPES
|
|
44
|
+
|
|
45
|
+
declare interface JAppLayerTreeFilterState {
|
|
46
|
+
active: boolean
|
|
47
|
+
isAddingFilter: boolean
|
|
48
|
+
nameFilter: string
|
|
49
|
+
filters: JAppAnyLayerFilter[]
|
|
50
|
+
exactlyMatchedTreeItemIds: JId[]
|
|
51
|
+
expandedMatchedTreeItemIds: JId[]
|
|
52
|
+
layerIdsByFilterId: JAppLayerIdByFilterId
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
declare interface JAppGetAllFiltersResult {
|
|
56
|
+
nameFilter: string
|
|
57
|
+
filters: JAppAnyLayerFilter[]
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
declare type JAppLayerIdByFilterId = { [filterId: number]: JId[] }
|
|
61
|
+
|
|
62
|
+
declare type JAppAnyLayerFilter = JAppNumberLayerFilter | JAppTextLayerFilter | JAppDateLayerFilter
|
|
63
|
+
|
|
64
|
+
declare interface JAppBaseLayerFilter {
|
|
65
|
+
id: number
|
|
66
|
+
metadataItemId: JId
|
|
67
|
+
type: JLAYER_METADATA_TYPES
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
declare interface JAppNumberLayerFilter extends JAppBaseLayerFilter {
|
|
71
|
+
operator: JAPP_LAYER_NUMBER_FILTER_OPERATOR_TYPES
|
|
72
|
+
value: number
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
declare interface JAppTextLayerFilter extends JAppBaseLayerFilter {
|
|
76
|
+
operator: JAPP_LAYER_TEXT_FILTER_OPERATOR_TYPES
|
|
77
|
+
value: string
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
declare interface JAppDateLayerFilter extends JAppBaseLayerFilter {
|
|
81
|
+
operator: JAPP_LAYER_DATE_FILTER_OPERATOR_TYPES
|
|
82
|
+
datePeriod?: JAPP_LAYER_FILTER_DATE_PERIOD_TYPES
|
|
83
|
+
value: number | Date | Date[]
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
declare interface JAppLayerEventParams {
|
|
87
|
+
layer: JLayer
|
|
88
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
declare type JAPP_MEASURE_TYPES = JAPP_DRAW_TYPES.POLYGON | JAPP_DRAW_TYPES.LINE_STRING | JAPP_DRAW_TYPES.CIRCLE
|
|
2
|
+
|
|
3
|
+
// ALL_APP_MEASUREMENT_SYSTEMS in all-enum.ts
|
|
4
|
+
declare const enum JAPP_MEASUREMENT_SYSTEMS {
|
|
5
|
+
PLANAR = "planar",
|
|
6
|
+
GEODETIC = "geodetic"
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
declare type JAPP_MEASURE_SPACE_TYPES = JAPP_DRAW_TYPES.POLYGON | JAPP_DRAW_TYPES.LINE_STRING | JAPP_DRAW_TYPES.CIRCLE
|
|
10
|
+
|
|
11
|
+
declare interface JAppMeasureEdge {
|
|
12
|
+
popupLocation: JPoint
|
|
13
|
+
distance: number
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
declare interface JAppMeasure {
|
|
17
|
+
id: string
|
|
18
|
+
type: JAPP_MEASURE_TYPES
|
|
19
|
+
feature: GeoJSON.Feature<GeoJSON.LineString | GeoJSON.Polygon>
|
|
20
|
+
totalEdges: number
|
|
21
|
+
centroid: JPoint
|
|
22
|
+
edges: JAppMeasureEdge[]
|
|
23
|
+
area: number
|
|
24
|
+
radius: number
|
|
25
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
// ALL_APP_MESSAGE_SEVERITIES in all-enum.ts
|
|
2
|
+
declare const enum JAPP_MESSAGE_SEVERITIES {
|
|
3
|
+
SUCCESS = "success",
|
|
4
|
+
INFO = "info",
|
|
5
|
+
WARNING = "warning",
|
|
6
|
+
ERROR = "error"
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
declare interface JAppMessage {
|
|
10
|
+
id: string
|
|
11
|
+
text: string
|
|
12
|
+
severity: JAPP_MESSAGE_SEVERITIES
|
|
13
|
+
expired: boolean
|
|
14
|
+
duration: number | null
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
declare interface JAppOverlayMessage {
|
|
18
|
+
id: string
|
|
19
|
+
text: string
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
declare interface JAppConfirmMessage {
|
|
23
|
+
message: string
|
|
24
|
+
title: string
|
|
25
|
+
isInputMessage?: boolean
|
|
26
|
+
isInputOptional?: boolean
|
|
27
|
+
inputPlaceholder?: string
|
|
28
|
+
confirmButtonLabel?: string
|
|
29
|
+
cancelButtonLabel?: string
|
|
30
|
+
locale?: JLOCALES
|
|
31
|
+
onSuccess: (input: string) => any
|
|
32
|
+
onCancel?: () => any
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
declare interface JAppMessageOptions {
|
|
36
|
+
severity?: JAPP_MESSAGE_SEVERITIES
|
|
37
|
+
duration?: number | null
|
|
38
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
declare interface JAppPanelActivationParams {
|
|
2
|
+
ignoreConfirmationMessage?: boolean
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
declare interface JAppPanelDeactivationParams extends JAppPanelActivationParams {
|
|
6
|
+
activatePrevious?: boolean
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
declare interface JAppPanelLeaveResponse {
|
|
10
|
+
title: string,
|
|
11
|
+
message: string
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
declare interface JAppPanel {
|
|
15
|
+
id: string
|
|
16
|
+
icon: string // url or base64 or app name
|
|
17
|
+
iconTooltip: string | JTranslationItem | (() => string)
|
|
18
|
+
interactorId?: string | (() => string | undefined)
|
|
19
|
+
title?: string | JTranslationItem | (() => string)
|
|
20
|
+
isPopup?: boolean
|
|
21
|
+
onPanelCreation?: (panelContainerId: string) => void
|
|
22
|
+
onPanelDestroy?: (panelContainerId: string) => void
|
|
23
|
+
leaveConfirmationMessageFn?: () => JAppPanelLeaveResponse | undefined // returning a message will display popup
|
|
24
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
// ALL_APP_PRINT_FILE_TYPES in all-enum.ts
|
|
2
|
+
declare const enum JAPP_PRINT_FILE_TYPES {
|
|
3
|
+
PNG = "png",
|
|
4
|
+
JPEG = "jpeg",
|
|
5
|
+
PDF = "pdf"
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
// ALL_APP_PRINT_PAPER_SIZES in all-enum.ts
|
|
9
|
+
declare const enum JAPP_PRINT_PAPER_SIZES {
|
|
10
|
+
LETTER = "letter",
|
|
11
|
+
LEGAL = "legal",
|
|
12
|
+
A3 = "a3",
|
|
13
|
+
A4 = "a4"
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
// ALL_APP_PRINT_LEGEND_POSITION in all-enum.ts
|
|
17
|
+
declare const enum JAPP_PRINT_LEGEND_POSITION {
|
|
18
|
+
TOP_RIGHT = "top-right",
|
|
19
|
+
TOP_LEFT = "top-left"
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
declare interface JAppPaperFormat {
|
|
23
|
+
paperSize: JAPP_PRINT_PAPER_SIZES
|
|
24
|
+
width: number
|
|
25
|
+
height: number
|
|
26
|
+
ratio: number
|
|
27
|
+
}
|
|
@@ -0,0 +1,302 @@
|
|
|
1
|
+
declare interface JCoreOptions {
|
|
2
|
+
/**
|
|
3
|
+
* This section is about the JMap Cloud NG startup options.
|
|
4
|
+
*
|
|
5
|
+
* An example of how to configure the application startup options :
|
|
6
|
+
* @example ```html
|
|
7
|
+
* <html>
|
|
8
|
+
* ...
|
|
9
|
+
* <body>
|
|
10
|
+
* <div id="custom-app"></div>
|
|
11
|
+
* <script>
|
|
12
|
+
* window.JMAP_OPTIONS = {
|
|
13
|
+
* projectId: 10,
|
|
14
|
+
* restBaseUrl: "http://my-jmap-server/services/rest/v2.0",
|
|
15
|
+
* session: {
|
|
16
|
+
* token: 2345677654
|
|
17
|
+
* },
|
|
18
|
+
* application: {
|
|
19
|
+
* // will create the application in the div id="custom-app"
|
|
20
|
+
* containerId: "custom-app"
|
|
21
|
+
* }
|
|
22
|
+
* }
|
|
23
|
+
* </script>
|
|
24
|
+
* ...
|
|
25
|
+
* <script defer type="text/javascript" src="https://cdn.jsdelivr.net/npm/jmapcloud-ng-core@0.5.0/public/index.js"></script>
|
|
26
|
+
* <script defer type="text/javascript" src="https://cdn.jsdelivr.net/npm/jmapcloud-ng@0.1.1/public/index.js"></script>
|
|
27
|
+
* </body>
|
|
28
|
+
* </html>
|
|
29
|
+
*
|
|
30
|
+
* ```
|
|
31
|
+
*/
|
|
32
|
+
application?: JApplicationOptions
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
declare interface JApplicationOptions {
|
|
36
|
+
/**
|
|
37
|
+
* When the application start it will create or use an existing div container in which the app will be inserted into.
|
|
38
|
+
*
|
|
39
|
+
* All application dom elements will be inserted inside this div.
|
|
40
|
+
*
|
|
41
|
+
* By default the div container id is "***jmapcloud-ng***", but you can set the id of your choice like that :
|
|
42
|
+
* ```html
|
|
43
|
+
* <html>
|
|
44
|
+
* ...
|
|
45
|
+
* <body>
|
|
46
|
+
* <div id="my-custom-container-id"></div>
|
|
47
|
+
* <script type="text/javascript">
|
|
48
|
+
* window.JMAP_OPTIONS = {
|
|
49
|
+
* ...
|
|
50
|
+
* application: {
|
|
51
|
+
* containerId: "my-custom-container-id"
|
|
52
|
+
* }
|
|
53
|
+
* }
|
|
54
|
+
* </script>
|
|
55
|
+
* ...
|
|
56
|
+
* </body>
|
|
57
|
+
* </html>
|
|
58
|
+
* ```
|
|
59
|
+
*
|
|
60
|
+
* In the above example the application will be inserted in the div having "my-custom-container-id" as id. You need to set the width and the height of this div by yourself.
|
|
61
|
+
*
|
|
62
|
+
* If no container is found in the DOM with the specified id, JMap Cloud NG will create and append it automatically in the body element of the web page.
|
|
63
|
+
*/
|
|
64
|
+
containerId?: string
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Set a custom application background login image, by default the JMap background is displayed.
|
|
68
|
+
* Background login image is used for login screen.
|
|
69
|
+
*
|
|
70
|
+
* ```html
|
|
71
|
+
* <html>
|
|
72
|
+
* ...
|
|
73
|
+
* <body>
|
|
74
|
+
* <script type="text/javascript">
|
|
75
|
+
* window.JMAP_OPTIONS = {
|
|
76
|
+
* ...
|
|
77
|
+
* application: {
|
|
78
|
+
* loginBackgroundImageUrl: "https://images.pexels.com/photos/1227520/pexels-photo-1227520.jpeg?auto=compress&cs=tinysrgb&dpr=3&h=750&w=1260",
|
|
79
|
+
* ...
|
|
80
|
+
* }
|
|
81
|
+
* }
|
|
82
|
+
* </script>
|
|
83
|
+
* ...
|
|
84
|
+
* </body>
|
|
85
|
+
* </html>
|
|
86
|
+
* ```
|
|
87
|
+
*/
|
|
88
|
+
loginBackgroundImageUrl?: string
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* Set a custom application background project image, by default the JMap background is displayed.
|
|
92
|
+
* Background project image is used for projects screen.
|
|
93
|
+
*
|
|
94
|
+
* ```html
|
|
95
|
+
* <html>
|
|
96
|
+
* ...
|
|
97
|
+
* <body>
|
|
98
|
+
* <script type="text/javascript">
|
|
99
|
+
* window.JMAP_OPTIONS = {
|
|
100
|
+
* ...
|
|
101
|
+
* application: {
|
|
102
|
+
* projectBackgroundImageUrl: "https://images.pexels.com/photos/1227520/pexels-photo-1227520.jpeg?auto=compress&cs=tinysrgb&dpr=3&h=750&w=1260",
|
|
103
|
+
* ...
|
|
104
|
+
* }
|
|
105
|
+
* }
|
|
106
|
+
* </script>
|
|
107
|
+
* ...
|
|
108
|
+
* </body>
|
|
109
|
+
* </html>
|
|
110
|
+
* ```
|
|
111
|
+
*/
|
|
112
|
+
projectBackgroundImageUrl?: string
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* Set a custom application logo, by default the JMap logo is displayed.
|
|
116
|
+
*
|
|
117
|
+
* ```html
|
|
118
|
+
* <html>
|
|
119
|
+
* ...
|
|
120
|
+
* <body>
|
|
121
|
+
* <script type="text/javascript">
|
|
122
|
+
* window.JMAP_OPTIONS = {
|
|
123
|
+
* ...
|
|
124
|
+
* application: {
|
|
125
|
+
* logoImageUrl: "https://upload.wikimedia.org/wikipedia/commons/thumb/3/3b/Atari_logo.svg/640px-Atari_logo.svg.png",
|
|
126
|
+
* ...
|
|
127
|
+
* }
|
|
128
|
+
* }
|
|
129
|
+
* </script>
|
|
130
|
+
* ...
|
|
131
|
+
* </body>
|
|
132
|
+
* </html>
|
|
133
|
+
* ```
|
|
134
|
+
*/
|
|
135
|
+
logoImageUrl?: string
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* Set the UI theme as dark or light.
|
|
139
|
+
*
|
|
140
|
+
* ```html
|
|
141
|
+
* <html>
|
|
142
|
+
* ...
|
|
143
|
+
* <body>
|
|
144
|
+
* <script type="text/javascript">
|
|
145
|
+
* window.JMAP_OPTIONS = {
|
|
146
|
+
* ...
|
|
147
|
+
* application: {
|
|
148
|
+
* theme: "dark",
|
|
149
|
+
* ...
|
|
150
|
+
* }
|
|
151
|
+
* }
|
|
152
|
+
* </script>
|
|
153
|
+
* ...
|
|
154
|
+
* </body>
|
|
155
|
+
* </html>
|
|
156
|
+
* ```
|
|
157
|
+
*/
|
|
158
|
+
theme?: "dark" | "light"
|
|
159
|
+
|
|
160
|
+
/**
|
|
161
|
+
* By default the active panel (the one displayed), is the "layer" panel.
|
|
162
|
+
*
|
|
163
|
+
* Standard application panels ids are : "layer", "selection", "measure", "mapcontext", "print", "user", "query", "annotation".
|
|
164
|
+
*
|
|
165
|
+
* But if ***panel*** is defined, it will display the corresponding panel on the screen.
|
|
166
|
+
*
|
|
167
|
+
* ```html
|
|
168
|
+
* <html>
|
|
169
|
+
* ...
|
|
170
|
+
* <body>
|
|
171
|
+
* <script type="text/javascript">
|
|
172
|
+
* window.JMAP_OPTIONS = {
|
|
173
|
+
* ...
|
|
174
|
+
* application: {
|
|
175
|
+
* panel: "project",
|
|
176
|
+
* ...
|
|
177
|
+
* }
|
|
178
|
+
* }
|
|
179
|
+
* </script>
|
|
180
|
+
* ...
|
|
181
|
+
* </body>
|
|
182
|
+
* </html>
|
|
183
|
+
* ```
|
|
184
|
+
*/
|
|
185
|
+
panel?: string
|
|
186
|
+
|
|
187
|
+
/**
|
|
188
|
+
* The application have multiple panels available by default : "layer", "selection", "measure", "mapcontext", "print", "user", "query", "annotation".
|
|
189
|
+
*
|
|
190
|
+
* But you can tell JMap Cloud NG to disabled some panels. If a panel is disabled it will disappear on the left menu.
|
|
191
|
+
*
|
|
192
|
+
* The ***disabledPanels*** parameter is an array with the panel ids you want to be disabled.
|
|
193
|
+
*
|
|
194
|
+
* ```html
|
|
195
|
+
* <html>
|
|
196
|
+
* ...
|
|
197
|
+
* <body>
|
|
198
|
+
* <script type="text/javascript">
|
|
199
|
+
* window.JMAP_OPTIONS = {
|
|
200
|
+
* ...
|
|
201
|
+
* application: {
|
|
202
|
+
* disabledPanels: [ "measure", "print" ],
|
|
203
|
+
* ...
|
|
204
|
+
* }
|
|
205
|
+
* }
|
|
206
|
+
* </script>
|
|
207
|
+
* ...
|
|
208
|
+
* </body>
|
|
209
|
+
* </html>
|
|
210
|
+
* ```
|
|
211
|
+
*/
|
|
212
|
+
disabledPanels?: string[]
|
|
213
|
+
|
|
214
|
+
/**
|
|
215
|
+
* Controls the side panel default visibility state.
|
|
216
|
+
*
|
|
217
|
+
* The JMap Cloud NG side panel is open by default when the application starts, but you can change this behaviour by using this option.
|
|
218
|
+
*
|
|
219
|
+
* ```html
|
|
220
|
+
* <html>
|
|
221
|
+
* ...
|
|
222
|
+
* <body>
|
|
223
|
+
* <script type="text/javascript">
|
|
224
|
+
* window.JMAP_OPTIONS = {
|
|
225
|
+
* ...
|
|
226
|
+
* application: {
|
|
227
|
+
* sidePanelInitialVisibility: false, // this will initially hide the panel
|
|
228
|
+
* ...
|
|
229
|
+
* }
|
|
230
|
+
* }
|
|
231
|
+
* </script>
|
|
232
|
+
* ...
|
|
233
|
+
* </body>
|
|
234
|
+
* </html>
|
|
235
|
+
* ```
|
|
236
|
+
*/
|
|
237
|
+
sidePanelInitialVisibility?: boolean
|
|
238
|
+
|
|
239
|
+
/**
|
|
240
|
+
* If provided this function will be processed each time the application is ready :
|
|
241
|
+
* - A valid user session is set
|
|
242
|
+
* - A project is selected
|
|
243
|
+
* - The main menu is rendered
|
|
244
|
+
*
|
|
245
|
+
* It could be called multiple times, if the user change the project, or the user logout and login.
|
|
246
|
+
*
|
|
247
|
+
* ```html
|
|
248
|
+
* <html>
|
|
249
|
+
* ...
|
|
250
|
+
* <body>
|
|
251
|
+
* <script type="text/javascript">
|
|
252
|
+
* window.JMAP_OPTIONS = {
|
|
253
|
+
* ...
|
|
254
|
+
* application: {
|
|
255
|
+
* onAppLoad: () => console.log("App is ready !"),
|
|
256
|
+
* ...
|
|
257
|
+
* }
|
|
258
|
+
* }
|
|
259
|
+
* </script>
|
|
260
|
+
* ...
|
|
261
|
+
* </body>
|
|
262
|
+
* </html>
|
|
263
|
+
* ```
|
|
264
|
+
*/
|
|
265
|
+
onAppLoad?: () => void
|
|
266
|
+
|
|
267
|
+
/**
|
|
268
|
+
* If provided this function will be processed each time the application is not loaded anymore :
|
|
269
|
+
* - User session token become invalid
|
|
270
|
+
* - Project is changed and app is loading the new one
|
|
271
|
+
*
|
|
272
|
+
* It could be called multiple times.
|
|
273
|
+
*
|
|
274
|
+
* ```html
|
|
275
|
+
* <html>
|
|
276
|
+
* ...
|
|
277
|
+
* <body>
|
|
278
|
+
* <script type="text/javascript">
|
|
279
|
+
* window.JMAP_OPTIONS = {
|
|
280
|
+
* ...
|
|
281
|
+
* application: {
|
|
282
|
+
* onAppUnload: () => console.log("App is not ready anymore !"),
|
|
283
|
+
* ...
|
|
284
|
+
* }
|
|
285
|
+
* }
|
|
286
|
+
* </script>
|
|
287
|
+
* ...
|
|
288
|
+
* </body>
|
|
289
|
+
* </html>
|
|
290
|
+
* ```
|
|
291
|
+
*/
|
|
292
|
+
onAppUnload?: () => void
|
|
293
|
+
|
|
294
|
+
/**
|
|
295
|
+
* You can provide your own application extensions.
|
|
296
|
+
*
|
|
297
|
+
* This mechanism offer a way to add your own panel, map interactor, redux store data, etc ...
|
|
298
|
+
*
|
|
299
|
+
* You can fully customize JMap Cloud NG with your own code, written with your favourite dev tools.
|
|
300
|
+
*/
|
|
301
|
+
extensions?: JAppExtension[]
|
|
302
|
+
}
|