jmapcloud-ng-types 1.0.1001 → 1.1.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/index.ts +43 -22
- package/package.json +7 -6
- package/public/app.d.ts +583 -592
- package/public/extension.d.ts +19 -13
- package/public/form.d.ts +15 -23
- package/public/panel.d.ts +6 -2
- package/public/print.d.ts +8 -1
- package/public/startup-options.d.ts +75 -26
- package/public/user.d.ts +4 -1
package/public/extension.d.ts
CHANGED
|
@@ -1,44 +1,44 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* You can create a custom application panel throught the app extension mecanism.
|
|
3
|
-
*
|
|
3
|
+
*
|
|
4
4
|
* It offers a way to add your own panel, map interactor, redux store data, etc ...
|
|
5
|
-
*
|
|
5
|
+
*
|
|
6
6
|
* This way you can fully customize your JMap Cloud NG with your own code, written with your favourite dev tools.
|
|
7
7
|
*/
|
|
8
8
|
declare interface JAppExtension extends JCoreExtension {
|
|
9
9
|
/**
|
|
10
10
|
* The panel creation method.
|
|
11
|
-
*
|
|
11
|
+
*
|
|
12
12
|
* This is where you have to :
|
|
13
13
|
* - Create your panel UI
|
|
14
14
|
* - Add your listeners (like Redux subscribe)
|
|
15
15
|
* - ect ...
|
|
16
|
-
*
|
|
16
|
+
*
|
|
17
17
|
* This method is called each time the panel is :
|
|
18
18
|
* - Created : after a panel change
|
|
19
19
|
* - Displayed : after the panel is displayed after been hidden
|
|
20
|
-
*
|
|
20
|
+
*
|
|
21
21
|
* @param panelContainerId The html container id where you can insert your application.
|
|
22
22
|
*/
|
|
23
23
|
onPanelCreation: (panelContainerId: string) => void
|
|
24
24
|
/**
|
|
25
25
|
* The panel destroy method.
|
|
26
|
-
*
|
|
26
|
+
*
|
|
27
27
|
* This is where you have to :
|
|
28
28
|
* - Destroy the panel UI (if not yet done).
|
|
29
29
|
* - Remove your listeners (like Redux unsubscribe)
|
|
30
30
|
* - etc ...
|
|
31
|
-
*
|
|
31
|
+
*
|
|
32
32
|
* This method is called each time the panel is :
|
|
33
33
|
* - Destroyed : after a panel change (panelContainerId div doesn't exist when called)
|
|
34
34
|
* - Hidden : when the panel is hidden (panelContainerId div still exist when called)
|
|
35
|
-
*
|
|
35
|
+
*
|
|
36
36
|
* @param panelContainerId The html container id where you can insert your application.
|
|
37
37
|
*/
|
|
38
38
|
onPanelDestroy?: (panelContainerId: string) => void
|
|
39
39
|
/**
|
|
40
40
|
* The panel icon.
|
|
41
|
-
*
|
|
41
|
+
*
|
|
42
42
|
* An url (png, jpeg, svg, etc ...), a base 64 string or an svg tag as a string, as you like.
|
|
43
43
|
* For an svg string a viewbox need to be specified for the icon to appear,
|
|
44
44
|
* if no fill attribute is specified, the icon will follow the app theme.
|
|
@@ -50,23 +50,29 @@ declare interface JAppExtension extends JCoreExtension {
|
|
|
50
50
|
panelTooltip?: string | JTranslationItem
|
|
51
51
|
/**
|
|
52
52
|
* The panel title.
|
|
53
|
-
*
|
|
53
|
+
*
|
|
54
54
|
* If provided, will create a header on top of the panel having
|
|
55
55
|
* the same style of the others panels headers.
|
|
56
56
|
*/
|
|
57
57
|
panelTitle?: string | JTranslationItem
|
|
58
|
+
/**
|
|
59
|
+
* Specify to omit the panel header if required.
|
|
60
|
+
*
|
|
61
|
+
* If set to true, NG will not display the panel header, including the extension's title. The extension developer is then responsible for displaying the extension's title inside its panel. The panel scrolling behaviour will also have to be handled by the developer.
|
|
62
|
+
*/
|
|
63
|
+
omitPanelHeader?: boolean
|
|
58
64
|
/**
|
|
59
65
|
* An optional map interactor.
|
|
60
|
-
*
|
|
66
|
+
*
|
|
61
67
|
* See [[JMap.Service.Map.Interaction]] for more details.
|
|
62
68
|
*/
|
|
63
69
|
interactor?: JMapInteractor
|
|
64
70
|
/**
|
|
65
71
|
* The panel registration method.
|
|
66
|
-
*
|
|
72
|
+
*
|
|
67
73
|
* This method is called each time the app extension is :
|
|
68
74
|
* - Registered, after the panel and interactors have been created
|
|
69
|
-
*
|
|
75
|
+
*
|
|
70
76
|
* Here you can perform actions after the registering of the extension.
|
|
71
77
|
*/
|
|
72
78
|
onAppRegistrationDone?: () => void
|
package/public/form.d.ts
CHANGED
|
@@ -1,24 +1,16 @@
|
|
|
1
|
-
declare
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
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
|
|
1
|
+
declare type JFormDialogParams = JFormDialogLayerParams | JFormDialogTableParams
|
|
2
|
+
|
|
3
|
+
declare type JFormDialogLayerParams = {
|
|
4
|
+
layerId: JId
|
|
5
|
+
featureId?: JId
|
|
6
|
+
feature?: GeoJSON.Feature
|
|
7
|
+
isReadOnly: boolean
|
|
8
|
+
onSubmit?: () => void
|
|
24
9
|
}
|
|
10
|
+
|
|
11
|
+
declare type JFormDialogTableParams = {
|
|
12
|
+
tableId: JId
|
|
13
|
+
row?: { [key: string]: any }
|
|
14
|
+
isReadOnly: boolean
|
|
15
|
+
onSubmit?: () => void
|
|
16
|
+
}
|
package/public/panel.d.ts
CHANGED
|
@@ -7,15 +7,19 @@ declare interface JAppPanelDeactivationParams extends JAppPanelActivationParams
|
|
|
7
7
|
}
|
|
8
8
|
|
|
9
9
|
declare interface JAppPanelLeaveResponse {
|
|
10
|
-
title: string
|
|
10
|
+
title: string
|
|
11
11
|
message: string
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
declare interface JAppPanel {
|
|
15
15
|
id: string
|
|
16
|
-
|
|
16
|
+
/**
|
|
17
|
+
* must be a fontawesome IconDefinition or a valid <img> src (url or base64 data), or an svg string
|
|
18
|
+
*/
|
|
19
|
+
icon: import("@fortawesome/fontawesome-svg-core").IconDefinition | string
|
|
17
20
|
iconTooltip: string | JTranslationItem | (() => string)
|
|
18
21
|
interactorId?: string | (() => string | undefined)
|
|
22
|
+
omitPanelHeader?: boolean
|
|
19
23
|
title?: string | JTranslationItem | (() => string)
|
|
20
24
|
isPopup?: boolean
|
|
21
25
|
onPanelCreation?: (panelContainerId: string) => void
|
package/public/print.d.ts
CHANGED
|
@@ -10,7 +10,8 @@ declare const enum JAPP_PRINT_PAPER_SIZES {
|
|
|
10
10
|
LETTER = "letter",
|
|
11
11
|
LEGAL = "legal",
|
|
12
12
|
A3 = "a3",
|
|
13
|
-
A4 = "a4"
|
|
13
|
+
A4 = "a4",
|
|
14
|
+
CUSTOM = "custom"
|
|
14
15
|
}
|
|
15
16
|
|
|
16
17
|
// ALL_APP_PRINT_LEGEND_POSITION in all-enum.ts
|
|
@@ -25,3 +26,9 @@ declare interface JAppPaperFormat {
|
|
|
25
26
|
height: number
|
|
26
27
|
ratio: number
|
|
27
28
|
}
|
|
29
|
+
|
|
30
|
+
declare interface JAppPrintCaptureResult {
|
|
31
|
+
height: number
|
|
32
|
+
width: number
|
|
33
|
+
dataUrl: string
|
|
34
|
+
}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
declare interface JCoreOptions {
|
|
2
2
|
/**
|
|
3
3
|
* This section is about the JMap Cloud NG startup options.
|
|
4
|
-
*
|
|
4
|
+
*
|
|
5
5
|
* An example of how to configure the application startup options :
|
|
6
|
-
* @example
|
|
6
|
+
* @example
|
|
7
|
+
* ```html
|
|
7
8
|
* <html>
|
|
8
9
|
* ...
|
|
9
10
|
* <body>
|
|
@@ -26,7 +27,7 @@ declare interface JCoreOptions {
|
|
|
26
27
|
* <script defer type="text/javascript" src="https://cdn.jsdelivr.net/npm/jmapcloud-ng@0.1.1/public/index.js"></script>
|
|
27
28
|
* </body>
|
|
28
29
|
* </html>
|
|
29
|
-
*
|
|
30
|
+
*
|
|
30
31
|
* ```
|
|
31
32
|
*/
|
|
32
33
|
application?: JApplicationOptions
|
|
@@ -35,9 +36,9 @@ declare interface JCoreOptions {
|
|
|
35
36
|
declare interface JApplicationOptions {
|
|
36
37
|
/**
|
|
37
38
|
* When the application start it will create or use an existing div container in which the app will be inserted into.
|
|
38
|
-
*
|
|
39
|
+
*
|
|
39
40
|
* All application dom elements will be inserted inside this div.
|
|
40
|
-
*
|
|
41
|
+
*
|
|
41
42
|
* By default the div container id is "***jmapcloud-ng***", but you can set the id of your choice like that :
|
|
42
43
|
* ```html
|
|
43
44
|
* <html>
|
|
@@ -58,7 +59,7 @@ declare interface JApplicationOptions {
|
|
|
58
59
|
* ```
|
|
59
60
|
*
|
|
60
61
|
* 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
|
+
*
|
|
62
63
|
* 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
|
*/
|
|
64
65
|
containerId?: string
|
|
@@ -66,7 +67,7 @@ declare interface JApplicationOptions {
|
|
|
66
67
|
/**
|
|
67
68
|
* Set a custom application background login image, by default the JMap background is displayed.
|
|
68
69
|
* Background login image is used for login screen.
|
|
69
|
-
*
|
|
70
|
+
*
|
|
70
71
|
* ```html
|
|
71
72
|
* <html>
|
|
72
73
|
* ...
|
|
@@ -85,12 +86,12 @@ declare interface JApplicationOptions {
|
|
|
85
86
|
* </html>
|
|
86
87
|
* ```
|
|
87
88
|
*/
|
|
88
|
-
|
|
89
|
+
loginBackgroundImageUrl?: string
|
|
89
90
|
|
|
90
91
|
/**
|
|
91
92
|
* Set a custom application background project image, by default the JMap background is displayed.
|
|
92
93
|
* Background project image is used for projects screen.
|
|
93
|
-
*
|
|
94
|
+
*
|
|
94
95
|
* ```html
|
|
95
96
|
* <html>
|
|
96
97
|
* ...
|
|
@@ -109,11 +110,11 @@ declare interface JApplicationOptions {
|
|
|
109
110
|
* </html>
|
|
110
111
|
* ```
|
|
111
112
|
*/
|
|
112
|
-
|
|
113
|
+
projectBackgroundImageUrl?: string
|
|
113
114
|
|
|
114
115
|
/**
|
|
115
116
|
* Set a custom application logo, by default the JMap logo is displayed.
|
|
116
|
-
*
|
|
117
|
+
*
|
|
117
118
|
* ```html
|
|
118
119
|
* <html>
|
|
119
120
|
* ...
|
|
@@ -136,7 +137,7 @@ declare interface JApplicationOptions {
|
|
|
136
137
|
|
|
137
138
|
/**
|
|
138
139
|
* Set the UI theme as dark or light.
|
|
139
|
-
*
|
|
140
|
+
*
|
|
140
141
|
* ```html
|
|
141
142
|
* <html>
|
|
142
143
|
* ...
|
|
@@ -157,13 +158,61 @@ declare interface JApplicationOptions {
|
|
|
157
158
|
*/
|
|
158
159
|
theme?: "dark" | "light"
|
|
159
160
|
|
|
161
|
+
/**
|
|
162
|
+
* By default the Simple Search control is visible.
|
|
163
|
+
*
|
|
164
|
+
* But if ***simpleSearchControlVisible*** is false, it will be hidden over the map.
|
|
165
|
+
*
|
|
166
|
+
* ```html
|
|
167
|
+
* <html>
|
|
168
|
+
* ...
|
|
169
|
+
* <body>
|
|
170
|
+
* <script type="text/javascript">
|
|
171
|
+
* window.JMAP_OPTIONS = {
|
|
172
|
+
* ...
|
|
173
|
+
* application: {
|
|
174
|
+
* simpleSearchControlVisible: false,
|
|
175
|
+
* }
|
|
176
|
+
* }
|
|
177
|
+
* </script>
|
|
178
|
+
* ...
|
|
179
|
+
* </body>
|
|
180
|
+
* </html>
|
|
181
|
+
* ```
|
|
182
|
+
*/
|
|
183
|
+
simpleSearchControlVisible?: boolean
|
|
184
|
+
|
|
185
|
+
/**
|
|
186
|
+
* By default the Geocoding control is visible.
|
|
187
|
+
*
|
|
188
|
+
* But if ***geocodingControlVisible*** is false, it will be hidden over the map.
|
|
189
|
+
*
|
|
190
|
+
* ```html
|
|
191
|
+
* <html>
|
|
192
|
+
* ...
|
|
193
|
+
* <body>
|
|
194
|
+
* <script type="text/javascript">
|
|
195
|
+
* window.JMAP_OPTIONS = {
|
|
196
|
+
* ...
|
|
197
|
+
* application: {
|
|
198
|
+
* geocodingControlVisible: false,
|
|
199
|
+
* }
|
|
200
|
+
* }
|
|
201
|
+
* </script>
|
|
202
|
+
* ...
|
|
203
|
+
* </body>
|
|
204
|
+
* </html>
|
|
205
|
+
* ```
|
|
206
|
+
*/
|
|
207
|
+
geocodingControlVisible?: boolean
|
|
208
|
+
|
|
160
209
|
/**
|
|
161
210
|
* By default the active panel (the one displayed), is the "layer" panel.
|
|
162
|
-
*
|
|
211
|
+
*
|
|
163
212
|
* Standard application panels ids are : "layer", "selection", "measure", "mapcontext", "print", "user", "query", "annotation".
|
|
164
|
-
*
|
|
213
|
+
*
|
|
165
214
|
* But if ***panel*** is defined, it will display the corresponding panel on the screen.
|
|
166
|
-
*
|
|
215
|
+
*
|
|
167
216
|
* ```html
|
|
168
217
|
* <html>
|
|
169
218
|
* ...
|
|
@@ -186,11 +235,11 @@ declare interface JApplicationOptions {
|
|
|
186
235
|
|
|
187
236
|
/**
|
|
188
237
|
* The application have multiple panels available by default : "layer", "selection", "measure", "mapcontext", "print", "user", "query", "annotation".
|
|
189
|
-
*
|
|
238
|
+
*
|
|
190
239
|
* But you can tell JMap Cloud NG to disabled some panels. If a panel is disabled it will disappear on the left menu.
|
|
191
|
-
*
|
|
240
|
+
*
|
|
192
241
|
* The ***disabledPanels*** parameter is an array with the panel ids you want to be disabled.
|
|
193
|
-
*
|
|
242
|
+
*
|
|
194
243
|
* ```html
|
|
195
244
|
* <html>
|
|
196
245
|
* ...
|
|
@@ -213,9 +262,9 @@ declare interface JApplicationOptions {
|
|
|
213
262
|
|
|
214
263
|
/**
|
|
215
264
|
* Controls the side panel default visibility state.
|
|
216
|
-
*
|
|
265
|
+
*
|
|
217
266
|
* 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
|
-
*
|
|
267
|
+
*
|
|
219
268
|
* ```html
|
|
220
269
|
* <html>
|
|
221
270
|
* ...
|
|
@@ -241,9 +290,9 @@ declare interface JApplicationOptions {
|
|
|
241
290
|
* - A valid user session is set
|
|
242
291
|
* - A project is selected
|
|
243
292
|
* - The main menu is rendered
|
|
244
|
-
*
|
|
293
|
+
*
|
|
245
294
|
* It could be called multiple times, if the user change the project, or the user logout and login.
|
|
246
|
-
*
|
|
295
|
+
*
|
|
247
296
|
* ```html
|
|
248
297
|
* <html>
|
|
249
298
|
* ...
|
|
@@ -268,9 +317,9 @@ declare interface JApplicationOptions {
|
|
|
268
317
|
* If provided this function will be processed each time the application is not loaded anymore :
|
|
269
318
|
* - User session token become invalid
|
|
270
319
|
* - Project is changed and app is loading the new one
|
|
271
|
-
*
|
|
320
|
+
*
|
|
272
321
|
* It could be called multiple times.
|
|
273
|
-
*
|
|
322
|
+
*
|
|
274
323
|
* ```html
|
|
275
324
|
* <html>
|
|
276
325
|
* ...
|
|
@@ -293,9 +342,9 @@ declare interface JApplicationOptions {
|
|
|
293
342
|
|
|
294
343
|
/**
|
|
295
344
|
* You can provide your own application extensions.
|
|
296
|
-
*
|
|
345
|
+
*
|
|
297
346
|
* This mechanism offer a way to add your own panel, map interactor, redux store data, etc ...
|
|
298
|
-
*
|
|
347
|
+
*
|
|
299
348
|
* You can fully customize JMap Cloud NG with your own code, written with your favourite dev tools.
|
|
300
349
|
*/
|
|
301
350
|
extensions?: JAppExtension[]
|
package/public/user.d.ts
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
declare interface JAppUserAction {
|
|
2
2
|
id: string
|
|
3
3
|
label: string | JTranslationItem
|
|
4
|
-
|
|
4
|
+
/**
|
|
5
|
+
* must be a fontawsome IconDefinition or a valid <img> src (url or base64 data)
|
|
6
|
+
*/
|
|
7
|
+
icon: import("@fortawesome/fontawesome-svg-core").IconDefinition | string
|
|
5
8
|
isHelp?: boolean
|
|
6
9
|
href?: string
|
|
7
10
|
disabled?: boolean
|